• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • core
    • Jenkins 2.150
      Windows 7
      cygwin

      After executing successfully the shell script the workers remain stuck for 10 minutes on the final "exit 0".

      There hasn't been any other failure that I could find: all the jobs run exactly as planned, they just don't seem to exit.

      The fact that the jobs remain stuck for exactly 600 seconds makes me think of a timeout of some sort.

      Reverting to 2.138 fixed the issue, that's why I am marking it as a regression.

          [JENKINS-55106] Build stuck on final "exit 0"

          Can you please fix this? 

          Philipp Mascha added a comment - Can you please fix this? 

          We've had this problem for 6 months or more, and have been searching high and low for a solution, without finding this issue.

          Just applied the workaround on one of our agents, and immediately cut down the build-time of one of our jobs by 25 minutes!!!!!!!!!! 

          I can't wait to see how much server time will be freed by this, but it looks like a LOT!

          Flemming Steffensen added a comment - We've had this problem for 6 months or more, and have been searching high and low for a solution, without finding this issue. Just applied the workaround on one of our agents, and immediately cut down the build-time of one of our jobs by 25 minutes!!!!!!!!!!  I can't wait to see how much server time will be freed by this, but it looks like a LOT!

          Andy Lin added a comment -

          This issue is preventing me from upgrading my Jenkins, and the plugin to Jenkins version gap is getting harder and harder to deal with.

          Is this issue going to be looked at? And has anyone had success with a workaround for a Jenkins instance that uses only slave machines?

          Andy Lin added a comment - This issue is preventing me from upgrading my Jenkins, and the plugin to Jenkins version gap is getting harder and harder to deal with. Is this issue going to be looked at? And has anyone had success with a workaround for a Jenkins instance that uses only slave machines?

          Ken Lamb added a comment -

          Just wanted to add a "me too" to Andy Lin's comment.
          I used to be very diligent about keeping my Jenkins and all the plugins up to date.
          This bug, however, has everything stuck with what works using Jenkins 2.138.4.

          Ken Lamb added a comment - Just wanted to add a "me too" to Andy Lin's comment. I used to be very diligent about keeping my Jenkins and all the plugins up to date. This bug, however, has everything stuck with what works using Jenkins 2.138.4.

          John Rocha added a comment -

          loafloaf, what scenario are you encountering this under? I had a similar problem when using MS Visual Studio on a slave.

          In my case the problem is that the slave waits for remote processes to close, and has a timeout of ~2 minutes per process. I found that I had parallel compiles enabled and 6 remote VS compile session on the slave. When it finished, those VS processes would not go away, and every 2 minutes jenknis would kill one of them.

          I learned that MS causes compile processes to stick around once they are started. The idea being that when a new compile is needed it can grab one of the idle processes. However, in my case Jenkins doesn't need/want any more compiles and is stuck waiting for the VS processes to go away.

          There is a flag that can be used at the command line that informs VS to not keep the processes alive. Details for this can be found in a similar issue I logged JENKINS-59400

          John Rocha added a comment - loafloaf , what scenario are you encountering this under? I had a similar problem when using MS Visual Studio on a slave. In my case the problem is that the slave waits for remote processes to close, and has a timeout of ~2 minutes per process. I found that I had parallel compiles enabled and 6 remote VS compile session on the slave. When it finished, those VS processes would not go away, and every 2 minutes jenknis would kill one of them. I learned that MS causes compile processes to stick around once they are started. The idea being that when a new compile is needed it can grab one of the idle processes. However, in my case Jenkins doesn't need/want any more compiles and is stuck waiting for the VS processes to go away. There is a flag that can be used at the command line that informs VS to not keep the processes alive. Details for this can be found in a similar issue I logged  JENKINS-59400

          Andy Lin added a comment -

          rocha_stratovan, I do use MS Visual Studio on some of my slave machines, but I don't think it does parallel compilation. I'll be sure to try out what you suggested. Do you experience the issue if you don't do parallel compiles?

          I have Mac slave machines for the other half. The solution you had might apply in some way so I'll have to investigate if xcodebuild also does something similar with lingering processes. Thanks!

          Andy Lin added a comment - rocha_stratovan , I do use MS Visual Studio on some of my slave machines, but I don't think it does parallel compilation. I'll be sure to try out what you suggested. Do you experience the issue if you don't do parallel compiles? I have Mac slave machines for the other half. The solution you had might apply in some way so I'll have to investigate if xcodebuild also does something similar with lingering processes. Thanks!

          John Rocha added a comment -

          loafloaf, I didn't seem to notice it when I did simple compiles without parallel compilation. Although I honestly would expect there to be at least a 2 minute delay even if there is just one compile process. But I don't know.

          Good luck.

          John Rocha added a comment - loafloaf , I didn't seem to notice it when I did simple compiles without parallel compilation. Although I honestly would expect there to be at least a 2 minute delay even if there is just one compile process. But I don't know. Good luck.

          kredens added a comment -

          Well, time passes, and some jobs still get stuck on the FINAL stage for about two minutes before finally letting go. How hard can it be to fix this?

          kredens added a comment - Well, time passes, and some jobs still get stuck on the FINAL stage for about two minutes before finally letting go. How hard can it be to fix this?

          Daniel Beck added a comment -

          kredens If it's so easy, submit a PR that does it.

          Daniel Beck added a comment - kredens If it's so easy, submit a PR that does it.

          kredens added a comment -

          danielbeck I'm not a developer on this project, neither am I using it by choice. Also - it used to work fine until someone changed something and can't be bothered to fix it.

          kredens added a comment - danielbeck I'm not a developer on this project, neither am I using it by choice. Also - it used to work fine until someone changed something and can't be bothered to fix it.

            Unassigned Unassigned
            ippo343 Michele Ippolito
            Votes:
            22 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated: