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

JNI DestroyJavaVM can start shutdown when one non-daemon thread remains

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 20
    • 8, 11, 17, 20
    • hotspot
    • b11

    Description

      DestroyJavaVM is supposed to wait until all non-daemon threads have exited before starting the shutdown sequence. The logic in Threads::destroy_vm seems to assume that the caller is a non-daemon thread. If the caller is a daemon thread, shutdown will start when one non-daemon thread is still running. See reproducer in attached Main.java and start.c files.

      Attachments

        1. Main.java
          0.7 kB
        2. start.c
          1 kB

        Issue Links

          Activity

            People

              dholmes David Holmes
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: