eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

jdk22 java/foreign/TestStubAllocFailure.java timeout #18938

Closed pshipton closed 7 months ago

pshipton commented 8 months ago

https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK22/10/ - all platforms

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/8/ https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_2/8/ jdk_foreign java/foreign/TestStubAllocFailure.java

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/8/openjdk_test_output.tar.gz

23:33:43  Timeout information:
23:33:43  Running jcmd on process 3770267
23:33:43  Dump written to /home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/aqa-tests/TKG/output_17075363994539/jdk_foreign_0/work/scratch/0/core.20240209.233328.3770267.0001.dmp
23:33:43  Dump written to /home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/aqa-tests/TKG/output_17075363994539/jdk_foreign_0/work/scratch/0/javacore.20240209.233329.3770267.0002.txt
23:33:43  Running jstack on process 3770267
23:33:43  2024-02-09T23:33:30.603945576
23:33:43  Virtual machine: 3770267 JVM information:
23:33:43  JRE 22 Linux aarch64-64-Bit Compressed References 20240210_18 (JIT enabled, AOT enabled)
23:33:43  OpenJ9   - 444d34b7780
23:33:43  OMR      - ac0dab2d211
23:33:43  JCL      - ff0372607f0 based on jdk-22+35
23:33:43  
23:33:43  "main" prio=5 Id=2 WAITING
23:33:43    at java.base@22-internal/java.lang.Object.waitImpl(Native Method)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:255)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:221)
23:33:43    at java.base@22-internal/java.lang.Thread.join(Thread.java:2069)
23:33:43    at java.base@22-internal/java.lang.Thread.join(Thread.java:2145)
23:33:43    at app//com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:85)
23:33:43  
23:33:43  "JIT Compilation Thread-000" prio=10 Id=4 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-001 Suspended" prio=10 Id=5 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-002 Suspended" prio=10 Id=6 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-003 Suspended" prio=10 Id=7 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-004 Suspended" prio=10 Id=8 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-005 Suspended" prio=10 Id=9 RUNNABLE
23:33:43  
23:33:43  "JIT Compilation Thread-006 Suspended" prio=10 Id=10 RUNNABLE
23:33:43  
23:33:43  "JIT Diagnostic Compilation Thread-007 Suspended" prio=10 Id=11 RUNNABLE
23:33:43  
23:33:43  "JIT-SamplerThread" prio=10 Id=12 TIMED_WAITING
23:33:43  
23:33:43  "IProfiler" prio=5 Id=13 RUNNABLE
23:33:43  
23:33:43  "Common-Cleaner" prio=8 Id=3 TIMED_WAITING
23:33:43    at java.base@22-internal/java.lang.Object.waitImpl(Native Method)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:255)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:221)
23:33:43    at java.base@22-internal/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:137)
23:33:43    at java.base@22-internal/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:140)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43    at java.base@22-internal/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186)
23:33:43  
23:33:43  "Concurrent Mark Helper" prio=1 Id=14 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=15 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=16 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=17 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=18 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=19 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=20 RUNNABLE
23:33:43  
23:33:43  "GC Worker" prio=5 Id=21 RUNNABLE
23:33:43  
23:33:43  "Attach API wait loop" prio=10 Id=24 RUNNABLE
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.IPC.waitSemaphore(Native Method)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.CommonDirectory.waitSemaphore(CommonDirectory.java:264)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.WaitLoop.waitForNotification(WaitLoop.java:66)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.WaitLoop.run(WaitLoop.java:157)
23:33:43  
23:33:43  "Finalizer thread" prio=5 Id=25 RUNNABLE
23:33:43  
23:33:43  "MainThread" prio=5 Id=26 WAITING
23:33:43    at java.base@22-internal/jdk.internal.misc.Unsafe.park(Native Method)
23:33:43    at java.base@22-internal/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:500)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.get(FutureTask.java:190)
23:33:43    at app//jdk.test.lib.process.OutputBuffer$LazyOutputBuffer$StreamTask.get(OutputBuffer.java:109)
23:33:43    at app//jdk.test.lib.process.OutputBuffer$LazyOutputBuffer.getStdout(OutputBuffer.java:140)
23:33:43    at app//jdk.test.lib.process.OutputAnalyzer.getStdout(OutputAnalyzer.java:586)
23:33:43    at app//jdk.test.lib.process.OutputAnalyzer.outputTo(OutputAnalyzer.java:557)
23:33:43    at app//UpcallTestHelper.runInNewProcess(UpcallTestHelper.java:60)
23:33:43    at app//TestStubAllocFailure.testUpcallAllocFailure(TestStubAllocFailure.java:49)
23:33:43    at java.base@22-internal/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
23:33:43    at java.base@22-internal/java.lang.reflect.Method.invoke(Method.java:586)
23:33:43    at app//org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
23:33:43    at app//org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
23:33:43    at app//org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
23:33:43    at app//org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
23:33:43    at app//org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
23:33:43    at app//org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
23:33:43    at app//org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
23:33:43    at app//org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
23:33:43    at java.base@22-internal/java.util.ArrayList.forEach(ArrayList.java:1597)
23:33:43    at app//org.testng.TestRunner.privateRun(TestRunner.java:764)
23:33:43    at app//org.testng.TestRunner.run(TestRunner.java:585)
23:33:43    at app//org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
23:33:43    at app//org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
23:33:43    at app//org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
23:33:43    at app//org.testng.SuiteRunner.run(SuiteRunner.java:286)
23:33:43    at app//org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
23:33:43    at app//org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
23:33:43    at app//org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
23:33:43    at app//org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
23:33:43    at app//org.testng.TestNG.runSuites(TestNG.java:1069)
23:33:43    at app//org.testng.TestNG.run(TestNG.java:1037)
23:33:43    at app//com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
23:33:43    at app//com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
23:33:43    at java.base@22-internal/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
23:33:43    at java.base@22-internal/java.lang.reflect.Method.invoke(Method.java:586)
23:33:43    at app//com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43  
23:33:43  "process reaper (pid 3770727)" prio=10 Id=27 RUNNABLE
23:33:43    at java.base@22-internal/java.lang.ProcessHandleImpl.waitForProcessExit0(Native Method)
23:33:43    at java.base@22-internal/java.lang.ProcessHandleImpl$1.run(ProcessHandleImpl.java:163)
23:33:43    at java.base@22-internal/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
23:33:43    at java.base@22-internal/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43    at java.base@22-internal/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186)
23:33:43  
23:33:43  "Thread-5" prio=5 Id=32 RUNNABLE
23:33:43    at java.base@22-internal/java.io.FileInputStream.readBytes(Native Method)
23:33:43    at java.base@22-internal/java.io.FileInputStream.read(FileInputStream.java:287)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:345)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:405)
23:33:43    - locked java.lang.ProcessImpl$ProcessPipeInputStream@332bcce0
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.fill(BufferedInputStream.java:291)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:347)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:399)
23:33:43    at java.base@22-internal/java.io.FilterInputStream.read(FilterInputStream.java:95)
23:33:43    at app//jdk.test.lib.process.StreamPumper.run(StreamPumper.java:111)
23:33:43    at java.base@22-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43  
23:33:43  "Thread-6" prio=5 Id=33 RUNNABLE
23:33:43    at java.base@22-internal/java.io.FileInputStream.readBytes(Native Method)
23:33:43    at java.base@22-internal/java.io.FileInputStream.read(FileInputStream.java:287)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:345)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:405)
23:33:43    - locked java.lang.ProcessImpl$ProcessPipeInputStream@dcbb5f7b
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.fill(BufferedInputStream.java:291)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:347)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:399)
23:33:43    at java.base@22-internal/java.io.FilterInputStream.read(FilterInputStream.java:95)
23:33:43    at app//jdk.test.lib.process.StreamPumper.run(StreamPumper.java:111)
23:33:43    at java.base@22-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43  
23:33:43  "Thread-7" prio=5 Id=34 RUNNABLE
23:33:43    at java.base@22-internal/java.lang.Object.waitImpl(Native Method)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:255)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:221)
23:33:43    at app//jdk.test.lib.process.ProcessTools$BufferOutputStream.readNext(ProcessTools.java:195)
23:33:43    - locked jdk.test.lib.process.ProcessTools$BufferOutputStream@a7e6a6bc
23:33:43    at app//jdk.test.lib.process.ProcessTools$BufferInputStream.read(ProcessTools.java:218)
23:33:43    at java.base@22-internal/java.io.InputStream.read(InputStream.java:296)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.fill(BufferedInputStream.java:291)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:347)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:399)
23:33:43    at java.base@22-internal/java.io.FilterInputStream.read(FilterInputStream.java:95)
23:33:43    at app//jdk.test.lib.process.StreamPumper.run(StreamPumper.java:111)
23:33:43    at java.base@22-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43  
23:33:43  "Thread-8" prio=5 Id=35 TIMED_WAITING
23:33:43    at java.base@22-internal/java.lang.Object.waitImpl(Native Method)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:255)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:221)
23:33:43    at app//jdk.test.lib.process.ProcessTools$BufferOutputStream.readNext(ProcessTools.java:195)
23:33:43    at app//jdk.test.lib.process.ProcessTools$BufferInputStream.read(ProcessTools.java:218)
23:33:43    at java.base@22-internal/java.io.InputStream.read(InputStream.java:287)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.fill(BufferedInputStream.java:291)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read1(BufferedInputStream.java:347)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420)
23:33:43    at java.base@22-internal/java.io.BufferedInputStream.read(BufferedInputStream.java:399)
23:33:43    at java.base@22-internal/java.io.FilterInputStream.read(FilterInputStream.java:95)
23:33:43    at app//jdk.test.lib.process.StreamPumper.run(StreamPumper.java:111)
23:33:43    at java.base@22-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
23:33:43    at java.base@22-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
23:33:43    at java.base@22-internal/java.lang.Thread.run(Thread.java:1582)
23:33:43  
23:33:43  "file lock watchdog" prio=10 Id=37 TIMED_WAITING
23:33:43    at java.base@22-internal/java.lang.Object.waitImpl(Native Method)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:255)
23:33:43    at java.base@22-internal/java.lang.Object.wait(Object.java:221)
23:33:43    at java.base@22-internal/java.util.TimerThread.mainLoop(Timer.java:607)
23:33:43    at java.base@22-internal/java.util.TimerThread.run(Timer.java:548)
23:33:43  
23:33:43  "Attachment portNumber: 42865" prio=10 Id=40 RUNNABLE
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.DiagnosticUtils.dumpAllThreadsImpl(Native Method)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.DiagnosticUtils.getThreadInfo(DiagnosticUtils.java:249)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.DiagnosticUtils.executeDiagnosticCommand(DiagnosticUtils.java:185)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.Attachment.doCommand(Attachment.java:251)
23:33:43    at java.base@22-internal/openj9.internal.tools.attach.target.Attachment.run(Attachment.java:161)
23:33:43  
23:33:43  
23:33:43  --- Timeout information end.

@ChengJin01 fyi

ChengJin01 commented 8 months ago

This is a newly added test suite in JDK22 which we will need to investigate to see what happens in there. Will spend time later this week to take a look if possible.

ChengJin01 commented 7 months ago

1) Looking at the test suite at https://github.com/ibmruntimes/openj9-openjdk-jdk22/blob/openj9/test/jdk/java/foreign/TestStubAllocFailure.java

    @Test
    public void testUpcallAllocFailure() throws IOException, InterruptedException {
        runInNewProcess(UpcallRunner.class, true, List.of("-XX:ReservedCodeCacheSize=3M"), List.of())
                .shouldNotHaveExitValue(0)  <-------- verify whether the return code != 0
                .shouldNotHaveFatalError();
    }

    @Test
    public void testUDowncallAllocFailure() throws IOException, InterruptedException {
        runInNewProcess(DowncallRunner.class, true, List.of("-XX:ReservedCodeCacheSize=3M"), List.of())
                .shouldNotHaveExitValue(0) <-------- verify whether the return code != 0
                .shouldNotHaveFatalError();
    }

it indicates the intention of the downcall & upcall test is to check whether the test ends up with non-zero code when specifying -XX:ReservedCodeCacheSize=3M which is the maximum size for the Hotspot JIT compiler's code cache, as explained at https://docs.oracle.com/javase/8/embedded/develop-apps-platforms/codecache.htm, That being said, the test suite is intended for Hostpot which is meaningless as the underlying FFI implementation in OpenJ9 is totally different from Hotspot.

2) Secondly, the failing outputs in the description happened in the upcall test at https://github.com/ibmruntimes/openj9-openjdk-jdk22/blob/687a1453366566440768237f7c69361b2ec21406/test/jdk/java/foreign/TestStubAllocFailure.java#L66

    public static class UpcallRunner extends NativeTestHelper {
        public static void main(String[] args) throws Throwable {
            FunctionDescriptor descriptor = FunctionDescriptor.ofVoid();
            MethodHandle target = MethodHandles.lookup().findStatic(UpcallRunner.class, "target", descriptor.toMethodType());
            while (true) { <------ an infinite loop of allocating the upcall thunk memory in OpenJ9
                LINKER.upcallStub(target, descriptor, Arena.ofAuto()); 
            }
        }

which was in the process of allocating the upcall memory for the thunk in OpenJ9 unless there was no native memory available for allocation as indicated in debugging the upcall test:

Thread 2 (Thread 0x7f1b3ea09700 (LWP 573053)):
#0  0x00007f1b3e4afbe6 in VM_AtomicSupport::nop () at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/omr/include_core/AtomicSupport.hpp:166
#1  0x00007f1b3e4afa29 in omrthread_spinlock_acquire (self=0x7f1b380071a0, monitor=0x7f1b38080938) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/omr/thread/common/threadhelpers.cpp:106
#2  0x00007f1b3e4a6c8a in monitor_enter_three_tier (self=0x7f1b380071a0, monitor=0x7f1b38080938, isAbortable=0) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/omr/thread/common/omrthread.c:3998
#3  0x00007f1b3e4a6930 in omrthread_monitor_enter (monitor=0x7f1b38080938) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/omr/thread/common/omrthread.c:3837
------> #4  0x00007f1b3e5a96df in allocateUpcallThunkMemory (data=0x7f1b38e1c830) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/UpcallThunkMem.cpp:70
#5  0x00007f1b3e78797e in createUpcallThunk (metaData=0x7f1b38e1c830) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/xa64/UpcallThunkGen.cpp:947
#6  0x00007f1b3e58194f in OutOfLineINL_openj9_internal_foreign_abi_InternalUpcallHandler_allocateUpcallStub (currentThread=0x1aa00, method=0x3098b0) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalUpcallHandler.cpp:144
#7  0x00007f1b3e5ef7df in VM_BytecodeInterpreterCompressed::outOfLineINL (this=0x7f1b3ea08740, _sp=@0x7f1b3ea086c0: 0x1308e0, _pc=@0x7f1b3ea086c8: 0x7f1b3e8715a0 <VM_BytecodeInterpreterCompressed::nativeReturnBytecodePC(unsigned long*&, unsigned char*&, J9ROMMethod*)::returnFromNativeBytecodes+32> "\270") at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/BytecodeInterpreter.hpp:5564
#8  0x00007f1b3e604524 in VM_BytecodeInterpreterCompressed::run (this=0x7f1b3ea08740, vmThread=0x1aa00) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/BytecodeInterpreter.hpp:11082
#9  0x00007f1b3e5d73f6 in bytecodeLoopCompressed (currentThread=0x1aa00) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/BytecodeInterpreter.inc:112
#10 0x00007f1b3e78a0a2 in c_cInterpreter () at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/build/linux-x86_64-server-release/vm/runtime/vm/xcinterp.s:158
#11 0x00007f1b3e4ea0ae in runCallInMethod (env=0x1aa00, receiver=0x0, clazz=0x130ee0, methodID=0x7f1b38273e18, args=0x7f1b3ea08d58) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/callin.cpp:1174
#12 0x00007f1b3e53242f in gpProtectedRunCallInMethod (entryArg=0x7f1b3ea08cf0) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/jnicsup.cpp:300
#13 0x00007f1b3e7a4b98 in signalProtectAndRunGlue (portLibrary=0x7f1b3e9860e0 <j9portLibrary>, userData=0x7f1b3ea08ca0) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/util/jniprotect.c:45
#14 0x00007f1b3e2ddfaa in omrsig_protect (portLibrary=0x7f1b3e9860e0 <j9portLibrary>, fn=0x7f1b3e7a4b68 <signalProtectAndRunGlue>, fn_arg=0x7f1b3ea08ca0, handler=0x7f1b3e527981 <structuredSignalHandler>, handler_arg=0x1aa00, flags=506, result=0x7f1b3ea08c88) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/omr/port/unix/omrsignal.c:425
#15 0x00007f1b3e7a4d01 in gpProtectAndRun (function=0x7f1b3e5323ce <gpProtectedRunCallInMethod(void*)>, env=0x1aa00, args=0x7f1b3ea08cf0) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/util/jniprotect.c:78
#16 0x00007f1b3e5329d6 in gpCheckCallin (env=0x1aa00, receiver=0x0, cls=0x130ee0, methodID=0x7f1b38273e18, args=0x7f1b3ea08d58) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/jnicsup.cpp:488
#17 0x00007f1b3e5311ef in callStaticVoidMethod (env=0x1aa00, cls=0x130ee0, methodID=0x7f1b38273e18) at /root/docker_openj9/jchau_ffi/openj9-openjdk-jdk22/openj9/runtime/vm/jnicgen.c:384
#18 0x00007f1b3ec45459 in invokeStaticMainWithArgs (env=0x0, mainClass=0xf9df0a50, mainArgs=0xf9df0a78) at src/java.base/share/native/libjli/java.c:486
#19 0x00007f1b3ec46445 in JavaMain (_args=<optimized out>) at src/java.base/share/native/libjli/java.c:691

So the test failure with upcall was actually neither a deadlock nor hang but a timeout triggered by the infinite loop of the native memory allocation for the upcall thunk. Changing the loop in the upcall test with an fixed count will get the test passed (e.g. for (int i =0; i < xxx; i++) {....})

Given the test is only intended for Hotspot/JIT, I'd suggest to permanently exclude the test suite.

pshipton commented 7 months ago

Pls remove the "test excluded" label when adding "perm excluded".

pshipton commented 7 months ago

Does this mean we can also ~remove this issue from the milestone plan and~ close it?

ChengJin01 commented 7 months ago

Does this mean we can also remove this issue from the milestone plan and close it?

Yes as there is nothing else for us to do in the test.

pshipton commented 7 months ago

I guess we don't need to remove from the milestone if we are closing it.