[JIRA] (JENKINS-52661) P4 Plugin fails to parse changelog

15 views
Skip to first unread message

peanderson@ea.com (JIRA)

unread,
Jul 19, 2018, 12:17:02 PM7/19/18
to jenkinsc...@googlegroups.com
peter anderson created an issue
 
Jenkins / Bug JENKINS-52661
P4 Plugin fails to parse changelog
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2018-07-19 16:16
Environment: CloudBees Jenkins Enterprise 2.121.1.2-rolling
P4 Plugin 1.8.9
Docker image: cloudbees/jenkins-enterprise:2.121.1.2
Labels: p4changeeparser changelog SAXParseException
Priority: Major Major
Reporter: peter anderson

Some Jenkins jobs fail because the P4 plugin is not able to parse the changelog: 

org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/Maintenance/builds/4/changelog5.xml; lineNumber: 1; columnNumber: 1; Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) 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:400) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) at javax.xml.parsers.SAXParser.parse(SAXParser.java:328) at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:50) Caused: org.xml.sax.SAXException: Could not parse perforce changelog: org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/Maintenance/builds/4/changelog5.xml; lineNumber: 1; columnNumber: 1; Premature end of file. at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:54) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:847) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:143) at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1041) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

rpitt@ea.com (JIRA)

unread,
Aug 9, 2018, 9:06:02 AM8/9/18
to jenkinsc...@googlegroups.com
Robert Pitt commented on Bug JENKINS-52661
 
Re: P4 Plugin fails to parse changelog

Note we're still suffering from this in a number of jobs.

Some additional context, the file in question invariably looks perfectly but with 0 changes:

<?xml version='1.0' encoding='UTF-8'?>
<changelog>
</changelog>

We're using it in a pipeline job which does multiple checkouts (we have multiple p4 servers).
I'm not sure we've ever seen it in a job which does a single checkout from one server.

rpitt@ea.com (JIRA)

unread,
Aug 9, 2018, 9:07:03 AM8/9/18
to jenkinsc...@googlegroups.com
Robert Pitt edited a comment on Bug JENKINS-52661
Note we're still suffering from this in a number of jobs.

Some additional context, the file in question invariably looks perfectly but with 0 changes (valid/expected) :
{noformat}

<?xml version='1.0' encoding='UTF-8'?>
<changelog>
</changelog>{noformat}

We're using it in a pipeline job which does multiple checkouts (we have multiple p4 servers).
I'm not sure we've ever seen it in a job which does a single checkout from one server.

eric.lloyd3333@gmail.com (JIRA)

unread,
Aug 20, 2018, 11:42:01 AM8/20/18
to jenkinsc...@googlegroups.com

I was also seeing this issue when running many parallel stages all doing checkouts.  It seems like some of the stages start before the changlog.xml is fully generated.  After the build finishes if I go on the master and check the changelog is correct.  To fix this, for now, I had to move to only allow one stage to checkout at a time but that is less than Ideal.

I am using P4 plugin version 1.8.14

pallen@perforce.com (JIRA)

unread,
Oct 18, 2018, 9:56:03 AM10/18/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
 
Change By: Paul Allen
Labels: P4_VERIFY SAXParseException changelog p4changeeparser
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

peanderson@ea.com (JIRA)

unread,
Nov 2, 2018, 5:49:03 AM11/2/18
to jenkinsc...@googlegroups.com
peter anderson updated an issue
Change By: peter anderson
Some Jenkins jobs fail because the P4 plugin is not able to parse the changelog: 
{noformat}

org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/Maintenance/builds/4/changelog5.xml; lineNumber: 1; columnNumber: 1; Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) 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:400) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) at javax.xml.parsers.SAXParser.parse(SAXParser.java:328) at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:50) Caused: org.xml.sax.SAXException: Could not parse perforce changelog: org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/Maintenance/builds/4/changelog5.xml; lineNumber: 1; columnNumber: 1; Premature end of file. at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:54) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:847) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:143) at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1041) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE
{noformat}


The following error appears to be because of an invalid xml character in the perforce comment.
{noformat}
org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/job-name-here/builds/1897/changelog2.xml; lineNumber: 81; columnNumber: 56; An invalid XML character (Unicode: 0x5) was found in the element content of the document.

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
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:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2923)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:328)
at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:50)
Caused: org.xml.sax.SAXException: Could not parse perforce changelog:
org.xml.sax.SAXParseException; systemId: file:/var/jenkins_home/jobs/job-name-here/builds/1897/changelog2.xml; lineNumber: 81; columnNumber: 56; An invalid XML character (Unicode: 0x5) was found in the element content of the document.

at org.jenkinsci.plugins.p4.changes.P4ChangeParser.parse(P4ChangeParser.java:54)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:847)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:143)
at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1041)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
{noformat}

Perforce comment contains a unicode characher:

peanderson@ea.com (JIRA)

unread,
Nov 2, 2018, 5:50:02 AM11/2/18
to jenkinsc...@googlegroups.com
peter anderson commented on Bug JENKINS-52661
 
Re: P4 Plugin fails to parse changelog

I have added another case where the xml parser fails. This time it appears to be related to the perforce commit comment containing a unicode character:

peanderson@ea.com (JIRA)

unread,
Nov 2, 2018, 5:50:02 AM11/2/18
to jenkinsc...@googlegroups.com
peter anderson updated an issue
Change By: peter anderson
Attachment: screenshot-1.png

peanderson@ea.com (JIRA)

unread,
Nov 2, 2018, 5:52:01 AM11/2/18
to jenkinsc...@googlegroups.com
peter anderson edited a comment on Bug JENKINS-52661
I have added another case where the xml parser fails. This time it appears to be related to the perforce commit comment containing a unicode character:
!screenshot-1.png|thumbnail!

These kinds of errors cause the job to fail in jenkins - this is a big problem considering some builds trigger of the success of another build. They shouldn't be failing for this reason.

peanderson@ea.com (JIRA)

unread,
Nov 22, 2018, 11:43:02 AM11/22/18
to jenkinsc...@googlegroups.com
peter anderson updated an issue
Change By: peter anderson
Attachment: changelog2.xml

peanderson@ea.com (JIRA)

unread,
Nov 22, 2018, 11:43:02 AM11/22/18
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Nov 23, 2018, 11:27:02 AM11/23/18
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-52661
 
Re: P4 Plugin fails to parse changelog

Have worked with Peter and reproduced the XML parse error he reported. Created new defect:

JENKINS-54841

We believe the original problem still exists and is related to multiple nodes running at the same time potentially causing concurrency issues reading and writing the changelog.xml.

pallen@perforce.com (JIRA)

unread,
Dec 3, 2018, 11:59:03 AM12/3/18
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-52661
 
Change By: Paul Allen
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
Dec 3, 2018, 11:59:03 AM12/3/18
to jenkinsc...@googlegroups.com
Paul Allen assigned an issue to Paul Allen
 
Change By: Paul Allen
Assignee: Paul Allen

pallen@perforce.com (JIRA)

unread,
Dec 3, 2018, 11:59:04 AM12/3/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Labels: P4_A P4_VERIFY SAXParseException

pallen@perforce.com (JIRA)

unread,
Dec 3, 2018, 11:59:04 AM12/3/18
to jenkinsc...@googlegroups.com
Paul Allen updated Bug JENKINS-52661
 

Ready for release.

Change By: Paul Allen
Status: In Progress Fixed but Unreleased
Resolution: Fixed

pallen@perforce.com (JIRA)

unread,
Dec 3, 2018, 12:00:02 PM12/3/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Labels: P4_A P4_VERIFY SAXParseException

pallen@perforce.com (JIRA)

unread,
Dec 7, 2018, 4:35:02 AM12/7/18
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-52661
 
Re: P4 Plugin fails to parse changelog

Released in 1.9.5

A '?' character is used for any low ascii characters not supported by XML.

pallen@perforce.com (JIRA)

unread,
Dec 7, 2018, 4:36:03 AM12/7/18
to jenkinsc...@googlegroups.com
 

Released in 1.9.5

A '?' character is used for any low ascii characters not supported by XML.

Change By: Paul Allen
Status: Fixed but Unreleased Closed

pallen@perforce.com (JIRA)

unread,
Dec 7, 2018, 4:36:04 AM12/7/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Comment:
Released in 1.9.5

A '?' character is used for any low ascii characters not supported by XML.

aquatic_reef@hotmail.com (JIRA)

unread,
Aug 1, 2019, 3:05:03 PM8/1/19
to jenkinsc...@googlegroups.com
Noel C commented on Bug JENKINS-52661
 
Re: P4 Plugin fails to parse changelog

Hi,

I am getting similar issue where Jenkins is not able to generate the changes (e.g. "No changes from last build").  But changelog.xml exist and looks valid.  It looks like my issue is due to special characters (e.g. "&", and "+" at least) within the <clientId> tags such as below

<clientId>blahblah_&_blahblah</clientI

I see the below in my Jenkins log:

Could not parse Perforce changelog: /var/lib/jenkins/jobs/<job name>/builds/28/changelog.xml
Aug 01, 2019 8:54:08 AM SEVERE org.jenkinsci.plugins.p4.changes.P4ChangeParser parse

 

aquatic_reef@hotmail.com (JIRA)

unread,
Aug 1, 2019, 3:06:03 PM8/1/19
to jenkinsc...@googlegroups.com
Noel C edited a comment on Bug JENKINS-52661
Hi,

I am getting similar issue where Jenkins is not able to generate the changes (e.g. "No changes from last build").  But changelog.xml exist and looks valid.  It looks like my issue is due to special characters (e.g. "&", and "+" at least) within the <clientId> tags such as below

{color:#b00117}<clientId>blahblah_&_blahblah</ clientI clientId> {color}


I see the below in my Jenkins log:

Could not parse Perforce changelog: /var/lib/jenkins/jobs/<job name>/builds/28/changelog.xml
{color:#88aa88}Aug 01, 2019 8:54:08 AM{color} {color:#aaaaaa}SEVERE{color} {color:#aaaaaa}org.jenkinsci.plugins.p4.changes.P4ChangeParser parse

{color}
 
Reply all
Reply to author
Forward
0 new messages