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

JDK 1.5's temporary native libraries may not be deleted on VM exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 5.0
    • core-libs
    • sparc
    • solaris_2.5.1

      Name: js151677 Date: 08/13/2004


      JDK 1.5's temporary native libraries may not be deleted on VM exit

      In JDK 1.5 the concept of a temporary native library is implemented in
      javax/management/loading/Mlet.java.
      It used java.io.File.deleteOnExit() on the temporary native library to
      indicate the file should be deleted when Java VM exits.

      Unfortunately there is a prohibition against deleting an open shared
      library on HPUX. The unlink() system call will fail with errno==ETXTBSY
      on HPUX. As a result, on HPUX and possibly other operating systems
      the temporary native library files used by Mlet often are not deleted.
      (Solaris operating system does not appear to be impacted by this issue.)

      The JDK 1.5's VM shutdown sequence does not unload any remaining shared
      libraries. Also the deleteOnExit() hook is run too early, when the Java
      daemon threads are still running and may be registering additional
      deleteOnExit entries. A race condition is possible.

        To implement this feature properly the VM should unload any remaining
      open shared libraries in its shutdown process. Only after the shared
      libraries are closed should the deleteOnExit() hook be run.
      (Incident Review ID: 296806)
      ======================================================================

            mchung Mandy Chung (Inactive)
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: