Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: emma-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.378, Emma 1.21, Solaris 10

      Description

      Since updating Hudson (1.371 to 1.378) and Emma (1.20 to 1.21) all our builds are failing due to a nullpointer in EmmaPublisher:

      ERROR: Publisher hudson.plugins.emma.EmmaPublisher aborted due to exception
      java.lang.NullPointerException
      at hudson.plugins.emma.EmmaPublisher.perform(EmmaPublisher.java:132)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      at hudson.model.Build$RunnerImpl.post2(Build.java:157)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      at hudson.model.Run.run(Run.java:1303)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:137)

      Same problem occurs with Version 1.20 of the Emma-Plugin which was installed previously.

      1. EmmaException.txt
        28 kB
        egilwilde
      2. gjeudy_tomcat_stacktraces.txt
        10 kB
        gjeudy

        Activity

        lbrinkmann lbrinkmann created issue -
        Hide
        crbeng crbeng added a comment -

        I have the same problem.

        hudson version: 1.379
        emma version: 1.21

        Code coverage is one of the criteria for shipping our product. So this is quite a serious problem for us. Can this issue be escalated? Thanks.

        Show
        crbeng crbeng added a comment - I have the same problem. hudson version: 1.379 emma version: 1.21 Code coverage is one of the criteria for shipping our product. So this is quite a serious problem for us. Can this issue be escalated? Thanks.
        Hide
        egilwilde egilwilde added a comment -

        Error still there using Hudson 1.382.

        I would also appreciate it very much if this could be corrected.

        Show
        egilwilde egilwilde added a comment - Error still there using Hudson 1.382. I would also appreciate it very much if this could be corrected.
        Hide
        egilwilde egilwilde added a comment -

        I have been monitoring this problem on our installation for a few days. Not all builds fail because of this, so it seems to be an intermittent problem.

        I have noted, though, that for all builds that fail, the copy of the coverage report that is saved in the build result/emma folder (on master) is incomplete. As if the copy operation was interrupted mid-file. All our builds are executed on SSH linux slaves, build results are stored on our linux/tomcat master.

        This incomplete copy seems to cause a SAXParseException when calling getResult() on the EmmaBuildAction. See attached tomcat log excerpt.

        Show
        egilwilde egilwilde added a comment - I have been monitoring this problem on our installation for a few days. Not all builds fail because of this, so it seems to be an intermittent problem. I have noted, though, that for all builds that fail, the copy of the coverage report that is saved in the build result/emma folder (on master) is incomplete. As if the copy operation was interrupted mid-file. All our builds are executed on SSH linux slaves, build results are stored on our linux/tomcat master. This incomplete copy seems to cause a SAXParseException when calling getResult() on the EmmaBuildAction. See attached tomcat log excerpt.
        egilwilde egilwilde made changes -
        Field Original Value New Value
        Attachment EmmaException.txt [ 19926 ]
        Hide
        ki82 Christian Bremer added a comment -

        I have the same problem using emma 1.21 and Hudson 1.387.
        With this setup the NullPointerException only accours sometimes and only on slaves not master.

        Could this issue be escalated?

        Show
        ki82 Christian Bremer added a comment - I have the same problem using emma 1.21 and Hudson 1.387. With this setup the NullPointerException only accours sometimes and only on slaves not master. Could this issue be escalated?
        Hide
        kinow Bruno P. Kinoshita added a comment -

        Hi guys, I was setting up a job with Emma to show to a prospect when this exception occurred. I googled it and found this issue.

        As it seems there is no solution yet I tried a quick hack.

        My emma coverage xml files contain a comment right after the <?xml...?> tag. It looks like this:

        <?xml version="1.0" encoding="UTF-8"?><!-- EMMA v2.1.5320 (stable) report, generated Tue Jan 11 16:29:35 BRST 2011 -->

        I added a build step to invoke an ant build file with the following task:

        <replaceregexp file="coverage.xml" match="<!-.*->" replace="" byline="true" />

        I executed again my job and the exception was gone. It seems SAX has some problems with comments?

        This is a dirty workaround. If someone more experienced with SAX could take a look on how does it deal with comments. Maybe setting some option before calling the parser. I'll investigate it further when I find some free time. In the meanwhile I hope it helps you guys.

        Cheers
        Bruno

        Show
        kinow Bruno P. Kinoshita added a comment - Hi guys, I was setting up a job with Emma to show to a prospect when this exception occurred. I googled it and found this issue. As it seems there is no solution yet I tried a quick hack. My emma coverage xml files contain a comment right after the <?xml...?> tag. It looks like this: <?xml version="1.0" encoding="UTF-8"?><!-- EMMA v2.1.5320 (stable) report, generated Tue Jan 11 16:29:35 BRST 2011 --> I added a build step to invoke an ant build file with the following task: <replaceregexp file="coverage.xml" match="<!- .* ->" replace="" byline="true" /> I executed again my job and the exception was gone. It seems SAX has some problems with comments? This is a dirty workaround. If someone more experienced with SAX could take a look on how does it deal with comments. Maybe setting some option before calling the parser. I'll investigate it further when I find some free time. In the meanwhile I hope it helps you guys. Cheers Bruno
        Hide
        gjeudy gjeudy added a comment -

        I'm seeing the same problems as egilwilde:

        Running hudson 1.384, tomcat 6.0.29, JDK 1.5.0_13

        1. Exception only occurs when build runs on slave
        2. Running with linux SSH slave mode
        3. coverage.xml is incomplete on master
        4. IOException Pipe is already closed (probably that is what causes the incomplete coverage.xml file)
        4. As a consequence SAXParseException in tomcat logs and later NPE causing the build to fail.

        See exception stacktraces logs extracted from tomcat.

        nairb774 added a comment - 02/Feb/11 10:28 AM

        Step 4.1 in gjeudy's post is JENKINS-8592 and I hope to have that solved in the coming week. This won't solve this issue, but I just wanted to note that the 'pipe already closed' exceptions is a known issue that will be hopefully fixed soon.

        Show
        gjeudy gjeudy added a comment - I'm seeing the same problems as egilwilde: Running hudson 1.384, tomcat 6.0.29, JDK 1.5.0_13 1. Exception only occurs when build runs on slave 2. Running with linux SSH slave mode 3. coverage.xml is incomplete on master 4. IOException Pipe is already closed (probably that is what causes the incomplete coverage.xml file) 4. As a consequence SAXParseException in tomcat logs and later NPE causing the build to fail. See exception stacktraces logs extracted from tomcat. nairb774 added a comment - 02/Feb/11 10:28 AM Step 4.1 in gjeudy's post is JENKINS-8592 and I hope to have that solved in the coming week. This won't solve this issue, but I just wanted to note that the 'pipe already closed' exceptions is a known issue that will be hopefully fixed soon.
        gjeudy gjeudy made changes -
        Attachment gjeudy_tomcat_stacktraces.txt [ 20200 ]
        Hide
        nrhalland nrhalland added a comment -

        Same problem

        Hudson 1.395
        Emma Plugin 1.24

        @kinow/Bruno Thanks for the suggestion, I tried the same fix, but removing the comments doesn't fix the problem.

        Show
        nrhalland nrhalland added a comment - Same problem Hudson 1.395 Emma Plugin 1.24 @kinow/Bruno Thanks for the suggestion, I tried the same fix, but removing the comments doesn't fix the problem.
        Hide
        jenkins_build_admin A. Ullrich added a comment - - edited

        We have the same issue with Jenkins 1.399 and Emma Plugin 1.24.

        Like mentioned in the comment above the coverage.xml file coming from the slave is incomplete.

        Show
        jenkins_build_admin A. Ullrich added a comment - - edited We have the same issue with Jenkins 1.399 and Emma Plugin 1.24. Like mentioned in the comment above the coverage.xml file coming from the slave is incomplete.
        Hide
        ainze Andries Inzé added a comment -

        Also in 1.400 and Emma 1.24

        Show
        ainze Andries Inzé added a comment - Also in 1.400 and Emma 1.24
        Hide
        gjeudy gjeudy added a comment -

        still in 1.400 with emma 1.21
        only happens when running emma plugin on a slave machine; it happens intermittently.

        Show
        gjeudy gjeudy added a comment - still in 1.400 with emma 1.21 only happens when running emma plugin on a slave machine; it happens intermittently.
        Hide
        ainze Andries Inzé added a comment -
        Show
        ainze Andries Inzé added a comment - It's fixed in http://issues.hudson-ci.org/browse/HUDSON-7586 btw
        Hide
        mdirkse Maarten Dirkse added a comment -

        Any chance of applying the Hudson fix to Jenkins?

        Show
        mdirkse Maarten Dirkse added a comment - Any chance of applying the Hudson fix to Jenkins?

          People

          • Assignee:
            kohsuke Kohsuke Kawaguchi
            Reporter:
            lbrinkmann lbrinkmann
          • Votes:
            17 Vote for this issue
            Watchers:
            19 Start watching this issue

            Dates

            • Created:
              Updated: