Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with problematic zip headers in pekko-protobuf-v3 jar #685

Closed
pjfanning opened this issue Sep 28, 2023 · 17 comments · Fixed by #742 · May be fixed by #705
Closed

issue with problematic zip headers in pekko-protobuf-v3 jar #685

pjfanning opened this issue Sep 28, 2023 · 17 comments · Fixed by #742 · May be fixed by #705

Comments

@pjfanning
Copy link
Contributor

pjfanning commented Sep 28, 2023

Affects pekko-http nightly build. So far, only affects pekko-protobuf-v3 jars generated from the 'main' branch as opposed to the '1.0.x' branch. Doesn't happen with Java 8 but happens with Java 11 and 17.

https://github.com/apache/incubator-pekko-http/actions/runs/6243149241/job/16948118095

This is the openjdk issue: https://bugs.openjdk.org/browse/JDK-8313765
See also: https://bugs.openjdk.org/browse/JDK-8315828

[error] scala.reflect.internal.FatalError: Error accessing /home/runner/.cache/coursier/v1/https/repository.apache.org/content/repositories/snapshots/org/apache/pekko/pekko-protobuf-v3_2.12/1.1.0-M0%2B78-9288d4c6-SNAPSHOT/pekko-protobuf-v3_2.12-1.1.0-M0%2B78-9288d4c6-SNAPSHOT.jar
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$list$3(AggregateClassPath.scala:113)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:943)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:101)
[error] 	at scala.tools.nsc.util.ClassPath.list(ClassPath.scala:36)
[error] 	at scala.tools.nsc.util.ClassPath.list$(ClassPath.scala:36)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:30)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:298)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:250)
[error] 	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1542)
[error] 	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
[error] 	at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:258)
[error] 	at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:74)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:72)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:44)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:[301](https://github.com/apache/incubator-pekko-http/actions/runs/6243149241/job/16948118095#step:7:302))
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:301)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1511)
[error] 	at scala.tools.nsc.Global$Run.<init>(Global.scala:1213)
[error] 	at xsbt.ZincCompiler$ZincRun.<init>(CallbackGlobal.scala:80)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
[error] 	at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:180)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:178)
[error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:464)
[error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:419)
[error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:406)
[error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:172)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2371)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2321)
[error] 	at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:31)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:47)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:29)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:24)
[error] 	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2319)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] 	at sbt.Execute.work(Execute.scala:292)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] Caused by: java.io.IOException: Error accessing /home/runner/.cache/coursier/v1/https/repository.apache.org/content/repositories/snapshots/org/apache/pekko/pekko-protobuf-v3_2.12/1.1.0-M0%2B78-9288d4c6-SNAPSHOT/pekko-protobuf-v3_2.12-1.1.0-M0%2B78-9288d4c6-SNAPSHOT.jar
[error] 	at scala.reflect.io.FileZipArchive.scala$reflect$io$FileZipArchive$$openZipFile(ZipArchive.scala:190)
[error] 	at scala.reflect.io.FileZipArchive.root$lzycompute(ZipArchive.scala:238)
[error] 	at scala.reflect.io.FileZipArchive.root(ZipArchive.scala:235)
[error] 	at scala.reflect.io.FileZipArchive.allDirs$lzycompute(ZipArchive.scala:272)
[error] 	at scala.reflect.io.FileZipArchive.allDirs(ZipArchive.scala:272)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.findDirEntry(ZipArchiveFileLookup.scala:76)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.list(ZipArchiveFileLookup.scala:63)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.list$(ZipArchiveFileLookup.scala:62)
[error] 	at scala.tools.nsc.classpath.ZipAndJarClassPathFactory$ZipArchiveClassPath.list(ZipAndJarFileLookupFactory.scala:58)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$list$3(AggregateClassPath.scala:105)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:943)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:101)
[error] 	at scala.tools.nsc.util.ClassPath.list(ClassPath.scala:36)
[error] 	at scala.tools.nsc.util.ClassPath.list$(ClassPath.scala:36)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:30)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:298)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:250)
[error] 	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1542)
[error] 	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
[error] 	at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:258)
[error] 	at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:74)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:72)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:44)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:301)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:301)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1511)
[error] 	at scala.tools.nsc.Global$Run.<init>(Global.scala:1213)
[error] 	at xsbt.ZincCompiler$ZincRun.<init>(CallbackGlobal.scala:80)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
[error] 	at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:180)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:178)
[error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:464)
[error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:419)
[error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:406)
[error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:172)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2371)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2321)
[error] 	at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:31)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:47)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:29)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:24)
[error] 	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2[319](https://github.com/apache/incubator-pekko-http/actions/runs/6243149241/job/16948118095#step:7:320))
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] 	at sbt.Execute.work(Execute.scala:292)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data field size for tag: 0x4000 at 787)
[error] 	at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1769)
[error] 	at java.base/java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1274)
[error] 	at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1734)
[error] 	at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1463)
[error] 	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1426)
[error] 	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:742)
[error] 	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:859)
[error] 	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:257)
[error] 	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186)
[error] 	at java.base/java.util.jar.JarFile.<init>(JarFile.java:348)
[error] 	at scala.reflect.internal.JDK9Reflectors.newJarFile(JDK9Reflectors.java:62)
[error] 	at scala.reflect.io.FileZipArchive.scala$reflect$io$FileZipArchive$$openZipFile(ZipArchive.scala:185)
[error] 	at scala.reflect.io.FileZipArchive.root$lzycompute(ZipArchive.scala:238)
[error] 	at scala.reflect.io.FileZipArchive.root(ZipArchive.scala:235)
[error] 	at scala.reflect.io.FileZipArchive.allDirs$lzycompute(ZipArchive.scala:272)
[error] 	at scala.reflect.io.FileZipArchive.allDirs(ZipArchive.scala:272)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.findDirEntry(ZipArchiveFileLookup.scala:76)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.list(ZipArchiveFileLookup.scala:63)
[error] 	at scala.tools.nsc.classpath.ZipArchiveFileLookup.list$(ZipArchiveFileLookup.scala:62)
[error] 	at scala.tools.nsc.classpath.ZipAndJarClassPathFactory$ZipArchiveClassPath.list(ZipAndJarFileLookupFactory.scala:58)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$list$3(AggregateClassPath.scala:105)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:943)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:101)
[error] 	at scala.tools.nsc.util.ClassPath.list(ClassPath.scala:36)
[error] 	at scala.tools.nsc.util.ClassPath.list$(ClassPath.scala:36)
[error] 	at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:30)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:298)
[error] 	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:250)
[error] 	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1542)
[error] 	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
[error] 	at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:258)
[error] 	at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:74)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:72)
[error] 	at scala.tools.nsc.Global.rootMirror(Global.scala:44)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:301)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:301)
[error] 	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1511)
[error] 	at scala.tools.nsc.Global$Run.<init>(Global.scala:1213)
[error] 	at xsbt.ZincCompiler$ZincRun.<init>(CallbackGlobal.scala:80)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
[error] 	at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
[error] 	at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:180)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:178)
[error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:464)
[error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:419)
[error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:406)
[error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:172)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2371)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2[321](https://github.com/apache/incubator-pekko-http/actions/runs/6243149241/job/16948118095#step:7:322))
[error] 	at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:31)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:47)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:29)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:24)
[error] 	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2319)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] 	at sbt.Execute.work(Execute.scala:292)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
@pjfanning
Copy link
Contributor Author

We may need to go to sbt-assembly team to discuss this. pekko-protobuf-v3 jar is generated using sbt-assembly.

The issue may be best addressed by getting a change in sbt-assembly to avoid zip64 format.

@jrudolph
Copy link
Contributor

sbt-assembly uses the JDK zip filesystem to create jars. So, it's the JDK that creates the broken zip archives and it seems the problem has already been fixed in more recent JDKs (though, of course, it might be a problem in older JDKs that might not be maintained to the same degree).

@jrudolph
Copy link
Contributor

Or, wait the fix was for flagging the problem not for fixing the generation...

@pjfanning
Copy link
Contributor Author

pjfanning commented Oct 11, 2023

Or, wait the fix was for flagging the problem not for fixing the generation...

I'm surprised that the JDK changes are not causing more problems. Our CI builds that create the pekko snapshot jars should be using the latest JDKs - as we can see the pekko-http CI builds are using the latest JDKs too and hitting the issue with the new zip64 checks.

We could probably temporarily fix the tests by forcing the pekko-http tests to use older versions of the JDKs (from a few months ago) but it seems better to see if we can somehow fix the jar generation.

@jrudolph
Copy link
Contributor

Since the issue is with the protobuf-v3 jar, I guess it might be related to sharding / jarjarabrams which seems to use ant internally...

@mdedetrich
Copy link
Contributor

Since the issue is with the protobuf-v3 jar, I guess it might be related to sharding / jarjarabrams which seems to use ant internally...

sbt-assembly uses the FileSystem to create jars and the solution I have is to use Apache Commons compression lib which allows you to toggle the Zip64 encoding.

1 similar comment
@mdedetrich
Copy link
Contributor

Since the issue is with the protobuf-v3 jar, I guess it might be related to sharding / jarjarabrams which seems to use ant internally...

sbt-assembly uses the FileSystem to create jars and the solution I have is to use Apache Commons compression lib which allows you to toggle the Zip64 encoding.

@pjfanning
Copy link
Contributor Author

pjfanning commented Oct 11, 2023

Seems like a good idea to use commons-compress. I've worked on Apache POI and the modern Microsoft file formats are basically zip files. We've had to switch to commons-compress because its zip support is superior to the JDK equivalents. Zip64 issues being one of the main drivers as to why we had to switch.

@jrudolph
Copy link
Contributor

We have at least 3 components dealing with jar files: assembly, jarjarabrams for sharding and also sbt-reproducible-builds. Can someone try to reproduce the issue? I cannot reproduce it with the jars I build locally. You can use zipinfo -v <jar> which will output errors to stderr.

@jrudolph
Copy link
Contributor

Ok, indeed, I can reproduce it and the broken artifact is the one in stripped: pekko/protobuf-v3/target/scala-2.13/stripped/pekko-protobuf-v3_2.13-1.1.0-M0+101-1b1f5722-SNAPSHOT.jar

@mdedetrich
Copy link
Contributor

We have at least 3 components dealing with jar files: assembly, jarjarabrams for sharding and also sbt-reproducible-builds. Can someone try to reproduce the issue? I cannot reproduce it with the jars I build locally. You can use zipinfo -v <jar> which will output errors to stderr.

I think in this case it's the main jar generation in sbt-assembly but I have to confirm

@jrudolph
Copy link
Contributor

Btw. the issue in the latest jar is not related to zip64 but a generally broken zip extra field entry.

Maybe @raboof has an idea what could be broken about the stripper?

jrudolph added a commit to jrudolph/incubator-pekko that referenced this issue Oct 11, 2023
@jrudolph
Copy link
Contributor

Ok, let's redeem all of the components above and claim it on the arch nemesis. I went down into the abyss and read the zip file handling code of the JDK, commons-compress, and more, one worse than the other and now that?

@mdedetrich
Copy link
Contributor

mdedetrich commented Oct 12, 2023

one worse than the other and now that?

Im confused?

@mdedetrich
Copy link
Contributor

On another note, this may also be related to raboof/sbt-reproducible-builds#277

@jrudolph
Copy link
Contributor

one worse than the other and now that?

Im confused?

Sorry, that was obscure... The problem is caused by osgi.

@mdedetrich
Copy link
Contributor

Sorry, that was obscure... The problem is caused by osgi.

No worries, I thought I was the only obscure one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants