-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8332955: ubsan: runningCounters.cpp:48:61: runtime error: member call on null pointer of type 'struct VirtualSpaceList' #19412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
|
@MBaesken This change is no longer ready for integration - check the PR body for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with this code, but if reserved_words_nonclass() happens to be called before the VirtualSpaceList is initialized, I think this fix is good. Should be reviewed by a metaspace expert.
/reviewers 2
|
@TheRealMDoerr |
Thanks for the review ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this problem was discovered when following a crash path during VM init, it makes me wonder what other code in this class we may try to use during error reporting that may not yet be initialized?
|
@MBaesken this pull request can not be integrated into git checkout JDK-8332955
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
@MBaesken This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@MBaesken This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
When running jtreg HS :tier1 tests (with ubsan enabled binaries) this error can be seen on Linux ppc64.
Probably we should add a NULL check because calling into a nullptr is probably not a good idea (although no crash is observed).
runtime/os/TestHugePageDecisionsAtVMStartup_THP_enabled.jtr
/jdk/src/hotspot/share/memory/metaspace/runningCounters.cpp:48:61: runtime error: member call on null pointer of type 'struct VirtualSpaceList'
#0 0x7fffabe667c8 in metaspace::RunningCounters::reserved_words_nonclass() (/images/jdk/lib/server/libjvm.so+0x78667c8)
#1 0x7fffab6a25c0 in MetaspaceUtils::get_statistics(Metaspace::MetadataType) (/images/jdk/lib/server/libjvm.so+0x70a25c0)
#2 0x7fffab6a2708 in MetaspaceUtils::get_combined_statistics() (/images/jdk/lib/server/libjvm.so+0x70a2708)
#3 0x7fffab5ce630 in MemBaseline::baseline(bool) (/images/jdk/lib/server/libjvm.so+0x6fce630)
#4 0x7fffab61bf10 in MemTracker::report(bool, outputStream*, unsigned long) (/images/jdk/lib/server/libjvm.so+0x701bf10)
#5 0x7fffab61cb84 in MemTracker::error_report(outputStream*) (/images/jdk/lib/server/libjvm.so+0x701cb84)
#6 0x7fffac93f1e8 in VMError::report(outputStream*, bool) (/images/jdk/lib/server/libjvm.so+0x833f1e8)
#7 0x7fffac944630 in VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) (/images/jdk/lib/server/libjvm.so+0x8344630)
#8 0x7fffa9d69ffc in report_fatal(VMErrorType, char const*, int, char const*, ...) (/images/jdk/lib/server/libjvm.so+0x5769ffc)
#9 0x7fffaadff93c in TypedFlagAccessImpl<unsigned int, EventUnsignedIntFlagChanged>::check_constraint_and_set(JVMFlag*, void*, JVMFlagOrigin, bool) const [clone .part.0] (/images/jdk/lib/server/libjvm.so+0x67ff93c)
#10 0x7fffaae12bb8 in RangedFlagAccessImpl<unsigned long, EventUnsignedLongFlagChanged>::set_impl(JVMFlag*, void*, JVMFlagOrigin) const (/images/jdk/lib/server/libjvm.so+0x6812bb8)
#11 0x7fffaae04b8c in JVMFlagAccess::set_or_assert(JVMFlagsEnum, int, void*, JVMFlagOrigin) (/images/jdk/lib/server/libjvm.so+0x6804b8c)
#12 0x7fffa9a79fa8 in CodeCache::initialize_heaps() (/images/jdk/lib/server/libjvm.so+0x5479fa8)
#13 0x7fffa9a7ac10 in CodeCache::initialize() (/images/jdk/lib/server/libjvm.so+0x547ac10)
#14 0x7fffaa81af08 in init_globals() (/images/jdk/lib/server/libjvm.so+0x621af08)
#15 0x7fffac68baa8 in Threads::create_vm(JavaVMInitArgs*, bool*) (/images/jdk/lib/server/libjvm.so+0x808baa8)
#16 0x7fffaaca20b4 in JNI_CreateJavaVM (/images/jdk/lib/server/libjvm.so+0x66a20b4)
#17 0x7fffb17b3068 in InitializeJVM /jdk/src/java.base/share/native/libjli/java.c:1550
#18 0x7fffb17b3068 in JavaMain /jdk/src/java.base/share/native/libjli/java.c:491
#19 0x7fffb17bef1c in ThreadJavaMain /jdk/src/java.base/unix/native/libjli/java_md.c:642
#20 0x7fffb16d9714 in start_thread (/lib64/libpthread.so.0+0x9714)
#21 0x7fffb0a8b774 in __GI___clone (/lib64/libc.so.6+0x13b774)
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19412/head:pull/19412$ git checkout pull/19412Update a local copy of the PR:
$ git checkout pull/19412$ git pull https://git.openjdk.org/jdk.git pull/19412/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19412View PR using the GUI difftool:
$ git pr show -t 19412Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19412.diff
Webrev
Link to Webrev Comment