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

serviceability/sa/ClhsdbJstackXcompStress.java failed due to "The process cannot access the file because it is being used by another process"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 19
    • Fix Version/s: None
    • Component/s: hotspot
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows

      Description

      The following test failed in the JDK19 CI:

      serviceability/sa/ClhsdbJstackXcompStress.java

      This particular failure mode is Windows specific. Please don't add non-windows sightings to
      this bug report.

      Here's a snippet from the log file:

      ----------System.out:(15/1803)*----------
      Command line: ['c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-19+7-315\\windows-x64-debug.jdk\\jdk-19\\fastdebug\\bin\\java.exe' '-XX:MaxRAMPercentage=4.16667' '-Djava.io.tmpdir=t:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_tier2_serviceability\\tmp' '-Xcomp' '-XX:CompileCommand=dontinline,LingeredAppWithRecComputation.factorial' '-XX:CompileCommand=compileonly,LingeredAppWithRecComputation.testLoop' '-XX:CompileCommand=compileonly,LingeredAppWithRecComputation.factorial' '-cp' 'T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_tier2_serviceability\\classes\\0\\serviceability\\sa\\ClhsdbJstackXcompStress.d;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_tier2_serviceability\\classes\\0\\test\\lib' 'LingeredAppWithRecComputation' 'b601e4b5-effe-43d8-bf17-19529136c317.lck']
      Started LingeredAppWithRecComputation with pid 14040
      [2022-01-21T19:16:31.099477500Z] Gathering output for process 14248
      DEBUG: [ - LingeredAppWithRecComputation.testLoop() @bci=16, line=46 (Compiled frame; information may be imprecise)]
      [2022-01-21T19:16:49.381198400Z] Gathering output for process 4172
      [2022-01-21T19:17:04.736952900Z] Gathering output for process 132
      [2022-01-21T19:17:18.571107900Z] Gathering output for process 11956
      [2022-01-21T19:17:32.418709100Z] Waiting for completion for process 11956
      [2022-01-21T19:17:32.418709100Z] Waiting for completion finished for process 11956
       LingeredApp stdout: [CompileCommand: dontinline LingeredAppWithRecComputation.factorial bool dontinline = true
      CompileCommand: compileonly LingeredAppWithRecComputation.testLoop bool compileonly = true
      CompileCommand: compileonly LingeredAppWithRecComputation.factorial bool compileonly = true
      ];
       LingeredApp stderr: []
       LingeredApp exitValue = 1
      ----------System.err:(127/7839)*----------
       stdout: [Attaching to process ID 14040, please wait...
      Debugger attached successfully.
      Server compiler detected.
      JVM version is 19-ea+7-315
      Deadlock Detection:

      No deadlocks found.

      "main" #1 prio=5 tid=0x000001acb50f52c0 nid=6220 waiting on condition [0x0000006912cff000]
         java.lang.Thread.State: TIMED_WAITING (sleeping)
         JavaThread state: _thread_blocked
       - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
       - jdk.test.lib.apps.LingeredApp.main(java.lang.String[]) @bci=158, line=599 (Interpreted frame)
      - locked <0x00000000b04ba2e8> (a java.lang.Object)
       - LingeredAppWithRecComputation.main(java.lang.String[]) @bci=33, line=65 (Interpreted frame)


      "Reference Handler" #2 daemon prio=10 tid=0x000001acd42c1ad0 nid=13820 waiting on condition [0x00000069133ff000]
         java.lang.Thread.State: RUNNABLE
         JavaThread state: _thread_blocked
       - java.lang.ref.Reference.waitForReferencePendingList() @bci=0 (Interpreted frame)
       - java.lang.ref.Reference.processPendingReferences() @bci=0, line=253 (Interpreted frame)
       - java.lang.ref.Reference$ReferenceHandler.run() @bci=0, line=215 (Interpreted frame)


      "Finalizer" #3 daemon prio=8 tid=0x000001acd42c4b40 nid=9116 in Object.wait() [0x00000069134fe000]
         java.lang.Thread.State: WAITING (on object monitor)
         JavaThread state: _thread_blocked
       - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
      - waiting on <0x00000000b050b830> (a java.lang.ref.ReferenceQueue$Lock)
       - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=155 (Interpreted frame)
      - locked <0x00000000b050b830> (a java.lang.ref.ReferenceQueue$Lock)
       - java.lang.ref.ReferenceQueue.remove() @bci=2, line=176 (Interpreted frame)
       - java.lang.ref.Finalizer$FinalizerThread.run() @bci=37, line=183 (Interpreted frame)


      "Signal Dispatcher" #4 daemon prio=9 tid=0x000001acd42d8060 nid=7980 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
         JavaThread state: _thread_blocked


      "Attach Listener" #5 daemon prio=5 tid=0x000001acd42d89e0 nid=7160 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
         JavaThread state: _thread_blocked


      "Common-Cleaner" #14 daemon prio=8 tid=0x000001acd43ed0b0 nid=12384 in Object.wait() [0x0000006913eff000]
         java.lang.Thread.State: TIMED_WAITING (on object monitor)
         JavaThread state: _thread_blocked
       - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
      - waiting on <0x00000000b0411a90> (a java.lang.ref.ReferenceQueue$Lock)
       - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=155 (Interpreted frame)
      - locked <0x00000000b0411a90> (a java.lang.ref.ReferenceQueue$Lock)
       - jdk.internal.ref.CleanerImpl.run() @bci=45, line=140 (Interpreted frame)
       - java.lang.Thread.run() @bci=11, line=833 (Interpreted frame)
       - jdk.internal.misc.InnocuousThread.run() @bci=20, line=162 (Interpreted frame)


      "LingeredAppWithRecComputation.factorial()" #15 prio=5 tid=0x000001acd4457c70 nid=6924 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
         JavaThread state: _thread_in_java
       - LingeredAppWithRecComputation.testLoop() @bci=16, line=46 (Compiled frame; information may be imprecise)
       - LingeredAppWithRecComputation.lambda$main$0(LingeredAppWithRecComputation) @bci=1, line=61 (Interpreted frame)
       - LingeredAppWithRecComputation$$Lambda$4+0x0000000800c03000.run() @bci=4 (Interpreted frame)
       - java.lang.Thread.run() @bci=11, line=833 (Interpreted frame)


      "SteadyStateThread" #16 prio=5 tid=0x000001acd44581e0 nid=5740 waiting for monitor entry [0x00000069140fe000]
         java.lang.Thread.State: BLOCKED (on object monitor)
         JavaThread state: _thread_blocked
       - jdk.test.lib.apps.LingeredApp.steadyState(java.lang.Object) @bci=8, line=537 (Interpreted frame)
      - waiting to lock <0x00000000b04ba2e8> (a java.lang.Object)
       - jdk.test.lib.apps.LingeredApp$1.run() @bci=4, line=543 (Interpreted frame)


      ];
       stderr: [Exception in thread "main" sun.jvm.hotspot.debugger.win32.coff.COFFException: java.io.FileNotFoundException: C:\\Windows\\System32\\win32u.dll (The process cannot access the file because it is being used by another process)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.win32.coff.COFFFileParser.parse(COFFFileParser.java:80)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.DLL$1.computeValue(DLL.java:44)
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.memo.MemoizedObject.getValue(MemoizedObject.java:41)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.DLL.getFile(DLL.java:164)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.DLL.close(DLL.java:155)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.detach(WindbgDebuggerLocal.java:179)
      at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.detachInternal(HotSpotAgent.java:323)
      at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.detach(HotSpotAgent.java:193)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.stop(Tool.java:147)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:138)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:302)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500)
      Caused by: java.io.FileNotFoundException: C:\\Windows\\System32\\win32u.dll (The process cannot access the file because it is being used by another process)
      at java.base/java.io.FileInputStream.open0(Native Method)
      at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
      at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.win32.coff.COFFFileParser.parse(COFFFileParser.java:67)
      ... 12 more
      Exception in thread "Thread-0" java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.utilities.memo.MemoizedObject.getValue()" because "this.file" is null
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.DLL.getFile(DLL.java:164)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.DLL.close(DLL.java:155)
      at jdk.hotspot.agent/sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.detach(WindbgDebuggerLocal.java:179)
      at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.detachInternal(HotSpotAgent.java:323)
      at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent.detach(HotSpotAgent.java:193)
      at jdk.hotspot.agent/sun.jvm.hotspot.HotSpotAgent$1.run(HotSpotAgent.java:109)
      at java.base/java.lang.Thread.run(Thread.java:833)
      ]
       exitValue = 1

      java.lang.RuntimeException: stderr was not empty
      at jdk.test.lib.process.OutputAnalyzer.stderrShouldBeEmptyIgnoreDeprecatedWarnings(OutputAnalyzer.java:177)
      at ClhsdbJstackXcompStress.runJstackInLoop(ClhsdbJstackXcompStress.java:77)
      at ClhsdbJstackXcompStress.main(ClhsdbJstackXcompStress.java:100)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:833)
      java.io.IOException: LingeredApp terminated with non-zero exit code 1
      at jdk.test.lib.apps.LingeredApp.stopApp(LingeredApp.java:427)
      at jdk.test.lib.apps.LingeredApp.stopApp(LingeredApp.java:485)
      at ClhsdbJstackXcompStress.main(ClhsdbJstackXcompStress.java:106)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:833)

      JavaTest Message: Test threw exception: java.io.IOException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.io.IOException: LingeredApp terminated with non-zero exit code 1


      The key line of output is this one:

       stderr: [Exception in thread "main" sun.jvm.hotspot.debugger.win32.coff.COFFException: java.io.FileNotFoundException: C:\\Windows\\System32\\win32u.dll (The process cannot access the file because it is being used by another process)

      This failure is likely due to something external like a virus
      scanner running on the test machine, but I figured I would
      file the bug to see if there was some way to harden the
      code to tolerate this kind of windows specific interference.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: