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

Upcall stub might go undetected when freezing frames

    XMLWordPrintable

Details

    • b12

    Backports

      Description

        There is a missing push_cont_fastpath()/pop_cont_fastpath() around the call to the Java method in the upcall stub.
        Because of this, if from that upcall to Java a virtual thread tries to yield, and all the other methods in the stack are compiled, we will incorrectly take the freeze fast path and freeze everything in the stack including the native frames. By forcing the slow path instead we will identify the upcall stub and pin the vthread.

        The issue can be easily reproduced by running test test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java from the loom repo with -Xcomp flag.

        Attachments

          Issue Links

            Activity

              People

                pchilanomate Patricio Chilano Mateo
                pchilanomate Patricio Chilano Mateo
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: