JDK-8259525 : runtime/cds/appcds/CDSandJFR.java failed with "exitValue = -1073741819"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2021-01-10
  • Updated: 2025-01-20
  • Resolved: 2025-01-17
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 20
20Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The following test failed in the JDK17 CI:

runtime/cds/appcds/CDSandJFR.java

Here's a snippet from the log file:

#section:main
----------messages:(4/165)----------
command: main CDSandJFR
reason: User specified action: run main/othervm/timeout=500 CDSandJFR 
Mode: othervm [/othervm specified]
elapsed time (seconds): 10.699
----------configuration:(0/0)----------
----------System.out:(27/5599)*----------
Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\windows-x64-debug.jdk\\jdk-17\\fastdebug\\bin\\java.exe -cp T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\runtime\\cds\\appcds\\CDSandJFR.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\hotspot\\jtreg\\runtime\\cds\\appcds;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\lib;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\hotspot\\jtreg\\runtime\\cds\\appcds;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\hotspot\\jtreg\\runtime\\cds\\appcds\\test-classes;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\hotspot\\jtreg\\runtime\\cds\\appcds\\test-classes;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\runtime\\cds\\appcds\\test-classes;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\javatest.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\jtreg.jar -XX:MaxRAMPercentage=4 -Djava.io.tmpdir=t:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\tmp -XX:+CreateCoredumpOnCrash -XX:+UseG1GC -cp T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\CDSandJFR.jar -Xshare:dump -Xlog:cds -XX:SharedArchiveFile=T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\appcds-05h17m01s674.jsa -XX:ExtraSharedClassListFile=T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\runtime.cds.appcds.CDSandJFR.java-test.classlist ]
[2021-01-10T05:17:02.041280700Z] Gathering output for process 21936
[ELAPSED: 2402 ms]
[logging stdout to T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\runtime.cds.appcds.CDSandJFR.java-0000-dump.stdout]
[logging stderr to T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\runtime.cds.appcds.CDSandJFR.java-0000-dump.stderr]
[STDERR]

[2021-01-10T05:17:04.185915900Z] Waiting for completion for process 21936
[2021-01-10T05:17:04.201546800Z] Waiting for completion finished for process 21936
[2021-01-10T05:17:04.217171200Z] Waiting for completion for process 21936
[2021-01-10T05:17:04.217171200Z] Waiting for completion finished for process 21936
Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\windows-x64-debug.jdk\\jdk-17\\fastdebug\\bin\\java.exe -cp T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\runtime\\cds\\appcds\\CDSandJFR.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\hotspot\\jtreg\\runtime\\cds\\appcds;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\lib;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\hotspot\\jtreg\\runtime\\cds\\appcds;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\test\\hotspot\\jtreg\\runtime\\cds\\appcds\\test-classes;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-17+5-210\\src.full\\open\\test\\hotspot\\jtreg\\runtime\\cds\\appcds\\test-classes;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\classes\\3\\runtime\\cds\\appcds\\test-classes;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\javatest.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\5.1\\b01\\bundles\\jtreg_bin-5.1.zip\\jtreg\\lib\\jtreg.jar -XX:MaxRAMPercentage=4 -Djava.io.tmpdir=t:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\tmp -XX:+CreateCoredumpOnCrash -XX:+UseG1GC -Xshare:on -showversion -XX:SharedArchiveFile=T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\appcds-05h17m01s674.jsa -Dtest.timeout.factor=10.0 -cp T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\CDSandJFR.jar -XX:StartFlightRecording=dumponexit=true Hello ]
[2021-01-10T05:17:04.266422500Z] Gathering output for process 13480
[ELAPSED: 6503 ms]
[logging stdout to T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\runtime.cds.appcds.CDSandJFR.java-0001-exec.stdout]
[logging stderr to T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_runtime\\scratch\\0\\runtime.cds.appcds.CDSandJFR.java-0001-exec.stderr]
[STDERR]
java version "17-ea" 2021-09-14 LTS
Java(TM) SE Runtime Environment (fastdebug build 17-ea+5-LTS-210)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 17-ea+5-LTS-210, mixed mode, sharing)

[2021-01-10T05:17:10.720246400Z] Waiting for completion for process 13480
[2021-01-10T05:17:10.751701500Z] Waiting for completion finished for process 13480
[2021-01-10T05:17:10.751701500Z] Waiting for completion for process 13480
[2021-01-10T05:17:10.751701500Z] Waiting for completion finished for process 13480
[2021-01-10T05:17:10.767060800Z] Waiting for completion for process 13480
[2021-01-10T05:17:10.767060800Z] Waiting for completion finished for process 13480
----------System.err:(30/1531)----------
 stdout: [Started recording 1. No limit specified, using maxsize=250MB as default.

Use jcmd 13480 JFR.dump name=1 filename=FILEPATH to copy recording data to file.
Hello World
];
 stderr: [java version "17-ea" 2021-09-14 LTS
Java(TM) SE Runtime Environment (fastdebug build 17-ea+5-LTS-210)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 17-ea+5-LTS-210, mixed mode, sharing)
]
 exitValue = -1073741819

java.lang.RuntimeException: Expected to get exit value of [0]

	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:474)
	at jdk.test.lib.cds.CDSTestUtils.checkExec(CDSTestUtils.java:454)
	at jdk.test.lib.cds.CDSTestUtils.checkExec(CDSTestUtils.java:443)
	at CDSandJFR.test(CDSandJFR.java:68)
	at CDSandJFR.main(CDSandJFR.java:56)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	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:831)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

Comments
Is the recording being dumped in a location that's not exempt from the virus scanner?
13-01-2021

Is this similar to JDK-8253437? In that bug, there's evidence that virus scan was running. See the following comment: https://bugs.openjdk.java.net/browse/JDK-8253437?focusedCommentId=14389651&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14389651
13-01-2021

exitValue = -1073741819 is C0000005, which is Access Violation. It looks like this happens after the Java program has finished execution and the VM is exiting. During this time, JFR dumps the recording (-XX:StartFlightRecording=dumponexit=true). JFR seems to have successfully dumped the recording. I tried to print the hotspot-pid-13480-id-1-2021_01_10_05_17_09.jfr file and it didn't show any error: $ jfr print test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/runtime/cds/appcds/CDSandJFR/hotspot-pid-13480-id-1-2021_01_10_05_17_09.jfr .... jdk.GCConfiguration { startTime = 05:17:09.401 youngCollector = "G1New" oldCollector = "G1Old" parallelGCThreads = 10 concurrentGCThreads = 3 usesDynamicGCThreads = true isExplicitGCConcurrent = false isExplicitGCDisabled = false pauseTarget = N/A gcTimeRatio = 12 } $ echo $? 0 Also, we didn't get any hs_err file. So whatever caused the "Access Violation" probable happened after the VM has finished cleaning up.
12-01-2021

ILW = MLM = P4
12-01-2021