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

zip file IO operations on Solaris fail if thread is interrupted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b45
    • Introduced In Version:
      6
    • Resolved In Build:
      b49
    • CPU:
      generic, sparc
    • OS:
      solaris, solaris_8, solaris_9, solaris_10
    • Verification:
      Verified

      Description

      The changes for
       6280693: Mmap the whole jar files takes too much perceived footprint
      have caused failures on Solaris when an interrupted thread uses the java.util.zip API.

      The following program:
      ---------------------------------------------------------------
      import java.util.zip.*;

      public class InterruptibleZip {
          private static String rtJar() {
      String bcp = System.getProperty("sun.boot.class.path");
      for (String jar : bcp.split("[;:]"))
      if (jar.endsWith("rt.jar"))
      return jar;
      throw new Error("Can't find rt.jar");
          }

          public static void main(String[] args) throws Exception {
      ZipFile zf = new ZipFile(rtJar());
      Thread.currentThread().interrupt();
      ZipEntry ze = zf.getEntry("java/lang/Object.class");
      System.out.println("interrupted="+Thread.interrupted());
      System.out.println(ze.getName());
          }
      }
      ---------------------------------------------------------------

      results in

      ...b45/binaries/solaris-sparc/jre/lib/rt.jar: error reading zip file
      Exception in thread "main" java.lang.NoClassDefFoundError: java/util/zip/ZipEntry

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xlu Xiaobin Lu (Inactive)
              Reporter:
              martin Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: