JDK-8231627 : ThreadsListHandleInErrorHandlingTest.java fails in printing all threads
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-09-30
  • Updated: 2021-02-11
  • Resolved: 2021-01-06
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 17
17 b05Fixed
Related Reports
Blocks :  
Blocks :  
Duplicate :  
Relates :  
Relates :  
Description
Test runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java

fails to find a pattern 
"=>.* JavaThread \"main\" .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=0.*"

Basically it fails because stacktrace was not generated.

Threads class SMR info:
_java_thread_list=0x00007fd7540a4b70, length=11, elements={
0x00007fd7ac022000, 0x00007fd7ac209000, 0x00007fd7ac20b800, 0x00007fd7ac214800,
0x00007fd7ac217800, 
[error occurred during error reporting (printing all threads), id 0xb, SIGSEGV (0xb) at pc=0x00007fd7b319370a]

VM state:not at safepoint (normal execution)
Comments
Changeset: c0540ffd Author: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2021-01-06 14:34:55 +0000 URL: https://git.openjdk.java.net/jdk/commit/c0540ffd
06-01-2021

This fix depends on: JDK-8258284 clean up issues with nested ThreadsListHandles JDK-8256383 PlatformMutex::try_lock has different semantics on Windows and Posix
18-12-2020

Here's the log files for my jdk-15+25 stress testing sighting: $ unzip -l jdk-15+25_linux.8231627.zip Archive: jdk-15+25_linux.8231627.zip Length Date Time Name --------- ---------- ----- ---- 49836 2020-05-31 05:52 jdk-15+25_3/failures.linux-x86_64/hs_err_pid22569.log 14823 2020-05-31 05:52 jdk-15+25_3/failures.linux-x86_64/ThreadsListHandleInErrorHandlingTest.jtr.fastdebug --------- ------- 64659 2 files Same test, but a slightly different failure mode so here's a snippet from the log file: ----------System.out:(7/1406)---------- Command line: [/work/shared/bug_hunt/thread_SMR_stress/jdk15_exp/build/linux-x86_64-normal-server-fastdebug/images/jdk/bin/java -cp /work/shared/bug_hunt/thread_SMR_stress/jdk15_exp/build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/classes/5/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.d:/work/shared/bug_hunt/thread_SMR_stress/jdk15_exp/open/test/hotspot/jtreg/runtime/ErrorHandling:/work/shared/bug_hunt/thread_SMR_stress/jdk15_exp/build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_hotspot_jtreg_tier1/classes/5/test/lib:/work/shared/bug_hunt/thread_SMR_stress/jdk15_exp/open/test/lib:/work/local/jib-dcubed/install/jtreg/5.0/b01/bundles/jtreg_bin-5.0.zip/jtreg/lib/javatest.jar:/work/local/jib-dcubed/install/jtreg/5.0/b01/bundles/jtreg_bin-5.0.zip/jtreg/lib/jtreg.jar -XX:+UnlockDiagnosticVMOptions -XX:+EnableThreadSMRStatistics -Xmx100M -XX:ErrorHandlerTest=16 -XX:-CreateCoredumpOnCrash -XX:-ShowRegistersOnAssert -version ] [2020-05-31T09:52:07.951104Z] Gathering output for process 22569 Found fatal error header. Found specific fatal error. Found hs_err_pid file. Scanning... Found: Current thread (0x00002ad578033050): JavaThread "main" [_thread_in_vm, id=22570, stack(0x00002ad571ab7000,0x00002ad571bb8000)] _threads_hazard_ptr=0x00002ad5782b7e00, _nested_threads_hazard_ptr_cnt=0. Found: Threads class SMR info:. ----------System.err:(13/948)---------- java.lang.RuntimeException: hs_err_pid file incomplete (first missing pattern: 2) at ThreadsListHandleInErrorHandlingTest.main(ThreadsListHandleInErrorHandlingTest.java:115) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:832) JavaTest Message: Test threw exception: java.lang.RuntimeException: hs_err_pid file incomplete (first missing pattern: 2) JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.RuntimeException: hs_err_pid file incomplete (first missing pattern: 2) ----------rerun:(33/4156)*---------- I've attached the hs_err_pid file that was being parsed to see why pattern "2" might be missing.
01-06-2020

ILW = MLM = P4
01-10-2019

Failure is highly intermittent.
30-09-2019