JDK-8185101 : java/util/zip/DeInflate.java fails at Ubuntu 17.04 (zlib 1.2.11)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2017-07-23
  • Updated: 2017-08-02
  • Resolved: 2017-08-02
Related Reports
Relates :  
Sub Tasks
JDK-8185351 :  
Description
Due to zlib 1.2.11 issue https://github.com/madler/zlib/issues/275

java/util/zip/DeInflate.java

fails at Ubuntu 17.04 on which zlib is 1.2.11, both 32bit and 64bit.
(pass if build with --with-zlib=bundled)
(pass at other platforms, pass at Ubuntu16.04 on which zlib is 1.2.8)

STDOUT:
level:-1, strategy: 0, dowrap: false
level:-1, strategy: 0, dowrap: true
level:-1, strategy: 1, dowrap: false
STDERR:
java.util.zip.DataFormatException: incorrect header check
	at java.base/java.util.zip.Inflater.inflateBytes(Native Method)
	at java.base/java.util.zip.Inflater.inflate(Inflater.java:260)
	at java.base/java.util.zip.Inflater.inflate(Inflater.java:281)
	at DeInflate.checkStream(DeInflate.java:53)
	at DeInflate.main(DeInflate.java:137)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:844)


Comments
The zlib 1.2.11 installed as the default is the root of the failure.
02-08-2017

It may be be useful to submit a bug to Ubuntu on this, maybe they can provide a patch/update to the zlib that they ship with the operating system. We should also create a release note for JDK 9 to document this issue when on systems with zlib 1.2.11.
23-07-2017