Fix sporadic "Could not validate Info.xml" build error - #9575
Draft
mbien wants to merge 1 commit into
Draft
Conversation
CI fails sometimes in platform/autoupdate.services with netbeans/nbbuild/templates/common.xml:487: Could not validate Info.xml before writing: java.util.zip.ZipException: ZipFile invalid LOC header (bad signature) at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:935) at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:946) at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:970) at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71) at java.base/java.io.FilterInputStream.read(FilterInputStream.java:71) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3027) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:706) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1398) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1364) at ... more xerces at org.netbeans.nbbuild.XMLUtil.parse(XMLUtil.java:106) at org.netbeans.nbbuild.MakeNBM.validateAgainstAUDTDs(MakeNBM.java:1103) at org.netbeans.nbbuild.MakeNBM.createInfoXml(MakeNBM.java:1045) at org.netbeans.nbbuild.MakeNBM.lambda$execute$1(MakeNBM.java:625) at org.netbeans.nbbuild.MakeNBM.execute(MakeNBM.java:646) This was also locally reproducible after downloading the CI artifact. First 'ant build-nbms' would fail, second invocation would always succeed. It can't be a coincidence that the module which provides the updater.jar fails while reading a xml file from the very same jar. Unfortunately I couldn't find the cause, but eagerly loading the resource with ant's project CL appears to resolve the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
as observed in https://github.com/apache/netbeans/actions/runs/32883200508?pr=9573 (and others, e.g https://github.com/apache/netbeans/actions/runs/31745293654/attempts/1), CI fails sometimes in
platform/autoupdate.serviceswithLooking at the performance metrics of the workflow, the job has currently a 29% failure rate.
This was also locally reproducible after downloading the CI artifact. First 'ant build-nbms' would fail, second invocation would always succeed.
It can't be a coincidence that the module which provides the updater.jar (but none of the other modules) fails while reading a xml file from the very same jar. Unfortunately I couldn't find the cause, but eagerly loading the resource with ant's project CL appears to resolve the issue.