[ 
https://issues.apache.org/jira/browse/IVYDE-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephen Haberman updated IVYDE-322:
-----------------------------------

    Description: 
We're getting occasional build failures where Ivy seems to be trying to read 
only partially-complete XML files from the cache.

This happens only on our Hudson box, when it's running ~4-5 builds at a time, 
so my theory is that the separate Ivy processes are not blocking each other 
from reading incomplete files--just restarting a job makes it work the second 
time, so it's a very transient error.

Stack trace is below.

Does it seem likely that RetrieveEngine's determineArtifactsToCopy is missing 
some locking/ordination around line 286/288 where it uses cacheManager to get a 
file and then parse it?

java.lang.RuntimeException: problem during retrieve of 
bizo.com#b360-bizads-processes: java.text.ParseException: failed to parse 
report: 
/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
 The markup in the document following the root element must be well-formed.
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
        at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
        at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:67)
        at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:392)
        at org.apache.tools.ant.Target.performTasks(Target.java:413)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:811)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.text.ParseException: failed to parse report: 
/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
 The markup in the document following the root element must be well-formed.
        at 
org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:302)
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:288)
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
        ... 19 more
Caused by: org.xml.sax.SAXParseException; systemId: 
file:/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml;
 lineNumber: 824; columnNumber: 4; The markup in the document following the 
root element must be well-formed.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1375)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1377)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:328)
        at 
org.apache.ivy.plugins.report.XmlReportParser$SaxXmlReportParser.parse(XmlReportParser.java:258)
        at 
org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:300)

  was:
We're getting occasional build failures where Ivy seems to be trying to read 
only partially-complete XML files from the cache.

This happens only on our Hudson box, when it's running ~4-5 builds at a time, 
so my theory is that the separate Ivy processes are not blocking each other 
from reading incomplete files--just restarting a job makes it work the second 
time, so it's a very transient error.

Stack trace is below. Does it seem likely that RetrieveEngine's 
determineArtifactsToCopy is missing some locking/ordination around line 286/288 
where it uses cacheManager to get a file and then parse it?

java.lang.RuntimeException: problem during retrieve of 
bizo.com#b360-bizads-processes: java.text.ParseException: failed to parse 
report: 
/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
 The markup in the document following the root element must be well-formed.
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
        at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
        at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:67)
        at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:392)
        at org.apache.tools.ant.Target.performTasks(Target.java:413)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:811)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.text.ParseException: failed to parse report: 
/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
 The markup in the document following the root element must be well-formed.
        at 
org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:302)
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:288)
        at 
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
        ... 19 more
Caused by: org.xml.sax.SAXParseException; systemId: 
file:/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml;
 lineNumber: 824; columnNumber: 4; The markup in the document following the 
root element must be well-formed.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1375)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1377)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:328)
        at 
org.apache.ivy.plugins.report.XmlReportParser$SaxXmlReportParser.parse(XmlReportParser.java:258)
        at 
org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:300)

    
> incomplete xml files causing parse exceptions
> ---------------------------------------------
>
>                 Key: IVYDE-322
>                 URL: https://issues.apache.org/jira/browse/IVYDE-322
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>         Environment: ivy 2.2.0
>            Reporter: Stephen Haberman
>
> We're getting occasional build failures where Ivy seems to be trying to read 
> only partially-complete XML files from the cache.
> This happens only on our Hudson box, when it's running ~4-5 builds at a time, 
> so my theory is that the separate Ivy processes are not blocking each other 
> from reading incomplete files--just restarting a job makes it work the second 
> time, so it's a very transient error.
> Stack trace is below.
> Does it seem likely that RetrieveEngine's determineArtifactsToCopy is missing 
> some locking/ordination around line 286/288 where it uses cacheManager to get 
> a file and then parse it?
> java.lang.RuntimeException: problem during retrieve of 
> bizo.com#b360-bizads-processes: java.text.ParseException: failed to parse 
> report: 
> /mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
>  The markup in the document following the root element must be well-formed.
>       at 
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
>       at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
>       at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:67)
>       at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:601)
>       at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>       at org.apache.tools.ant.Task.perform(Task.java:348)
>       at org.apache.tools.ant.Target.execute(Target.java:392)
>       at org.apache.tools.ant.Target.performTasks(Target.java:413)
>       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>       at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>       at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>       at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>       at org.apache.tools.ant.Main.runBuild(Main.java:811)
>       at org.apache.tools.ant.Main.startAnt(Main.java:217)
>       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> Caused by: java.text.ParseException: failed to parse report: 
> /mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml:
>  The markup in the document following the root element must be well-formed.
>       at 
> org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:302)
>       at 
> org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:288)
>       at 
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
>       ... 19 more
> Caused by: org.xml.sax.SAXParseException; systemId: 
> file:/mnt/bizo/hudson/workspace/common-build/../ivycache/bizo.com-b360-bizads-processes-default.xml;
>  lineNumber: 824; columnNumber: 4; The markup in the document following the 
> root element must be well-formed.
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1375)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1377)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
>       at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
>       at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
>       at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
>       at javax.xml.parsers.SAXParser.parse(SAXParser.java:328)
>       at 
> org.apache.ivy.plugins.report.XmlReportParser$SaxXmlReportParser.parse(XmlReportParser.java:258)
>       at 
> org.apache.ivy.plugins.report.XmlReportParser.parse(XmlReportParser.java:300)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to