JDK-8223190 : Test gc/arguments/TestShrinkHeapInSteps.java breaks with change for JDK-8074355
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-05-01
  • Updated: 2019-08-01
  • Resolved: 2019-05-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b19Fixed
Related Reports
Relates :  
Relates :  
Description
make test TEST=gc/arguments/TestShrinkHeapInSteps.java JTREG="VM_OPTIONS=-XX:+UseConcMarkSweepGC"

Gets assert:

Crash: Internal Error ...mutex.cpp...assert(thread->is_Java_thread() || !do_safepoint_check || _safepoint_check_required != Monitor::_safepoint_check_never) failed: NonJavaThread should not check for safepoint

David didn't like the assert so I'll remove it.  There are some CMS locks that are safepoint_check_never but are acquired without _no_safepoint_check_flag and I haven't been able to non-intermittently find them all.
Comments
Here's a snippet of the failing hs_err_pid: --------------- T H R E A D --------------- Current thread (0x000000b4f96c7000): ConcurrentGCThread "CMS Main Thread" [stack: 0x000000b4fcda0000,0x000000b4fcea0000] [id=6484] Stack: [0x000000b4fcda0000,0x000000b4fcea0000] Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0xa773d1] os::platform_print_native_stack+0xf1 (os_windows_x86.cpp:369) V [jvm.dll+0xc79a51] VMError::report+0xea1 (vmerror.cpp:701) V [jvm.dll+0xc7b2a3] VMError::report_and_die+0x873 (vmerror.cpp:1490) V [jvm.dll+0xc7b924] VMError::report_and_die+0x64 (vmerror.cpp:1288) V [jvm.dll+0x4f25e2] report_vm_error+0x102 (debug.cpp:264) V [jvm.dll+0xa2e645] Monitor::check_safepoint_state+0xc5 (mutex.cpp:45) V [jvm.dll+0xa2e80b] Monitor::lock+0x2b (mutex.cpp:60) V [jvm.dll+0x4d96d8] CMSPrecleanRefsYieldClosure::should_return+0x178 (concurrentmarksweepgeneration.cpp:6971) V [jvm.dll+0xaf8ea9] ReferenceProcessor::preclean_discovered_references+0x149 (referenceprocessor.cpp:1246) V [jvm.dll+0x4d4fe2] CMSCollector::preclean_work+0x2f2 (concurrentmarksweepgeneration.cpp:3831) V [jvm.dll+0x4d3a97] CMSCollector::preclean+0x167 (concurrentmarksweepgeneration.cpp:3668) V [jvm.dll+0x4c5f63] CMSCollector::collect_in_background+0x743 (concurrentmarksweepgeneration.cpp:1825) V [jvm.dll+0x4dde7f] ConcurrentMarkSweepThread::run_service+0x19f (concurrentmarksweepthread.cpp:85) V [jvm.dll+0x4abe03] ConcurrentGCThread::run+0x33 (concurrentgcthread.cpp:53) V [jvm.dll+0xc16db2] Thread::call_run+0x192 (thread.cpp:405) V [jvm.dll+0xa75ede] thread_native_entry+0x10e (os_windows.cpp:471) C [ucrtbase.DLL+0x203ba] C [KERNEL32.DLL+0x13d2] C [ntdll.dll+0x154f4] I'm attaching the hs_err_pid file.
01-05-2019