When using Amazon EC2 plugin, builds on newly created EC2 instances sometimes hang.
      We have two permanent slaves for a certain label (e.g. 'unittest'),
      which is generated from an AMI.
      The same AMI is specified within Amazon EC2 plugin settings.

      We have a job which can be executed concurrently
      When we invoke three builds at one time, two permanent slaves are exhausted
      and the new one is created.

      The problem is that the build on the new slave hangs at the end of it
      where xUnit plugin is aggregating the test result.

      [CHECKSTYLE] Collecting checkstyle analysis files...
      [CHECKSTYLE] Computing warning deltas based on reference build #850
      [FINDBUGS] Collecting findbugs analysis files...
      [FINDBUGS] Computing warning deltas based on reference build #850
      Archiving artifacts
      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing JUnit
      [xUnit] [INFO] - [JUnit] - 581 test report file(s) were found with the pattern '**/testresult/**/*.xml' relative to '/var/lib/jenkins/workspace/400_Precommit_Check_Branch' for the testing framework 'JUnit'.
      

      After aborting the build, the following error is shown.

      ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception
      java.lang.InterruptedException
      	at java.lang.Object.wait(Native Method)
      	at hudson.remoting.Request.call(Request.java:146)
      	at hudson.remoting.Channel.call(Channel.java:665)
      	at hudson.FilePath.act(FilePath.java:841)
      	at hudson.FilePath.act(FilePath.java:825)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.performTests(XUnitPublisher.java:170)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:115)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:92)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
      	at hudson.model.Run.execute(Run.java:1541)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:236)
      Email was triggered for: Failure
      Sending email for trigger: Failure
      

      I tried to capture the thread dump, but both master and the target slave had EMPTY thread dump while another slave had its own.
      I'd appreciate if someone give me advice.

      Jenkins ver. 1.491
      xUnit plugin 1.51
      Amazon EC2 plugin 1.17

        1. hs_err_pid15419.log
          92 kB
          Eckhard Völlm
        2. jstack_master.txt
          105 kB
          Antti Rasinen
        3. jstack_slave.out
          13 kB
          Antti Rasinen
        4. lsof_slave.out
          6 kB
          Antti Rasinen

          [JENKINS-15931] Build is hanging in xUnit plugin processing

          Hiroko Tamagawa created issue -
          Hiroko Tamagawa made changes -
          Assignee Original: Francis Upton [ francisu ]
          Hiroko Tamagawa made changes -
          Labels New: ec2 hang slave xunit
          Antti Rasinen made changes -
          Attachment New: jstack_master.txt [ 23220 ]
          Attachment New: jstack_slave.out [ 23221 ]
          Attachment New: lsof_slave.out [ 23222 ]
          Francis Upton made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Eckhard Völlm made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Eckhard Völlm made changes -
          Assignee New: Gregory Boissinot [ gbois ]
          Eckhard Völlm made changes -
          Attachment New: hs_err_pid15419.log [ 31634 ]
          Francis Upton made changes -
          Component/s Original: ec2-plugin [ 15625 ]
          Francis Upton made changes -
          Summary Original: Build is hanging on newly created EC2 slaves New: Build is hanging in xUnit plugin processing
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 146733 ] New: JNJira + In-Review [ 186097 ]

            nfalco Nikolas Falco
            tmgw165 Hiroko Tamagawa
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: