Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336402

jdk/jshell/ToolReloadTest.java failed due to OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: External
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • x86_64
    • windows

      The following test failed in the JDK24 CI:

      jdk/jshell/ToolReloadTest.java

      Here's a snippet from the log file:

      #section:testng
      ----------messages:(8/425)----------
      command: testng ToolReloadTest
      reason: User specified action: run testng ToolReloadTest
      started: Mon Jul 15 14:41:59 UTC 2024
      Mode: agentvm
      Agent id: 8
      Additional exports to unnamed modules from @modules: jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.main jdk.jdeps/com.sun.tools.javap jdk.jshell/jdk.internal.jshell.tool
      finished: Mon Jul 15 14:42:12 UTC 2024
      elapsed time (seconds): 12.994
      ----------configuration:(18/1623)*----------

      <snip>

      ----------System.out:(101/6606)----------
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testEnvBadModule(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadClasspath(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadCrashRestore(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadDrop(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadExitRestore(): failure
      java.lang.AssertionError: user error: /reload -restore.
       expected [] but found [Exception in thread "main" java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
      at java.base/java.lang.Thread.start0(Native Method)
      at java.base/java.lang.Thread.start(Thread.java:1518)
      at jdk.jshell/jdk.jshell.execution.Util.forwardExecutionControlAndIO(Util.java:145)
      at jdk.jshell/jdk.jshell.execution.RemoteExecutionControl.main(RemoteExecutionControl.java:74)
      ]
      at org.testng.Assert.fail(Assert.java:99)
      at org.testng.Assert.failNotEquals(Assert.java:1037)
      at org.testng.Assert.assertEqualsImpl(Assert.java:140)
      at org.testng.Assert.assertEquals(Assert.java:122)
      at org.testng.Assert.assertEquals(Assert.java:629)
      at ReplToolTesting.assertOutput(ReplToolTesting.java:576)
      at ReplToolTesting.assertCommand(ReplToolTesting.java:560)
      at ReplToolTesting.assertCommand(ReplToolTesting.java:542)
      at ReplToolTesting.assertCommand(ReplToolTesting.java:493)
      at ToolReloadTest.lambda$testReloadExitRestore$78(ToolReloadTest.java:232)
      at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:876)
      at java.base/java.io.PrintStream.implWrite(PrintStream.java:601)
      at java.base/java.io.PrintStream.write(PrintStream.java:581)
      at jdk.internal.le/jdk.internal.org.jline.terminal.impl.LineDisciplineTerminal.processOutputByte(LineDisciplineTerminal.java:306)
      at jdk.internal.le/jdk.internal.org.jline.terminal.impl.LineDisciplineTerminal$FilteringOutputStream.write(LineDisciplineTerminal.java:356)
      at java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:291)
      at java.base/sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:386)
      at java.base/sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:391)
      at java.base/sun.nio.cs.StreamEncoder.lockedFlush(StreamEncoder.java:208)
      at java.base/sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:195)
      at java.base/java.io.OutputStreamWriter.flush(OutputStreamWriter.java:264)
      at java.base/java.io.PrintWriter.implFlush(PrintWriter.java:426)
      at java.base/java.io.PrintWriter.flush(PrintWriter.java:418)
      at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractTerminal.flush(AbstractTerminal.java:180)
      at jdk.internal.le/jdk.internal.org.jline.utils.Display.update(Display.java:338)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:4010)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3869)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:679)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:512)
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:229)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1299)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1233)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:1018)
      at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:259)
      at ReplToolTesting.testRawRun(ReplToolTesting.java:330)
      at ReplToolTesting.testRaw(ReplToolTesting.java:313)
      at ReplToolTesting.test(ReplToolTesting.java:265)
      at ReplToolTesting.test(ReplToolTesting.java:252)
      at ReplToolTesting.test(ReplToolTesting.java:244)
      at ToolReloadTest.testReloadExitRestore(ToolReloadTest.java:231)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:588)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
      at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
      at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
      at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
      at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
      at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
      at org.testng.TestRunner.privateRun(TestRunner.java:764)
      at org.testng.TestRunner.run(TestRunner.java:585)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
      at org.testng.SuiteRunner.run(SuiteRunner.java:286)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
      at org.testng.TestNG.runSuites(TestNG.java:1069)
      at org.testng.TestNG.run(TestNG.java:1037)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:588)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1575)
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadIgnore(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadQuiet(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadRepeat(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadResetRestore(): success
      config ReplToolTesting.setUp(): success
      test ToolReloadTest.testReloadSnippets(): success

      ===============================================
      jdk/jshell/ToolReloadTest.java
      Total tests run: 10, Passes: 9, Failures: 1, Skips: 0
      ===============================================

      ----------System.err:(10/539)----------
      java.lang.Exception: failures: 1
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:104)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:588)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1575)

      JavaTest Message: Test threw exception: java.lang.Exception
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1

      There are 10 sub-tests in this test. 4 sub-tests passed,
      1 sub-test failed, and then 5 more sub-tests passed. This
      is a bit odd for an "unable to create native thread" failure.

      It doesn't appear to me that this failure has anything to do
      with the test being executed. There might be some strange
      and intermittent infrastructure failure or some underlying
      runtime issue so I'm starting this bug off in hotspot/runtime
      for initial triage.

            Unassigned Unassigned
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: