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

serviceability/dcmd/thread/PrintMountedVirtualThread.java failing with JTREG_TEST_THREAD_FACTORY=Virtual

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 24
    • 24
    • hotspot
    • None
    • svc
    • b03

    Description

      The changes in JDK-8330846 to add mounted virtual threads to the thread dump need follow-up work to deal with the case that the target thread is in a temporarily transition. These temporarily transitions arise when a virtual thread needs to do something in the context of its carrier. If the thread dump is done during this time then the "Carrying ..." and "Mounted ..." lines print the carrier thread name and ID rather than the mounted virtual thread name and ID.

      The test also needs tweaking to pass reliably when testing with JTREG_TEST_THREAD_FACTORY=Virtual.

      The issues can be duplicated with:

      make run-test TEST=test/hotspot/jtreg/serviceability/dcmd/thread/PrintMountedVirtualThread.java JTREG_TEST_THREAD_FACTORY=Virtual JTREG_REPEAT_COUNT=100

      In this testing mode, CountDownLatch.countDown unparks the main (virtual) thread and the main thread can observe the dummy thread during the unpack when the thread identity is the carrier rather than the mounted virtual thread.

      Attachments

        Issue Links

          Activity

            People

              dholmes David Holmes
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: