JDK-8227410 : jvmti/scenarios/hotswap/HS101/hs101t005 crashes with SIGSEGV
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 13,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: linux,windows
  • CPU: x86_64
  • Submitted: 2019-07-08
  • Updated: 2022-07-02
  • Resolved: 2022-07-02
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 19
19Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
The following test failed in the JDK13 CI:

vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.java

Here's a snippet from the log:

----------System.out:(22/2897)----------
run [ExecDriver, --java, -Xss2m, -agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call, nsk.jvmti.scenarios.hotswap.HS101.hs101t005]
exec [/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java, -XX:MaxRAMPercentage=6, -Xcomp, -XX:+CreateCoredumpOnCrash, -ea, -esa, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -server, -XX:-TieredCompilation, -cp, /scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.d:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/test/lib, -Djava.library.path=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.test/hotspot/jtreg/native, -Xss2m, -agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call, nsk.jvmti.scenarios.hotswap.HS101.hs101t005]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f7ebee71b0e, pid=24062, tid=24081
#
# JRE version: Java(TM) SE Runtime Environment (13.0) (fastdebug build 13-ea+0-1424)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 13-ea+0-1424, compiled mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x12f8b0e]  Method::checked_resolve_jmethod_id(_jmethodID*)+0xe
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/scratch/0/hs_err_pid24062.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 24081
Dumping core ...
----------System.err:(18/5962)----------
java.lang.AssertionError: [/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java, -XX:MaxRAMPercentage=6, -Xcomp, -XX:+CreateCoredumpOnCrash, -ea, -esa, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -server, -XX:-TieredCompilation, -cp, /scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.d:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/test/lib, -Djava.library.path=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.test/hotspot/jtreg/native, -Xss2m, -agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call, nsk.jvmti.scenarios.hotswap.HS101.hs101t005] exit code is 134
	at ExecDriver.main(ExecDriver.java:137)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at PropertyResolvingWrapper.main(PropertyResolvingWrapper.java:104)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:830)

JavaTest Message: Test threw exception: java.lang.AssertionError: [/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java, -XX:MaxRAMPercentage=6, -Xcomp, -XX:+CreateCoredumpOnCrash, -ea, -esa, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -server, -XX:-TieredCompilation, -cp, /scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.d:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/test/lib, -Djava.library.path=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.test/hotspot/jtreg/native, -Xss2m, -agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call, nsk.jvmti.scenarios.hotswap.HS101.hs101t005] exit code is 134
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: [/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.jdk/jdk-13/fastdebug/bin/java, -XX:MaxRAMPercentage=6, -Xcomp, -XX:+CreateCoredumpOnCrash, -ea, -esa, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -server, -XX:-TieredCompilation, -cp, /scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.d:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/vmTestbase:/scratch/opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S634/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/424edd42-7aca-48eb-81eb-b1e675aff901/runs/894d40a1-7be3-4bfe-9c11-9813f2d0826a/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick/classes/2/test/lib, -Djava.library.path=/scratch/opt/mach5/mesos/work_dir/jib-master/install/jdk-13-1424/linux-x64-debug.test/hotspot/jtreg/native, -Xss2m, -agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call, nsk.jvmti.scenarios.hotswap.HS101.hs101t005] exit code is 134
----------rerun:(40/7386)*----------
Comments
We do not see this problem for more than year. Closing it as a dup of JDK-8245877. As this issue could still show up without fix of JDK-8245877.
02-07-2022

I have done several thousands of mach5 runs on 3 platforms but was not able to reproduce this issue. It is possible that Coleen is right and this bug was fixed with one of the listed updates. Moving this to 19 to complete this analysis.
30-11-2021

This problem and the one in JDK-8181110 could have been fixed with JDK-8245877 and/or JDK-8268524. The nmethod could be zombied and deallocated, so that when JvmtiExport::post_compiled_method_load creates the methodID for nm->method() it could point to junk in the codeCache. Therefore the methodID contains junk (not zero), and jvmti_GetMethodName is called here in the test in HotSwap.cpp: static void JNICALL CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, const void* code_addr, jint map_length, const jvmtiAddrLocationMap* map, const void* compile_info) { char *name = NULL; char *signature = NULL; CompiledMethodLoadEventsCount++; if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; }
30-06-2021

This failure is not well reproducible. Moved to 18.
10-06-2021

These two bugs also showed up when I looked for failures related to Method::checked_resolve_jmethod_id: JDK-8181110 jvmti/hotswap test crashes in Method::checked_resolve_jmethod_id(_jmethodID*) JDK-8213466 Method::checked_resolve_jmethod_id() could do better checks
04-03-2021

Here's a log file snippet for the jdk-17+12-910-tier6 sighting: #section:main ----------messages:(4/402)---------- command: main -Xss2m -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=interpreted,bci=call nsk.jvmti.scenarios.hotswap.HS101.hs101t005 reason: User specified action: run main/othervm/native -Xss2m -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=interpreted,bci=call nsk.jvmti.scenarios.hotswap.HS101.hs101t005 Mode: othervm [/othervm specified] elapsed time (seconds): 37.713 ----------configuration:(0/0)---------- ----------System.out:(18/984)*---------- # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fff2c5dbf94, pid=70340, tid=36928 # # JRE version: Java(TM) SE Runtime Environment (17.0+12) (fastdebug build 17-ea+12-LTS-910) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-ea+12-LTS-910, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, windows-amd64) # Problematic frame: # V [jvm.dll+0xa2bf94] Method::checked_resolve_jmethod_id+0x14 # # Core dump will be written. Default location: T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick\\scratch\\0\\hs_err_pid70340.mdmp # # An error report file with more information is saved as: # T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti_quick\\scratch\\0\\hs_err_pid70340.log # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # ----------System.err:(0/0)---------- ----------rerun:(50/6896)*---------- Here's the crashing thread's stack: --------------- T H R E A D --------------- Current thread (0x0000016e7f689460): JavaThread "Service Thread" daemon [_thread_in_vm, id=36928, stack(0x0000001a34e00000,0x0000001a35000000)] Stack: [0x0000001a34e00000,0x0000001a35000000], sp=0x0000001a34fff5d0, free space=2045k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0xa2bf94] Method::checked_resolve_jmethod_id+0x14 (method.cpp:2285) V [jvm.dll+0x856f4f] jvmti_GetMethodName+0x10f (jvmtiEnter.cpp:4366) C [HotSwap.dll+0x1b5c] siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0xffffffffffffffff
04-03-2021

My mach5 job with 100 runs of the hs101t005 test for all platforms passed successfully. The results are: https://mach5.us.oracle.com/mdash/jobs/sspitsyn-8227410-hs101t005-20200114-2233-8053068 I'm closing this issue as CNR. Please, reopen, if it ever failed again.
15-01-2020

I can not reproduce this issue locally so far. Will try to run mach5 jobs. Current links in the bug report can not be resolved anymore. There is even no stack trace to look at.
14-01-2020