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

tools/pack200/Pack200Props.java test fails on x86 (32-bit) Oracle linux

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 11, 12
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
      jar
    • CPU:
      x86
    • OS:
      linux

      Description

      x86 (32-bit) Oracle linux: tools/pack200/Pack200Props.java test fail

      fail details:
      java.lang.OutOfMemoryError
      at java.base/java.util.zip.Deflater.init(Native Method)
      at java.base/java.util.zip.Deflater.<init>(Deflater.java:208)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getDeflater(ZipFileSystem.java:1661)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryOutputStreamDef.<init>(ZipFileSystem.java:1414)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.writeEntry(ZipFileSystem.java:1185)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.sync(ZipFileSystem.java:1233)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.lambda$close$2(ZipFileSystem.java:278)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.close(ZipFileSystem.java:277)
      at Utils$JrtToZip.run(Utils.java:623)
      at Utils.createRtJar(Utils.java:589)
      at Pack200Props.verifySegmentLimit(Pack200Props.java:65)
      at Pack200Props.main(Pack200Props.java:58)

      Issue essence: deflaters (java.util.zip.Deflater) are not reused in jdk.nio.zipfs.ZipFileSystem, and one of subsequent Deflater initializers gets Z_MEM_ERROR from deflateInit2 zlib library function (src/java.base/share/native/libzip/Deflater.c, Java_java_util_zip_Deflater_init).

      Introduced in:
        changeset: 51534:4814af49ecbb
        user: sherman
        date: Tue Sep 18 10:43:01 2018 -0700
        summary: 8034802: (zipfs) newFileSystem throws UOE when the zip file is located in a custom file system

      On jdk-jdk the issue fixed by:
        changeset: 53043:fd2e8f941ded
        user: clanger
        date: Wed Dec 19 10:36:16 2018 +0000
        summary: 8215472: (zipfs) Cleanups in implementation classes of jdk.zipfs and tests

      The r53043 change was not backported to jdk11/jdk12 and applied cleanly. Actually one-line fix could help: http://cr.openjdk.java.net/~bulasevich/8222331/webrev/

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bulasevich Boris Ulasevich
              Reporter:
              bulasevich Boris Ulasevich
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: