[JIRA] (JENKINS-17116) gracefull job termination

2019-01-08 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-17116  
 
 
  gracefull job termination   
 

  
 
 
 
 

 
Change By: 
 Karl Parry  
 
 
Comment: 
 Final Edit - our issue was identified not related to the TERM kill but a rogue jenkins triggering a duplicate job   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2019-01-08 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 We are experiencing an Final Edit - our  issue  that seems to be  was identified not  related to  [~deepchip] comment. A job is recieving  the TERM  signal  kill  but  the node is still running the job and even  a rogue jenkins  triggering  "child" jobs without ever reporting these jobs back to master. We are running these jobs via an SSH slave plugin using Jenkins Pipeline scripts (running Jenkins 2.150.1 LTS and ssh slave plugin 1.29.1){color:#ff}_additional edit_{color}: noticed my SSH Slave plugin is out of date - I will update to 1.29.4 tomorrow in case this is the cause but based on changelog doesn't seem to relate.{color:#0747a6}Additional details{color}: The job we noticed this behaviour on was an application ant build that was stopped just after triggering from  a  GitHub Enterprise Push Event. That  duplicate  job  was stopped, then re-triggered using different parameters. The re-trigger seemed to complete then the first job re-triggered but there is no record of the re-trigger in Jenkins build history of either the main build job or the child job that was triggered. The only reason we know it triggered is the artifact was uploaded to our artifact server (sonatype nexus) and notified our tracking system (its a curl command in the child job it triggers).     
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2019-01-07 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 We are experiencing an issue that seems to be related to [~deepchip] comment. A job is recieving the TERM signal but the node is still running the job and even triggering "child" jobs without ever reporting these jobs back to master. We are running these jobs via an SSH slave plugin using Jenkins Pipeline scripts (running Jenkins 2.150.1 LTS and ssh slave plugin 1.29.1){color:#ff}_additional edit_{color}: noticed my SSH Slave plugin is out of date - I will update to 1.29.4 tomorrow in case this is the cause but based on changelog doesn't seem to relate. {color:#0747a6}Additional details{color}: The job we noticed this behaviour on was an application ant build that was stopped just after triggering from a GitHub Enterprise Push Event. That job was stopped, then re-triggered using different parameters. The re-trigger seemed to complete then the first job re-triggered but there is no record of the re-trigger in Jenkins build history of either the main build job or the child job that was triggered. The only reason we know it triggered is the artifact was uploaded to our artifact server (sonatype nexus) and notified our tracking system (its a curl command in the child job it triggers).   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2019-01-07 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 We are experiencing an issue that seems to be related to [~deepchip] comment. A job is recieving the TERM signal but the node is still running the job and even triggering "child" jobs without ever reporting these jobs back to master. We are running these jobs via an SSH slave plugin using Jenkins Pipeline scripts (running Jenkins 2.150.1 LTS and ssh slave plugin 1.29.1){color:# FF ff }_additional edit_{color}: noticed my SSH Slave plugin is out of date - I will update to 1.29.4 tomorrow in case this is the cause but based on changelog doesn't seem to relate.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2019-01-07 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 We are experiencing an issue that seems to be related to [~deepchip] comment. A job is recieving the TERM signal but the node is still running the job and even triggering "child" jobs without ever reporting these jobs back to master. We are running these jobs via an SSH slave plugin using Jenkins Pipeline scripts (running Jenkins 2.150.1 LTS and ssh slave plugin 1.29.1) {color:#FF}_additional edit_{color}: noticed my SSH Slave plugin is out of date - I will update to 1.29.4 tomorrow in case this is the cause but based on changelog doesn't seem to relate.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2019-01-07 Thread karl.dean.pa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Parry commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 We are experiencing an issue that seems to be related to Martin d'Anjou comment. A job is recieving the TERM signal but the node is still running the job and even triggering "child" jobs without ever reporting these jobs back to master.  We are running these jobs via an SSH slave plugin using Jenkins Pipeline scripts (running Jenkins 2.150.1 LTS and ssh slave plugin 1.29.1)    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-11-27 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 The TERM signal is sent when the job runs on the Jenkins master, but when it runs on a node, the signal is not received (or not sent?).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-11-27 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 The TERM signal is  sent  trapped by the freestyle script  when the job runs on the Jenkins master, but when it runs on a node, the signal is not received (or not sent?).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-11-20 Thread vicmag...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Victor Magana commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 Hello, I'm seeing an error in the hudson.util.ProcessTree logger, "External Ctrl+C execution failed for process pid=3872. Ctrl+C process exited with code -1073741515: Failed to attach to the console".  Is there any option/parameter that needs to be set for this to attach and send the Ctrl+C signal. I'm running Jenkins Server on Windows 7x64 version 2.150. Running a Windows batch job on the local master that executes a python script.  Also ran as Execute Python Script job, same error.  Thanks for any help.   Failed to send CTRL+C to pid=3872 org.jvnet.winp.WinpException: External Ctrl+C execution failed for process pid=3872. Ctrl+C process exited with code -1073741515: Failed to attach to the console (see the AttachConsole WinAPI call). error=0 at winp.cpp:59 at org.jvnet.winp.Native.sendCtrlC(Native Method) at org.jvnet.winp.Native.sendCtrlC(Native.java:90) at org.jvnet.winp.WinProcess.sendCtrlC(WinProcess.java:93) at hudson.util.ProcessTree$WindowsOSProcess.killSoftly(ProcessTree.java:538) at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:517) at hudson.util.ProcessTree.killAll(ProcessTree.java:168) at hudson.Proc$LocalProc.destroy(Proc.java:384) at hudson.Proc$LocalProc.join(Proc.java:357) at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1810) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira 

[JIRA] (JENKINS-17116) gracefull job termination

2018-09-15 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 Martin d'Anjou Leaking of processes is unrelated to this fix. Usual causes: 
 
You use 32bit-Java on a 64bit machine 
You use tool wrappers like Cygwin which mess up the process tree in Windows (See the Cygwin Process Killer plugin) 
The processes are spawned without inheriting Build reference variables, so the library cannot pick them up if parent processes are already aborted, and the process is orphaned 
 I suggest creating a separate issue if none of the above is your case        
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-09-15 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 With Jenkins 2.141, I ran the  [  bash script |https://issues.jenkins-ci.org/browse/JENKINS-17116?focusedCommentId=177337=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-177337] , and the [python script|#comment-182402] and there is no change. Jenkins still leaks processes, and still the signals are not trapped by the user script. The is one difference though, the first click on the terminate button (the red {color:#de350b}{{[x]}}{color}) does not kill the job immediately, but that seems to change nothing.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-09-15 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 with With  Jenkins 2.141, I ran the  [ bash script |#comment-177337] , and the [python script|#comment-182402] and there is no change. Jenkins still leaks processes, and still the signals are not trapped by the user script. The is one difference though, the first click on the terminate button (the red { color:#de350b} { { [x]}} {color} ) does not kill the job immediately, but that seems to change nothing .  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-09-15 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 with Jenkins 2.141, I ran the bash script, and the python script and there is no change. Jenkins still leaks processes, and still the signals are not trapped by the user script. The is one difference though, the first click on the terminate button (the red [x]) does not kill the job immediately, but that seems to change nothing  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-09-14 Thread has...@free.fr (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Antoine Musso commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 The merge https://github.com/jenkinsci/jenkins/commit/d8eac92ee9a1c19bf145763589f1c152607bf3ed is in tag jenkins-2.141  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-08-31 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I believe it is going to land in the next weekly  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-08-31 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev updated  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-17116  
 
 
  gracefull job termination   
 

  
 
 
 
 

 
Change By: 
 Oleg Nenashev  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-08-31 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev started work on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Oleg Nenashev  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2018-05-01 Thread stephan.rei...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stephan Reiter commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 Check out pull request https://github.com/jenkinsci/jenkins/pull/3414 I added code that will make Jenkins wait for process termination (for up to 30secs, should be made configurable). Behavior changes are as follows: 
 
On Windows, Jenkins sends Ctrl+C for up to 30secs. If the process hasn't exitted by then, it will be terminated like before. 
On Linux, we send SIGTERMs for up to 30secs. If the process is still around after that, we continue as before: we close stdin/stdout/stderr which causes the process to terminate. (Note that we could send SIGKILL.) 
 Note that Jenkins doesn't use SIGKILL! It uses SIGTERM, but doesn't give the process any time to handle it before closing stdin/stdout/stderr.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-02-17 Thread robin.ja...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robin Jarry commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I have 2 patches that add support for killing launched processes with specific signals. I'll submit them in a PR asap. This is unfortunately a *NIX-only solution where signals are supported. For windows I don’t know what to do.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-02-17 Thread robin.ja...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Robin Jarry assigned an issue to Robin Jarry  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-17116  
 
 
  gracefull job termination   
 

  
 
 
 
 

 
Change By: 
 Robin Jarry  
 
 
Assignee: 
 Robin Jarry  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-02-07 Thread db...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Beck assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-17116  
 
 
  gracefull job termination   
 

  
 
 
 
 

 
Change By: 
 Daniel Beck  
 
 
Assignee: 
 Kohsuke Kawaguchi  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-02-07 Thread martin.danjo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Martin d'Anjou commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I have done more experiments. And I am still not seeing the signal being sent, like Daniel Beck is seeing. I started with this Java version: 
 
Java1.8.0_77. OS is Fedora release 14 (Laughlin). 
 The Jenkins console shows: 

 
[freestyle-kill] $ /bin/sh -xe /tmp/hudson3073245061937599649.sh
+ trap 'echo TERM >terminated.txt' TERM
+ sleep 120
Build was aborted
Aborted by martinda
Finished: ABORTED
 

 Observe that the script is not printing "TERM" to the file, like it does in Daniel's environment. I also tried these Java versions ones: 
 
Java OpenJDK 1.8.0_111, Red Hat Enterprise Linux Server release 6.6 (Santiago) 
Java HotSpot 1.8.0_121, Ubuntu 16.04 LTS (Xenial Xerus) 
Java OpenJDK 1.8.0_121, Ubuntu 16.04 LTS (Xenial Xerus) 
 I captured some logs using OpenJDK 1.8.0_121 on Ubuntu 16.04. In the terminal running Jenkins: 

 
INFO: jenkins-17116/freestyle #4 aborted
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
at hudson.Proc$LocalProc.join(Proc.java:318)
at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:135)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
 

 In the jenkins log recorder: 

 
Feb 07, 2017 9:42:11 AM FINE hudson.util.ProcessTree
killAll: process=java.lang.UNIXProcess@2a8af379 and envs={HUDSON_COOKIE=2d16a893-7e22-4360-aad0-0931104599a5}
Feb 07, 2017 9:42:11 AM FINE hudson.util.ProcessTree
Recursively killing pid=25054
Feb 07, 2017 9:42:11 AM FINE hudson.util.ProcessTree
Recursively killing 

[JIRA] (JENKINS-17116) gracefull job termination

2017-01-25 Thread ere...@taboola.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Erez Kashi commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 Thanks for the quick response  . I will try ...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-01-24 Thread akostadi...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 akostadinov edited a comment on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 [~kashierez], it is possible to:1. remove the jenkins cookie environment variable2. run your program in background (output still can go to stdout)3. launch another background process to check original process PID, such that when it is gone, it would kill the other child gracefully4. in main process, wait for the other two to complete (make sure second monitor process would exit if the first background process exits)5. take care to report proper termination status of the programNot very nice probably but you can script it to run arbitrary shell commands in this way. Also might not be worth the effort. It didn't for me. Forgot to mention: this would only work on UNIX derivatives IIRC.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-01-24 Thread akostadi...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 akostadinov commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 Erez Kashi, it is possible to: 1. remove the jenkins cookie environment variable 2. run your program in background (output still can go to stdout) 3. launch another background process to check original process PID, such that when it is gone, it would kill the other child gracefully 4. in main process, wait for the other two to complete (make sure second monitor process would exit if the first background process exits) 5. take care to report proper termination status of the program Not very nice probably but you can script it to run arbitrary shell commands in this way. Also might not be worth the effort. It didn't for me.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2017-01-24 Thread ere...@taboola.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Erez Kashi commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I have the same issue. When canceling Job, I am trying to signal in side a python script, and cleanup. It there any workaround for this issue?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2016-08-17 Thread mbells.w...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Bells commented on  JENKINS-17116  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: gracefull job termination   
 

  
 
 
 
 

 
 I'm also have problems with this. In particular, our nodes are running Ubuntu 14.04. We are using Jenkins to run some tests as part of the build. There are a few steps where interruption will cause communication failures, leaked temporary files gigabytes in size, and locks that are not undone. Orphaned process is very bad as well, since this could lead to a new build starting communication on the same channel prior to the previous one terminating. Like Martin d'Anjou indicated, we would need a timeout parameter, since the allowed timeout for SIGTERM may be about 300sec, which is probably a lot longer than someone implementing this fix may anticipate.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17116) gracefull job termination

2013-03-07 Thread mark...@cityweb.de (JIRA)














































Markus Breuer
 created  JENKINS-17116


gracefull job termination















Issue Type:


Bug



Assignee:


Unassigned


Components:


core



Created:


07/Mar/13 11:43 AM



Description:


Using the freestyle projects to execute bash shell scripts work fine. But cancelling a jenkins job seems to use SIGKILL. In this way the script cannot perform cleanup operations and free resources.

SIGKILL cannot be handled by shell

SIGINT/SIGTERM are not used by jenkins

Preferred: SIGINT - wait 5 seconds - SIGKILL





Environment:


any




Project:


Jenkins



Priority:


Minor



Reporter:


Markus Breuer

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.