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

Mysterious Maven JVM launch failure with exit code 143

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

      I see random test failures with errors like this:

      [workspace] $ /files/hudson/tools/linux-amd64/java1.6.0_13/jre/bin/java -cp /files/hudson/workspace/hudson-trunk/maven-agent/target/maven-agent-1.339-SNAPSHOT.jar:/tmp/hudson2645431271863489887test/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /tmp/hudson2645431271863489887test/apache-maven-2.2.1 /files/hudson/workspace/hudson-trunk/remoting/target/remoting-1.339-SNAPSHOT.jar /files/hudson/workspace/hudson-trunk/maven-interceptor/target/maven-interceptor-1.339-SNAPSHOT.jar 51346 /files/hudson/workspace/hudson-trunk/.m2/org/jvnet/hudson/maven2.1-interceptor/1.2/maven2.1-interceptor-1.2.jar
      ERROR: Failed to launch Maven. Exit code = 143
      

      This is an attempt to collect more information about this error.

          [JENKINS-5144] Mysterious Maven JVM launch failure with exit code 143

          hudson.maven.MavenMultiModuleTest.testIncrementalMultiModMaven failed with this in hudson-trunk #2314 at wssqe29 (linux)

          Kohsuke Kawaguchi added a comment - hudson.maven.MavenMultiModuleTest.testIncrementalMultiModMaven failed with this in hudson-trunk #2314 at wssqe29 (linux)

          Kohsuke Kawaguchi added a comment - - edited

          In #2303 on jennings, it failed in the middle of a Maven execution:

          [workspace] $ /files/hudson/tools/linux-i586/java1.6.0_13/jre/bin/java -cp /files/hudson/workspace/hudson-trunk@2/maven-agent/target/maven-agent-1.339-SNAPSHOT.jar:/tmp/hudson8694595019787781567test/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /tmp/hudson8694595019787781567test/apache-maven-2.2.1 /files/hudson/workspace/hudson-trunk@2/remoting/target/remoting-1.339-SNAPSHOT.jar /files/hudson/workspace/hudson-trunk@2/maven-interceptor/target/maven-interceptor-1.339-SNAPSHOT.jar 32778 /files/hudson/workspace/hudson-trunk@2/.m2/org/jvnet/hudson/maven2.1-interceptor/1.2/maven2.1-interceptor-1.2.jar
          <===[HUDSON REMOTING CAPACITY]===>channel started
          Executing Maven:  -B -f /tmp/hudson830232390152071883test/jobs/test0/workspace/pom.xml install
          [INFO] Scanning for projects...
          [INFO] Reactor build order: 
          [INFO]   moduleA
          [INFO]   moduleB
          [INFO]   moduleC
          [INFO]   moduleD
          [INFO]   multimod-top
          [INFO] ------------------------------------------------------------------------
          [INFO] Building moduleA
          [INFO]    task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [resources:resources {execution: default-resources}]
          [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
          [INFO] skip non existing resourceDirectory /tmp/hudson830232390152071883test/jobs/test0/workspace/moduleA/src/main/resources
          ERROR: Maven JVM terminated unexpectedly with exit code 143
          Finished: FAILURE
          

          Another test in the same execution failed similarly, but in a different mojo at Maven:

          [workspace] $ /files/hudson/tools/linux-i586/java1.6.0_13/jre/bin/java -cp /files/hudson/workspace/hudson-trunk@2/maven-agent/target/maven-agent-1.339-SNAPSHOT.jar:/tmp/hudson67324677261260599test/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /tmp/hudson67324677261260599test/apache-maven-2.2.1 /files/hudson/workspace/hudson-trunk@2/remoting/target/remoting-1.339-SNAPSHOT.jar /files/hudson/workspace/hudson-trunk@2/maven-interceptor/target/maven-interceptor-1.339-SNAPSHOT.jar 46970 /files/hudson/workspace/hudson-trunk@2/.m2/org/jvnet/hudson/maven2.1-interceptor/1.2/maven2.1-interceptor-1.2.jar
          <===[HUDSON REMOTING CAPACITY]===>channel started
          Executing Maven:  -B -f /tmp/hudson7652601214058099388test/jobs/test0/workspace/pom.xml -amd -pl org.jvnet.hudson.main.test.multimod:multimod-top,org.jvnet.hudson.main.test.multimod:moduleA,org.jvnet.hudson.main.test.multimod:moduleB,org.jvnet.hudson.main.test.multimod:moduleC install
          [INFO] Scanning for projects...
          [INFO] Reactor build order: 
          [INFO]   moduleA
          [INFO]   moduleB
          [INFO]   moduleC
          [INFO]   multimod-top
          [INFO] ------------------------------------------------------------------------
          [INFO] Building moduleA
          [INFO]    task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [resources:resources {execution: default-resources}]
          [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
          [INFO] skip non existing resourceDirectory /tmp/hudson7652601214058099388test/jobs/test0/workspace/moduleA/src/main/resources
          [INFO] [compiler:compile {execution: default-compile}]
          [INFO] Compiling 1 source file to /tmp/hudson7652601214058099388test/jobs/test0/workspace/moduleA/target/classes
          ERROR: Maven JVM terminated unexpectedly with exit code 143
          

          Kohsuke Kawaguchi added a comment - - edited In #2303 on jennings, it failed in the middle of a Maven execution: [workspace] $ /files/hudson/tools/linux-i586/java1.6.0_13/jre/bin/java -cp /files/hudson/workspace/hudson-trunk@2/maven-agent/target/maven-agent-1.339-SNAPSHOT.jar:/tmp/hudson8694595019787781567test/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /tmp/hudson8694595019787781567test/apache-maven-2.2.1 /files/hudson/workspace/hudson-trunk@2/remoting/target/remoting-1.339-SNAPSHOT.jar /files/hudson/workspace/hudson-trunk@2/maven-interceptor/target/maven-interceptor-1.339-SNAPSHOT.jar 32778 /files/hudson/workspace/hudson-trunk@2/.m2/org/jvnet/hudson/maven2.1-interceptor/1.2/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===>channel started Executing Maven: -B -f /tmp/hudson830232390152071883test/jobs/test0/workspace/pom.xml install [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] moduleA [INFO] moduleB [INFO] moduleC [INFO] moduleD [INFO] multimod-top [INFO] ------------------------------------------------------------------------ [INFO] Building moduleA [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /tmp/hudson830232390152071883test/jobs/test0/workspace/moduleA/src/main/resources ERROR: Maven JVM terminated unexpectedly with exit code 143 Finished: FAILURE Another test in the same execution failed similarly, but in a different mojo at Maven: [workspace] $ /files/hudson/tools/linux-i586/java1.6.0_13/jre/bin/java -cp /files/hudson/workspace/hudson-trunk@2/maven-agent/target/maven-agent-1.339-SNAPSHOT.jar:/tmp/hudson67324677261260599test/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /tmp/hudson67324677261260599test/apache-maven-2.2.1 /files/hudson/workspace/hudson-trunk@2/remoting/target/remoting-1.339-SNAPSHOT.jar /files/hudson/workspace/hudson-trunk@2/maven-interceptor/target/maven-interceptor-1.339-SNAPSHOT.jar 46970 /files/hudson/workspace/hudson-trunk@2/.m2/org/jvnet/hudson/maven2.1-interceptor/1.2/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===>channel started Executing Maven: -B -f /tmp/hudson7652601214058099388test/jobs/test0/workspace/pom.xml -amd -pl org.jvnet.hudson.main.test.multimod:multimod-top,org.jvnet.hudson.main.test.multimod:moduleA,org.jvnet.hudson.main.test.multimod:moduleB,org.jvnet.hudson.main.test.multimod:moduleC install [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] moduleA [INFO] moduleB [INFO] moduleC [INFO] multimod-top [INFO] ------------------------------------------------------------------------ [INFO] Building moduleA [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /tmp/hudson7652601214058099388test/jobs/test0/workspace/moduleA/src/main/resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 1 source file to /tmp/hudson7652601214058099388test/jobs/test0/workspace/moduleA/target/classes ERROR: Maven JVM terminated unexpectedly with exit code 143

          The most likely cause of failure is that the process is getting killed by kill(1). The default signal is SIGTERM and this results in 143, as explained in http://scv.bu.edu/services/help/FAQ/batchcode.txt

          Kohsuke Kawaguchi added a comment - The most likely cause of failure is that the process is getting killed by kill(1). The default signal is SIGTERM and this results in 143, as explained in http://scv.bu.edu/services/help/FAQ/batchcode.txt

          #2333 and #2334 both had one failure each of the same problem. They were both on wssqe29.

          I'm starting to suspect that this only happens on systems with multiple executors, which means some interference between tests that are run at the same time.

          Kohsuke Kawaguchi added a comment - #2333 and #2334 both had one failure each of the same problem. They were both on wssqe29. I'm starting to suspect that this only happens on systems with multiple executors, which means some interference between tests that are run at the same time.

          #2345 and #2346 on jennings, too.

          Kohsuke Kawaguchi added a comment - #2345 and #2346 on jennings, too.

          jchristi added a comment -

          I seem to get this much more frequently if I use the Hudson M2 Extra Steps Plugin and use it in my build. As soon as I disabled it from my build, the job succeeded without a problem.

          jchristi added a comment - I seem to get this much more frequently if I use the Hudson M2 Extra Steps Plugin and use it in my build. As soon as I disabled it from my build, the job succeeded without a problem.

          clecompt added a comment -

          I believe this is related to the behavior of the logout process on Microsoft Windows. When a logout from the console occurs Windows attempts to kill all processes spawned from the console including those spawned by a cmd.exe executable. I get this issue if a build is currently running and I log out. The use of the -Xrs flag when launching the java process should eliminate this issue.

          clecompt added a comment - I believe this is related to the behavior of the logout process on Microsoft Windows. When a logout from the console occurs Windows attempts to kill all processes spawned from the console including those spawned by a cmd.exe executable. I get this issue if a build is currently running and I log out. The use of the -Xrs flag when launching the java process should eliminate this issue.

          mo loe added a comment -

          i just stumbled over this bug: right after i restarted the host-vm (esxi hosting win 2003 server, tomcat 7.0.20, jenkins 1.433) to give it 2 additional cpu cores. but it isn't reproducible. on the second try clicking "build now" it worked fine.

          mo loe added a comment - i just stumbled over this bug: right after i restarted the host-vm (esxi hosting win 2003 server, tomcat 7.0.20, jenkins 1.433) to give it 2 additional cpu cores. but it isn't reproducible. on the second try clicking "build now" it worked fine.

          I reproduce this every time I log off from the Remote Desktop on server under windows XP running Jenkins in Tomcat as service: all jobs are stopped with message:

          ERROR: Maven JVM terminated unexpectedly with exit code 143
          

          Adding the -Xrs flag in global MAVEN_OPTS solved the problem.

          Alexandre Garnier added a comment - I reproduce this every time I log off from the Remote Desktop on server under windows XP running Jenkins in Tomcat as service: all jobs are stopped with message: ERROR: Maven JVM terminated unexpectedly with exit code 143 Adding the -Xrs flag in global MAVEN_OPTS solved the problem.

          We have been getting this for quite some time. We have Jenkins nodes running on CentOS linux. It only happens when we have two or more builds running at the same time. We are using the maven plugin for our builds. Our builds completely delete the workspace afterwards and checks out the entire source code into a separate workspace each time the build is run. Not sure if that is relevant but I just wanted to put any information that might help.

          Josh Chappelle added a comment - We have been getting this for quite some time. We have Jenkins nodes running on CentOS linux. It only happens when we have two or more builds running at the same time. We are using the maven plugin for our builds. Our builds completely delete the workspace afterwards and checks out the entire source code into a separate workspace each time the build is run. Not sure if that is relevant but I just wanted to put any information that might help.

            Unassigned Unassigned
            kohsuke Kohsuke Kawaguchi
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: