FS#74371 - [zlib] v1.2.12 breaks Spring Boot build

Attached to Project: Arch Linux
Opened by Demitrius Belai (demitriusbelai) - Wednesday, 06 April 2022, 17:40 GMT
Last edited by Evangelos Foutras (foutrelis) - Sunday, 24 April 2022, 09:23 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


zlib 1.2.12 break compilation of the Spring Boot application. Downgrade the package to 1.2.11-5 fixes the issue. I have another PC with Arch Linux too and that don't have any problem with it. I was thinking if it was something related to CPU model. The problematic PC is a Intel i7 870 and the working PC is a Intel i5 7600k.

Steps to reproduce:

$ git clone https://github.com/spring-guides/gs-spring-boot.git
$ cd gs-spring-boot/complete/
$ mvn -DskipTests clean package

The output:
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.896 s
[INFO] Finished at: 2022-04-06T14:26:49-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:repackage (repackage) on project spring-boot-complete: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:repackage failed: Error reading archive file: zip END header not found -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Sunday, 24 April 2022, 09:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Upstream fix included in zlib 1:1.2.12-2
Comment by Demitrius Belai (demitriusbelai) - Thursday, 07 April 2022, 13:08 GMT
I have looked upstream and this commit fixes the issue https://github.com/madler/zlib/commit/ec3df00224d4b396e2ac6586ab5d25f673caa4c2
Comment by med medin (medmedin) - Tuesday, 12 April 2022, 02:04 GMT
I confirm this problem on NetBeans, all my local Swing projects refuse to compile.
Comment by Jens Pelzetter (jensp1108) - Tuesday, 12 April 2022, 06:12 GMT
Can also confirm this bug. Netbeans shows CRC errors for several dependencies. A small test with ZipInputStream and several JARs and ZIPs that are completely sane also shows CRC related errors. Interestingly, it looks like it depends on the number of bytes read from an entry in the ZIP file and passed to the Java CRC32 class (and in turn zlib?). If I increase the number of bytes read to a certain amount, ZipInputStream reads the ZIP file. See also https://bbs.archlinux.org/viewtopic.php?id=275421

CPU is of the affected system is a Core i7 950, so properly the same generation as the one Demitrius uses.
Comment by Mike Dillamore (armadillo) - Tuesday, 12 April 2022, 07:18 GMT
I'm also seeing the same problem, manifested as Jetbrains Toolbox failing to check for updates. CPU is Core 2 Quad Q6600 and downgrading zlib resolves the issue. A different PC with i7-7700HQ is not affected by the problem.
Comment by Antonio Muñoz (tomby) - Saturday, 23 April 2022, 13:14 GMT
I can confirm the issue in my home server: Intel(R) Atom(TM) CPU D525.
Comment by Dāvis (davispuh) - Sunday, 24 April 2022, 00:00 GMT
This also breaks Fabric loader for Minecraft. Spent hours trying to figure out why it wasn't working...

[01:00:30] [main/INFO]: Loading Minecraft 1.18.2 with Fabric Loader 0.13.3
[01:00:31] [main/ERROR]: Incompatible mod set!
net.fabricmc.loader.impl.FormattedException: net.fabricmc.loader.impl.discovery.ModResolutionException: Mod discovery failed!
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:192) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:142) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71) [fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.13.3.jar:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Caused by: net.fabricmc.loader.impl.discovery.ModResolutionException: Mod discovery failed!
at net.fabricmc.loader.impl.discovery.ModDiscoverer.lambda$discoverMods$1(ModDiscoverer.java:137) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.discovery.ModDiscoverer.discoverMods(ModDiscoverer.java:137) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.FabricLoaderImpl.setup(FabricLoaderImpl.java:208) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:187) ~[fabric-loader-0.13.3.jar:?]
... 9 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Error analyzing [~/.minecraft/mods/appleskin-fabric-mc1.18.2-2.4.0.jar]: java.lang.RuntimeException: Error analyzing nested jar META-INF/jars/cloth-config-fabric-6.0.42.jar from [~/.minecraft/mods/appleskin-fabric-mc1.18.2-2.4.0.jar]: java.util.zip.ZipException: invalid entry CRC (expected 0x518510b5 but got 0x5bfe689e)
at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:483) ~[?:?]
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562) ~[?:?]
at java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:604) ~[?:?]
at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:981) ~[?:?]
at net.fabricmc.loader.impl.discovery.ModDiscoverer.discoverMods(ModDiscoverer.java:134) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.FabricLoaderImpl.setup(FabricLoaderImpl.java:208) ~[fabric-loader-0.13.3.jar:?]
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:187) ~[fabric-loader-0.13.3.jar:?]
... 9 more

Notice: "java.util.zip.ZipException: invalid entry CRC (expected 0x518510b5 but got 0x5bfe689e)"

Downgrading to zlib to 1.2.11 works
Comment by Mike Dillamore (armadillo) - Sunday, 24 April 2022, 07:42 GMT
1.2.12-2 from testing resolves the issue in my situation