Taken from JDK-8373112:
I reproduced the error on Windows in a loop:
cygwin> while true; do date; java -XX:+UseSerialGC -XX:-UseCompressedOops -Xmx2m -Xlog:cds,gc*:file=log.txt -XX:ObjectAlignmentInBytes=64 -XX:+ShowMessageBoxOnError --version; done
[External Code]
[Inline Frame] jvm.dll!os::message_box(const char *) Line 4425 C++
jvm.dll!os::start_debugging(char * buf, int buflen) Line 5913 C++
jvm.dll!VMError::show_message_box(char * buf, int buflen) Line 2052 C++
jvm.dll!VMError::report_and_die(int id, const char * message, const char * detail_fmt, char * detail_args, Thread * thread, unsigned char * pc, const void * siginfo, const void * context, const char * filename, int lineno, unsigned __int64 size) Line 1743 C++
jvm.dll!report_vm_error(const char * file, int line, const char * error_msg, const char * detail_fmt, ...) Line 196 C++
[External Code]
> jvm.dll!permit_forbidden_function::exit(int status) Line 55 C++
jvm.dll!exit_process_or_thread(Ept what, int exit_code) Line 4399 C++
jvm.dll!os::abort(bool dump_core, const void * siginfo, const void * context) Line 1382 C++
jvm.dll!os::abort(bool dump_core) Line 854 C++
jvm.dll!vm_abort(bool dump_core) Line 628 C++
jvm.dll!vm_exit_during_initialization(Handle exception) Line 689 C++
jvm.dll!ExceptionMark::~ExceptionMark() Line 598 C++
jvm.dll!AOTStreamedHeapLoader::materialize_objects() Line 864 C++
jvm.dll!AOTThread::aot_thread_entry(JavaThread * jt, JavaThread * __the_thread__) Line 112 C++
jvm.dll!JavaThread::thread_main_inner() Line 777 C++
jvm.dll!Thread::call_run() Line 247 C++
jvm.dll!thread_native_entry(void * t) Line 555 C++
The crash happened in here: https://github.com/openjdk/jdk/blob/8df3f3d3417bc8fdb5a75d986e084441bbf6ebd2/src/hotspot/share/utilities/permitForbiddenFunctions.hpp#L55
When the above calls ::exit, on Windows, it calls the destructors of globally allocated C++ objects. One of such objects is SerialFullGC::_preserved_overflow_stack_set
https://github.com/openjdk/jdk/blob/8df3f3d3417bc8fdb5a75d986e084441bbf6ebd2/src/hotspot/share/gc/serial/serialFullGC.cpp#L80
As a result, the PreservedMarkSet destructor is called. Apparently, in some rare occasions, the following assert will fail.
# Internal Error (open\src\hotspot\share\gc/shared/preservedMarks.hpp:127), pid=17780, tid=52560
# assert(_stacks == nullptr && _num == 0) failed: stacks should have been reclaimed
This is probably a latent bug with SerialFullGC::_preserved_overflow_stack_set that gets triggered more easily with this particular test scenario.
I reproduced the error on Windows in a loop:
cygwin> while true; do date; java -XX:+UseSerialGC -XX:-UseCompressedOops -Xmx2m -Xlog:cds,gc*:file=log.txt -XX:ObjectAlignmentInBytes=64 -XX:+ShowMessageBoxOnError --version; done
[External Code]
[Inline Frame] jvm.dll!os::message_box(const char *) Line 4425 C++
jvm.dll!os::start_debugging(char * buf, int buflen) Line 5913 C++
jvm.dll!VMError::show_message_box(char * buf, int buflen) Line 2052 C++
jvm.dll!VMError::report_and_die(int id, const char * message, const char * detail_fmt, char * detail_args, Thread * thread, unsigned char * pc, const void * siginfo, const void * context, const char * filename, int lineno, unsigned __int64 size) Line 1743 C++
jvm.dll!report_vm_error(const char * file, int line, const char * error_msg, const char * detail_fmt, ...) Line 196 C++
[External Code]
> jvm.dll!permit_forbidden_function::exit(int status) Line 55 C++
jvm.dll!exit_process_or_thread(Ept what, int exit_code) Line 4399 C++
jvm.dll!os::abort(bool dump_core, const void * siginfo, const void * context) Line 1382 C++
jvm.dll!os::abort(bool dump_core) Line 854 C++
jvm.dll!vm_abort(bool dump_core) Line 628 C++
jvm.dll!vm_exit_during_initialization(Handle exception) Line 689 C++
jvm.dll!ExceptionMark::~ExceptionMark() Line 598 C++
jvm.dll!AOTStreamedHeapLoader::materialize_objects() Line 864 C++
jvm.dll!AOTThread::aot_thread_entry(JavaThread * jt, JavaThread * __the_thread__) Line 112 C++
jvm.dll!JavaThread::thread_main_inner() Line 777 C++
jvm.dll!Thread::call_run() Line 247 C++
jvm.dll!thread_native_entry(void * t) Line 555 C++
The crash happened in here: https://github.com/openjdk/jdk/blob/8df3f3d3417bc8fdb5a75d986e084441bbf6ebd2/src/hotspot/share/utilities/permitForbiddenFunctions.hpp#L55
When the above calls ::exit, on Windows, it calls the destructors of globally allocated C++ objects. One of such objects is SerialFullGC::_preserved_overflow_stack_set
https://github.com/openjdk/jdk/blob/8df3f3d3417bc8fdb5a75d986e084441bbf6ebd2/src/hotspot/share/gc/serial/serialFullGC.cpp#L80
As a result, the PreservedMarkSet destructor is called. Apparently, in some rare occasions, the following assert will fail.
# Internal Error (open\src\hotspot\share\gc/shared/preservedMarks.hpp:127), pid=17780, tid=52560
# assert(_stacks == nullptr && _num == 0) failed: stacks should have been reclaimed
This is probably a latent bug with SerialFullGC::_preserved_overflow_stack_set that gets triggered more easily with this particular test scenario.
- relates to
-
JDK-8373112 Test runtime/cds/appcds/TestSerialGCWithCDS.java#id1 failed: hotspot crashed with streaming oops
-
- Open
-