JDK-8293813 : ProblemList com/sun/jdi/JdbLastErrorTest.java on windows-x64 in Xcomp mode
  • Type: Sub-task
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-09-14
  • Updated: 2022-09-19
  • Resolved: 2022-09-15
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
20 masterFixed
Related Reports
Relates :  
Relates :  
Description
The following test failed in the JDK20 CI:

com/sun/jdi/JdbLastErrorTest.java

Here's a snippet from the log file:

#section:main
----------messages:(7/337)----------
command: main --enable-preview JdbLastErrorTest
reason: User specified action: run main/othervm --enable-preview JdbLastErrorTest 
started: Wed Sep 14 14:15:55 UTC 2022
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules jdk.jdi
finished: Wed Sep 14 14:17:29 UTC 2022
elapsed time (seconds): 94.039
----------configuration:(3/38)----------
Boot Layer
  add modules: jdk.jdi

----------System.out:(22/2874)*----------
Command line: [c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\windows-x64-debug.jdk\\jdk-20\\fastdebug\\bin\\java.exe -cp C:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\1\\com\\sun\\jdi\\JdbLastErrorTest.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\src.full\\open\\test\\jdk\\com\\sun\\jdi;C:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\1\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\src.full\\open\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7\\1\\bundles\\jtreg-7+1.zip\\jtreg\\lib\\jtreg.jar -Xmx768m -XX:MaxRAMPercentage=4.16667 -Djava.io.tmpdir=c:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\tmp -ea -esa -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation --enable-preview -agentlib:jdwp=transport=dt_socket,server=y,suspend=y TestNativeLastError ]
[debuggee]:c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\windows-x64-debug.jdk\\jdk-20\\fastdebug\\bin\\java.exe -cp C:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\1\\com\\sun\\jdi\\JdbLastErrorTest.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\src.full\\open\\test\\jdk\\com\\sun\\jdi;C:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\classes\\1\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-20+15-1005\\src.full\\open\\test\\lib;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\7\\1\\bundles\\jtreg-7+1.zip\\jtreg\\lib\\jtreg.jar -Xmx768m -XX:MaxRAMPercentage=4.16667 -Djava.io.tmpdir=c:\\sb\\prod\\1663163903\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_jdi\\tmp -ea -esa -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation --enable-preview -agentlib:jdwp=transport=dt_socket,server=y,suspend=y TestNativeLastError
[debuggee] Listening for transport dt_socket at address: 53335
[jdb] Set uncaught java.lang.Throwable
[jdb] Set deferred uncaught java.lang.Throwable
[jdb] Initializing jdb ...
[jdb] 
[jdb] VM Started: > No frames on the current call stack
[jdb] 
[jdb] main[1] 
> run 
[debuggee] 0
[jdb] > 
[jdb] Exception occurred: java.lang.RuntimeException (uncaught)"thread=main", TestNativeLastError.testWindows(), line=68 bci=129
[jdb] 68                    throw new RuntimeException("failed, lastError = " + lastError);
[jdb] 
[jdb] main[1] 
=======================================
Exception thrown during test execution: 'The application exited' missing from stdout/stderr
=======================================
> quit
[debuggee] Listening for transport dt_socket at address: 54691
----------System.err:(46/2235)----------
[debuggee] WARNING: A restricted method in java.lang.foreign.Linker has been called
[debuggee] WARNING: java.lang.foreign.Linker::nativeLinker has been called by the unnamed module
[debuggee] WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module
 stdout: [Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...

VM Started: > No frames on the current call stack

main[1] 
> 
Exception occurred: java.lang.RuntimeException (uncaught)"thread=main", TestNativeLastError.testWindows(), line=68 bci=129
68                    throw new RuntimeException("failed, lastError = " + lastError);

main[1] ];
 stderr: [Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...

VM Started: > No frames on the current call stack

main[1] 
> 
Exception occurred: java.lang.RuntimeException (uncaught)"thread=main", TestNativeLastError.testWindows(), line=68 bci=129
68                    throw new RuntimeException("failed, lastError = " + lastError);

main[1] ]
 exitValue = -1

[debuggee] Exception in thread "main" java.lang.RuntimeException: failed, lastError = 0
[debuggee] 	at TestNativeLastError.testWindows(JdbLastErrorTest.java:68)
[debuggee] 	at TestNativeLastError.main(JdbLastErrorTest.java:49)
java.lang.RuntimeException: 'The application exited' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:340)
	at JdbLastErrorTest.runCases(JdbLastErrorTest.java:95)
	at lib.jdb.JdbTest.run(JdbTest.java:96)
	at JdbLastErrorTest.main(JdbLastErrorTest.java:79)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1589)

JavaTest Message: Test threw exception: java.lang.RuntimeException: 'The application exited' missing from stdout/stderr
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'The application exited' missing from stdout/stderr
----------rerun:(52/5644)*----------

com/sun/jdi/JdbLastErrorTest.java is a new test added by:

JDK-8292302 Windows GetLastError value overwritten by ThreadLocalStorage::thread
Comments
Changeset: bb9aa4ea Author: Kevin Walls <kevinw@openjdk.org> Date: 2022-09-15 21:04:52 +0000 URL: https://git.openjdk.org/jdk/commit/bb9aa4eae61217abe3408eb95fcf4233d62d92c9
15-09-2022

Since you are using this bug to ProblemList the test in Xcomp mode, I've changed it to a subtask of: JDK-8293829 Windows native last error value cleared with -Xcomp or -Xint (but not neither)
15-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10288 Date: 2022-09-15 14:26:16 +0000
15-09-2022

OK - so, that follow-on bug I said I'd log, the same GetLastError clearing/corruption is actually reproducing easily with -Xcomp, not with a GC at the same like I said earlier. So I am about to log that -Xcomp breaks this as well. And this is failing with -Xcomp. So for now, I think this will need to be in ProblemList-Xcomp.txt for now (see JDK-8293829).
15-09-2022

Bumping priority from P4 -> P3 since we just 8 more failures in Tier7 so that's pretty noisy...
14-09-2022

@kevinw - Can you take a look at these failures of your new test? Thanks!
14-09-2022