Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10406

Maven Jobs with "build modules in parallel" always ABORTED

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None

      Builds for Maven based jobs are finished with "ABORTED". The build for the job appeared to work fine, and then one build would finish with "ABORTED", and all subsequent builds would do the same, even after restarting Jenkins/Tomcat. The relevant error in the logs and the console output can be found in this github gist: https://gist.github.com/1096289

      The way I have been getting around this is to clear my local maven repository (rm -rf /home/jenkins/.m2/repository) (I'm not sure if this step is necessary), clearing the $JENKINS_HOME (rm -rf /home/jenkins/.jenkins), and starting with a fresh deployment of Jenkins in Tomcat. Deleting and recreating the job (with identical settings) does not solve the problem either.

      The only other references to this error are a Jenkins JIRA ticket and a thread in the mailing list.
      https://issues.jenkins-ci.org/browse/JENKINS-8827
      http://jenkins.361315.n4.nabble.com/jenkins-maven-build-job-didn-t-get-executed-tt3457622.html

      I created this issue at the user jieryn on Jenkin's IRC channel on freenode (#jenkins @ chat.freenode.net)'s request.

      This particular Jenkins setup does not have any slaves.

          [JENKINS-10406] Maven Jobs with "build modules in parallel" always ABORTED

          jieryn added a comment -

          jieryn added a comment - Related: https://gist.github.com/1096289 https://gist.github.com/1096368

          TL:DR – Enabling the "build modules in parallel" build option appears to be the cause of the issue. Or rather, disabling the "build modules in parallel" build option appears to mitigate the issue.

          I started to look back into this again, as this issue is a pretty big show stopper for my use of Jenkins.

          I tried various combinations of deleting the local maven repository, deleting the JENKINS_HOME directory, and even going all the way and starting completely fresh, Tomcat and all.

          Before doing this, I downloaded the 1.421 of Jenkins, and I noticed I was running into the issue here https://issues.jenkins-ci.org/browse/JENKINS-10407, which I resolved by using the system property setting mentioned.

          Every single combination I tried resulted in the build being "ABORTED" on the very first build, however, the console output was quite a bit different. It showed (obviously) the SCM transactions, a discovery of all of the Maven modules, and then it mentioned it was triggering a build for the same project, and then it finally would output "SUCCESS". However, the status in Jenkins shows as aborted, and the same error is shown in the logs.

          I found this curious, as I was able to successfully build the jobs prior, and never had it fail this consistently. I remembered that initially I had enabled an option to build the Maven modules concurrently on only some jobs, where as here I had enabled them for every job. I disabled the concurrent (parallel) build of modules for the jobs, and now they all appear to be working fine.

          Nathan Schulte added a comment - TL:DR – Enabling the "build modules in parallel" build option appears to be the cause of the issue. Or rather, disabling the "build modules in parallel" build option appears to mitigate the issue. I started to look back into this again, as this issue is a pretty big show stopper for my use of Jenkins. I tried various combinations of deleting the local maven repository, deleting the JENKINS_HOME directory, and even going all the way and starting completely fresh, Tomcat and all. Before doing this, I downloaded the 1.421 of Jenkins, and I noticed I was running into the issue here https://issues.jenkins-ci.org/browse/JENKINS-10407 , which I resolved by using the system property setting mentioned. Every single combination I tried resulted in the build being "ABORTED" on the very first build, however, the console output was quite a bit different. It showed (obviously) the SCM transactions, a discovery of all of the Maven modules, and then it mentioned it was triggering a build for the same project, and then it finally would output "SUCCESS". However, the status in Jenkins shows as aborted, and the same error is shown in the logs. I found this curious, as I was able to successfully build the jobs prior, and never had it fail this consistently. I remembered that initially I had enabled an option to build the Maven modules concurrently on only some jobs, where as here I had enabled them for every job. I disabled the concurrent (parallel) build of modules for the jobs, and now they all appear to be working fine.

          Josh Berry added a comment - - edited

          I am having this issue, as well. As pointed out in JENKINS-10540, if you try a maven2 version, this will work.

          Edit: Rather, I should say that for me trying a 2.2.1 version of maven worked. Not positive it will fix your issue.

          Josh Berry added a comment - - edited I am having this issue, as well. As pointed out in JENKINS-10540 , if you try a maven2 version, this will work. Edit: Rather, I should say that for me trying a 2.2.1 version of maven worked. Not positive it will fix your issue.

          Bob Tiernay added a comment -

          Anyone know the reason for this regression? I find it odd that the Jenkins dev wouldn't prioritize this issue considering that it seems like a commonly desired features for greater build throughput.

          Bob Tiernay added a comment - Anyone know the reason for this regression? I find it odd that the Jenkins dev wouldn't prioritize this issue considering that it seems like a commonly desired features for greater build throughput.

          Bob Tiernay added a comment -

          In terms of build throughput, I can't think of a more desired feature than "build modules in parallel" for multi-module builds. Just curious as to why others don't see this as essential. Perhaps I'm "doing it wrong"

          Bob Tiernay added a comment - In terms of build throughput, I can't think of a more desired feature than "build modules in parallel" for multi-module builds. Just curious as to why others don't see this as essential. Perhaps I'm "doing it wrong"

          Torben Knerr added a comment -

          Same here, seeing this with Jenkins 1.572 and Maven 3.0.5 parallel builds

          Torben Knerr added a comment - Same here, seeing this with Jenkins 1.572 and Maven 3.0.5 parallel builds

          Torben Knerr added a comment -

          btiernay did you find a workaround in the meantime?

          Torben Knerr added a comment - btiernay did you find a workaround in the meantime?

          Torben Knerr added a comment -

          Tried adding a dummy post build step in the hope that the build status would be derived from the last build step, but that did not help either...

          Torben Knerr added a comment - Tried adding a dummy post build step in the hope that the build status would be derived from the last build step, but that did not help either...

          Peter Buckley added a comment -

          I see (I think related?) issues with the "build modules in parallel" using 1.580.1. Symptoms can vary as any of the following:

          1. sub-module builds don't report back (some sub-modules show up as "didn't run" but they did run)
          2. overall build status is UNSTABLE and shows "No test failures" but sub-modules have test failures
          3. a few sub-module builds are from build #2160 (a non-existent build) but the overall build was #2159

          It would be great to get this "build modules in parallel" feature working well, it would be a more useful feature if it were stable.

          Peter Buckley added a comment - I see (I think related?) issues with the "build modules in parallel" using 1.580.1. Symptoms can vary as any of the following: 1. sub-module builds don't report back (some sub-modules show up as "didn't run" but they did run) 2. overall build status is UNSTABLE and shows "No test failures" but sub-modules have test failures 3. a few sub-module builds are from build #2160 (a non-existent build) but the overall build was #2159 It would be great to get this "build modules in parallel" feature working well, it would be a more useful feature if it were stable.

          Devayon Das added a comment -

          Hi maybe I could help with a fix? If you suggest where I can look?

          Devayon Das added a comment - Hi maybe I could help with a fix? If you suggest where I can look?

            Unassigned Unassigned
            nmschulte Nathan Schulte
            Votes:
            14 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: