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

jhsdb jstack assertion failure on virtual threads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 21
    • hotspot
    • None

      Spotted on a personal mach5 job when running failure handlers on a test that timed out because of virtual thread deadlock.

      Example output for a single thread:
      "ForkJoinPool-1-worker-4" #35 daemon prio=5 tid=0x0000fffb3c003fb0 nid=3980773 waiting for monitor entry [0x0000fffba07fd000]
         java.lang.Thread.State: BLOCKED (on object monitor)
         JavaThread state: _thread_blocked
       - jdk.internal.net.http.Http2Connection.sendFrame(jdk.internal.net.http.frame.Http2Frame) @bci=12, line=1387 (Interpreted frame)
      - waiting to lock <0x00000000d0b09408> (a java.lang.Object)
       - jdk.internal.net.http.Stream.sendHeadersAsync() @bci=145, line=838 (Interpreted frame)
       - jdk.internal.net.http.Exchange.lambda$responseAsyncImpl0$8(java.util.function.Function, jdk.internal.net.http.ExchangeImpl) @bci=1, line=550 (Interpreted frame)
       - jdk.internal.net.http.Exchange$$Lambda+0x000000080111f608.apply(java.lang.Object) @bci=12 (Interpreted frame)
       - jdk.internal.net.http.Exchange.checkFor407(jdk.internal.net.http.ExchangeImpl, java.lang.Throwable, java.util.function.Function) @bci=172, line=430 (Interpreted frame)
       - jdk.internal.net.http.Exchange.lambda$responseAsyncImpl0$9(java.util.function.Function, jdk.internal.net.http.ExchangeImpl, java.lang.Throwable) @bci=4, line=554 (Interpreted frame)
       - jdk.internal.net.http.Exchange$$Lambda+0x000000080112c910.apply(java.lang.Object, java.lang.Object) @bci=16 (Interpreted frame)
       - java.util.concurrent.CompletableFuture.uniHandle(java.lang.Object, java.util.function.BiFunction, java.util.concurrent.CompletableFuture$UniHandle) @bci=58, line=934 (Interpreted frame)
       - java.util.concurrent.CompletableFuture.uniHandleStage(java.util.concurrent.Executor, java.util.function.BiFunction) @bci=54, line=950 (Interpreted frame)
       - java.util.concurrent.CompletableFuture.handle(java.util.function.BiFunction) @bci=3, line=2372 (Interpreted frame)
       - jdk.internal.net.http.Exchange.responseAsyncImpl0(jdk.internal.net.http.HttpConnection) @bci=75, line=554 (Interpreted frame)

      Error occurred during stack walking:
      sun.jvm.hotspot.utilities.AssertionFailure: must have non-zero frame size
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.aarch64.AARCH64Frame.senderForCompiledFrame(AARCH64Frame.java:395)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.aarch64.AARCH64Frame.sender(AARCH64Frame.java:295)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Frame.sender(Frame.java:207)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:212)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:119)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:148)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:81)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.run(JStack.java:67)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
      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)

      The assertion may affect some or all virtual threads. If multiple threads have the same stack trace, some may observe the assertion failure and others may not. Multiple jstack runs on the same deadlocked process consistently trigger assertion failures on the same threads.

            Unassigned Unassigned
            djelinski Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: