openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

jdk_lang_j9_0_FAILED java/lang/Thread/virtual/ThreadAPI.java InterruptedException at java.base/java.lang.Object.waitImpl(Native Method)

Open JasonFengJ9 opened this issue 6 months ago • 5 comments

Failure link

From https://openj9-jenkins.osuosl.org/job/Test_openjdk24_j9_sanity.openjdk_x86-64_windows_Nightly_testList_2/69/consoleFull (win2019-x64-4)

00:54:53  openjdk version "24.0.1-internal" 2025-04-15
00:54:53  OpenJDK Runtime Environment (build 24.0.1-internal-adhoc.jenkins.buildjdk24x86-64windowsnightly)
00:54:53  Eclipse OpenJ9 VM (build master-ee996187773, JRE 24 Windows Server 2019 amd64-64-Bit Compressed References 20250603_72 (JIT enabled, AOT enabled)
00:54:53  OpenJ9   - ee996187773
00:54:53  OMR      - 556e0fe4b35
00:54:53  JCL      - 801da83621d based on jdk-24.0.1+9)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

00:54:55  Running test jdk_lang_j9_0 ...

00:54:56  variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage Mode501
00:54:56  JVM_OPTIONS:  -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -Xjit -Xgcpolicy:balanced -Xnocompressedrefs -Xverbosegclog 

02:17:19  TEST: java/lang/Thread/virtual/ThreadAPI.java#default

02:17:19  STARTED    ThreadAPI::testInterrupt10 'testInterrupt10()'
02:17:19  java.lang.InternalError: internal error: SeedGenerator thread generated an exception.
02:17:19  	at java.base/sun.security.provider.SeedGenerator$ThreadedSeedGenerator.getSeedByte(SeedGenerator.java:391)
02:17:19  	at java.base/sun.security.provider.SeedGenerator$ThreadedSeedGenerator.getSeedBytes(SeedGenerator.java:375)
02:17:19  	at java.base/sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:144)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.lambda$static$0(AbstractDrbg.java:519)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(AbstractDrbg.java:502)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(AbstractDrbg.java:489)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(AbstractDrbg.java:686)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(AbstractDrbg.java:374)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(AbstractDrbg.java:334)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg$SeederHolder.lambda$static$0(AbstractDrbg.java:553)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(AbstractDrbg.java:502)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(AbstractDrbg.java:489)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(AbstractDrbg.java:686)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(AbstractDrbg.java:374)
02:17:19  	at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(AbstractDrbg.java:334)
02:17:19  	at java.base/sun.security.provider.DRBG.engineNextBytes(DRBG.java:228)
02:17:19  	at java.base/java.security.SecureRandom.nextBytes(SecureRandom.java:787)
02:17:19  	at java.base/java.security.SecureRandom.next(SecureRandom.java:843)
02:17:19  	at java.base/java.util.Random.nextInt(Random.java:552)
02:17:19  	at java.base/sun.nio.ch.UnixDomainSockets.generateTempName(UnixDomainSockets.java:112)
02:17:19  	at java.base/sun.nio.ch.ServerSocketChannelImpl.unixBind(ServerSocketChannelImpl.java:311)
02:17:19  	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:295)
02:17:19  	at java.base/java.nio.channels.ServerSocketChannel.bind(ServerSocketChannel.java:221)
02:17:19  	at java.base/sun.nio.ch.PipeImpl.createListener(PipeImpl.java:208)
02:17:19  	at java.base/sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:118)
02:17:19  	at java.base/sun.nio.ch.PipeImpl$Initializer.init(PipeImpl.java:78)
02:17:19  	at java.base/sun.nio.ch.PipeImpl.<init>(PipeImpl.java:186)
02:17:19  	at java.base/sun.nio.ch.WEPollSelectorImpl.<init>(WEPollSelectorImpl.java:78)
02:17:19  	at java.base/sun.nio.ch.WEPollSelectorProvider.openSelector(WEPollSelectorProvider.java:33)
02:17:19  	at java.base/java.nio.channels.Selector.open(Selector.java:295)
02:17:19  	at ThreadAPI.lambda$testInterrupt10$0(ThreadAPI.java:919)
02:17:19  	at jdk.test.lib.thread.VThreadRunner.lambda$run$0(VThreadRunner.java:66)
02:17:19  	at java.base/java.lang.VirtualThread.run(VirtualThread.java:472)
02:17:19  Caused by: java.lang.InterruptedException
02:17:19  	at java.base/java.lang.Object.waitImpl(Native Method)
02:17:19  	at java.base/java.lang.Object.wait(Object.java:258)
02:17:19  	at java.base/java.lang.Object.wait(Object.java:190)
02:17:19  	at java.base/sun.security.provider.SeedGenerator$ThreadedSeedGenerator.getSeedByte(SeedGenerator.java:386)
02:17:19  	... 32 more
02:17:19  FAILED     ThreadAPI::testInterrupt10 'testInterrupt10()'

02:17:19  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: JUnit test failure
02:17:19  --------------------------------------------------
02:17:31  TEST: java/lang/Thread/virtual/ThreadAPI.java#no-vmcontinuations

02:17:31  [ JUnit Containers: found 15, started 15, succeeded 15, failed 0, aborted 0, skipped 0]
02:17:31  [ JUnit Tests: found 143, started 142, succeeded 141, failed 1, aborted 0, skipped 1]

02:28:55  jdk_lang_j9_0_FAILED

50x grinder - https://openj9-jenkins.osuosl.org/job/Grinder/4370/ - failed at win2019-x64-4 same machine as the original failure

JasonFengJ9 avatar Jun 04 '25 13:06 JasonFengJ9

fyi @tajila, https://github.com/eclipse-openj9/openj9/pull/21982 updates Object::wait and might be the culprit for this failure.

babsingh avatar Jun 04 '25 20:06 babsingh

I think this test may be invalid, but Ill experiment with RI to confirm

tajila avatar Jun 05 '25 14:06 tajila

@JasonFengJ9 Has this issue been reproduced? I have a hard time reproducing on non-Windows platforms

tajila avatar Jun 11 '25 14:06 tajila

@tajila ~It seems this InterruptedException occurred only on win2019-x64-4~. Also failed at win2019-x64-3 - https://openj9-jenkins.osuosl.org/job/Test_openjdk24_j9_sanity.openjdk_x86-64_windows_Nightly_testList_2/74/consoleFull Launched a grinder https://openj9-jenkins.osuosl.org/job/Grinder/4385/console on this machine against RI.

11:45:24  F:\Users\jenkins\workspace\Grinder\aqa-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread\virtual\LockingMode.java:40: error: package com.ibm.oti.vm does not exist
11:45:24          return !com.ibm.oti.vm.VM.isYieldBlockedVirtualThreadsEnabled();

Restored OpenJDK test\jdk\java\lang\Thread\virtual\LockingMode.java and run at https://openj9-jenkins.osuosl.org/job/Grinder/4393/consoleFull

14:54:43  Exception in thread "" java.lang.ExceptionInInitializerError
14:54:43  	at ThreadAPI.lambda$testGetStackTraceTimedWaiting$0(ThreadAPI.java:2226)
14:54:43  	at java.base/java.lang.VirtualThread.run(VirtualThread.java:466)
14:54:43  Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 62: F:\Users\jenkins\workspace\Grinder\jdkbinary\j2sdk-image\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;F:\cygwin64\bin;C:\Program Files\Semeru\jdk-21.0.6.7-openj9\bin;F:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\IncrediBuild;F:\apache-ant-1.10.5\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Strawberry\perl\bin;C:\openjdk\jdk-8\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.
14:54:43  	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
14:54:43  	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
14:54:43  	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
14:54:43  	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
14:54:43  	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:203)
14:54:43  	at java.base/java.nio.file.Path.of(Path.java:148)
14:54:43  	at jdk.test.lib.thread.VThreadPinner.<clinit>(VThreadPinner.java:46)
14:54:43  	... 2 more

This test can't be run w/ RI.

JasonFengJ9 avatar Jun 11 '25 14:06 JasonFengJ9

Test does not pass on windows 19 with J9 or RI

tajila avatar Jun 16 '25 22:06 tajila