[JIRA] Created: (JENKINS-11251) Cannot parse coverage results Premature end of file.

45 views
Skip to first unread message

frederic.marius@scarlet.be (JIRA)

unread,
Oct 7, 2011, 2:35:19 AM10/7/11
to jenkinsc...@googlegroups.com
Cannot parse coverage results Premature end of file.
----------------------------------------------------

Key: JENKINS-11251
URL: https://issues.jenkins-ci.org/browse/JENKINS-11251
Project: Jenkins
Issue Type: Bug
Components: core
Environment: Linux (RHEL 5.6), Jenkins 1.427
Reporter: Frederic Marius


Our build server contains lots of modules, and is frequently under high load (we're adding slaves to distribute the load over different servers).
The problem is that sometimes, under high load the builds fail when trying to parse the cobertura files.
These are the details of the error:

{quote}
[DEBUG] --------------------
[INFO] Cobertura Report generation was successful.
[TASKS] Skipping maven reporter: there is already a result available.
[JENKINS] Recording coverage results
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.codehaus.mojo:cobertura-maven-plugin:2.4:cobertura': Cannot parse coverage results
Premature end of file.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.codehaus.mojo:cobertura-maven-plugin:2.4:cobertura': Cannot parse coverage results
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:698)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:185)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:160)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:1064)
at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:995)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.maven.plugin.PluginManagerException: Cannot parse coverage results
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:196)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 28 more
Caused by: hudson.util.IOException2: Cannot parse coverage results
at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:89)
at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:52)
at hudson.plugins.cobertura.MavenCoberturaPublisher$MavenCoberturaActionAdder.call(MavenCoberturaPublisher.java:281)
at hudson.plugins.cobertura.MavenCoberturaPublisher$MavenCoberturaActionAdder.call(MavenCoberturaPublisher.java:267)
at hudson.maven.MavenBuild$ProxyImpl.execute(MavenBuild.java:415)
at hudson.maven.MavenBuild$ProxyImpl2.execute(MavenBuild.java:488)
at sun.reflect.GeneratedMethodAccessor511.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at hudson.model.Executor$1.call(Executor.java:514)
at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
at $Proxy65.execute(Unknown Source)
at sun.reflect.GeneratedMethodAccessor876.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
... 9 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:81)
... 26 more
{quote}

Any help would be appreciated.
Let me know if you need more information, I'll be glad to give it !

Thanks a lot,
Frederic

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


frederic.marius@scarlet.be (JIRA)

unread,
Oct 7, 2011, 2:37:19 AM10/7/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153707#comment-153707 ]

Frederic Marius edited comment on JENKINS-11251 at 10/7/11 6:36 AM:
--------------------------------------------------------------------

I first thought the issue was the same as JENKINS-7871, but the stack trace looks a little bit different, and clearly the problem is still present.

was (Author: feniks):
I first thought the issue was the same as this one, but the stack trace looks a little bit different, and clearly the problem is still present.

frederic.marius@scarlet.be (JIRA)

unread,
Oct 10, 2011, 2:38:19 AM10/10/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153769#comment-153769 ]

Frederic Marius commented on JENKINS-11251:
-------------------------------------------

I can confirm that this type of problem appears randomly on different projects: the projects that had this error previously now build correctly, and some other projects that built fine now suddenly have this error.

kk@kohsuke.org (JIRA)

unread,
Oct 10, 2011, 6:32:19 PM10/10/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153795#comment-153795 ]

Kohsuke Kawaguchi commented on JENKINS-11251:
---------------------------------------------

Can you check the version number of slave.jar and see which version it is? I wonder if you've been using old version of the slave.jar that doesn't have our recent fixes to these issues.

frederic.marius@scarlet.be (JIRA)

unread,
Oct 19, 2011, 3:32:22 AM10/19/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154077#comment-154077 ]

Frederic Marius commented on JENKINS-11251:
-------------------------------------------

To determine the version I've used:
jar xvf slave.jar jenkins/remoting/jenkins-version.properties
According to this file we have version=2.4

plaflamme@java.net (JIRA)

unread,
Nov 9, 2011, 10:16:17 PM11/9/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155259#comment-155259 ]

plaflamme commented on JENKINS-11251:
-------------------------------------

We have the same issue, not using slaves. It's happening on our master Jenkins instance, randomly.

We're running Jenkins 1.433 and using cobertura maven plugin 2.3.

I can upgrade Jenkins see if that changes anything.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

kk@kohsuke.org (JIRA)

unread,
Jun 15, 2012, 5:23:23 PM6/15/12
to jenkinsc...@googlegroups.com

Notice that in the original reported case, the stack trace includes "determineDocVersion", so this indicates that the pipe was lost very early in the connection. Possibly even before a single byte was read. That sounds like JENKINS-8703, which was released in remoting 1.420. So if anyone is running older version of master/slave.jar, the first thing to do is to upgrade. But the comment from Philippe indicates that it's still happening in a newer version of Jenkins, so there must be still something going on.

JENKINS-7871 has different stack trace, and that is happening toward the end of the file.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

kk@kohsuke.org (JIRA)

unread,
Jun 15, 2012, 5:27:23 PM6/15/12
to jenkinsc...@googlegroups.com
 
Kohsuke Kawaguchi edited a comment on Bug JENKINS-11251

Looking at the cobertura plugin, I see that it's not reading from a pipe (which I assumed so incorrectly earlier.) Instead, this is loading a local file. That changes everything.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

kk@kohsuke.org (JIRA)

unread,
Jun 15, 2012, 9:33:23 PM6/15/12
to jenkinsc...@googlegroups.com

Bumped up the priority of this plugin to make it a candidate for LTS backporting.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

kk@kohsuke.org (JIRA)

unread,
Jun 15, 2012, 9:33:23 PM6/15/12
to jenkinsc...@googlegroups.com
Change By: Kohsuke Kawaguchi (16/Jun/12 1:31 AM)
Priority: Major Blocker
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

dogfood@java.net (JIRA)

unread,
Jun 15, 2012, 10:17:23 PM6/15/12
to jenkinsc...@googlegroups.com
dogfood commented on Bug JENKINS-11251

Integrated in jenkins_main_trunk #1764
[FIXED JENKINS-11251] (Revision f49d6258451155c716976d7af5433c0fde7fe890)

Result = SUCCESS
Kohsuke Kawaguchi : f49d6258451155c716976d7af5433c0fde7fe890
Files :

  • core/src/main/java/hudson/FilePath.java
  • changelog.html
  • pom.xml
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 15, 2012, 10:37:23 PM6/15/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
core/src/main/java/hudson/FilePath.java
pom.xml
http://jenkins-ci.org/commit/jenkins/f49d6258451155c716976d7af5433c0fde7fe890
Log:
[FIXED JENKINS-11251]

The actual meat of the change is in remoting.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 15, 2012, 10:37:24 PM6/15/12
to jenkinsc...@googlegroups.com
Change By: SCM/JIRA link daemon (16/Jun/12 2:36 AM)
Status: Open Resolved
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 15, 2012, 10:37:24 PM6/15/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/remoting/ProxyOutputStream.java
src/main/java/hudson/remoting/Request.java
http://jenkins-ci.org/commit/remoting/8ffed0da4996934bfc28bf6b08c258d367a1c526
Log:
[JENKINS-11251 JENKINS-9189] Resurrecting what's deleted in e0e154d12d7a10759287b187467389c6e643c12b

When communicating with remoting < 2.15, this allows them to continue to
perform some degree of syncing, so that they can still enjoy the fix for
JENKINS-9189.

None of these code is exposed via API outside remoting, so at some point
we can revert this change to simplify the code a bit and eliminate the
redundancy, because as long as >= 2.15 remoting talk to each other,
PipeWriter does everything we need.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 15, 2012, 10:37:24 PM6/15/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/remoting/Channel.java
src/main/java/hudson/remoting/Pipe.java
src/main/java/hudson/remoting/PipeWriter.java
src/main/java/hudson/remoting/ProxyOutputStream.java
src/main/java/hudson/remoting/Request.java
src/main/java/hudson/remoting/Response.java
http://jenkins-ci.org/commit/remoting/e0e154d12d7a10759287b187467389c6e643c12b
Log:
[FIXED JENKINS-11251] reimplemented I/O and Request/Response sync

See PipeWriter javadoc for the discussion and the context of this.
This change re-implements the original fix for JENKINS-9189.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 15, 2012, 10:37:25 PM6/15/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/test/java/hudson/remoting/PipeWriterTest.java
src/test/java/hudson/remoting/PipeWriterTestChecker.java
src/test/java/hudson/remoting/RmiTestBase.java
http://jenkins-ci.org/commit/remoting/00609519a68bb2b488d6217d49f53a76d955bed0
Log:
Added a test case for JENKINS-11251.

Compare: https://github.com/jenkinsci/remoting/compare/cb1854b81ac8...00609519a68b

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jul 8, 2012, 8:29:24 AM7/8/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
core/src/main/java/hudson/FilePath.java
pom.xml
http://jenkins-ci.org/commit/jenkins/6b495ceecc68d668690433eef663362d8ddede50
Log:
[FIXED JENKINS-11251]

The actual meat of the change is in remoting.

(cherry picked from commit f49d6258451155c716976d7af5433c0fde7fe890)

Conflicts:

changelog.html

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
Reply all
Reply to author
Forward
0 new messages