Background processes will be killed WHEN THE MASTER OS IS RH6.4?

202 views
Skip to first unread message

QinTing

unread,
Aug 17, 2017, 11:27:34 AM8/17/17
to Jenkins Developers
I have tried the following conditions:
  1. Master: CentOS release 6.8 (Final)    Slave: Red Hat Enterprise Linux Server release 6.4 (Santiago)  Result: Not Be Killed
  2. Master: Red Hat Enterprise Linux Server release 5.6 (Tikanga)   Slave: Red Hat Enterprise Linux Server release 6.4 (Santiago)  Result: Not Be Killed
  3. ⭐Master: Red Hat Enterprise Linux Server release 6.4 (Santiago)   Slave: Red Hat Enterprise Linux Server release 6.4 (Santiago)  ResultBe Killed
Why Background processes be killed WHEN THE MASTER OS IS RH6.4? 

IS THIS A BUG OR SYSTEM SETTING ERROR? 


Experimental data:
Under normal condition, TOMCAT process will keep alive in the background.
BUT, using RH6.4 as jenkins masterTOMCAT process will be killed !

Code in Pipeline :
stage('Startup'){
    node('_your_node_'){
        timestamps {
            def exec = '''
            BUILD_ID=dontKillMe  ./call.sh 
            sleep 20
            '''
            sh exec
        }
    }
}

call.sh  :
#!/bin/sh
. ~/.bash_profile
${TOMCAT_HOME}/bin/startup.sh
 
Jenkins Version: 2.32.3 /  2.60.1
JAVA Version: 1.8.0_121
TOMCAT Version(for jenkins): 9.0.0.M17

Oleg Nenashev

unread,
Aug 19, 2017, 4:12:38 PM8/19/17
to Jenkins Developers

dontKillMe is documented in https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller
I'm not 100% sure if the feature is still operational, but I have never seen the deprecation announcement. If it does not work, it is a bug.

On the other hand, your configuration is not correct:
  1. "dontKillMe  ./call.sh " prevents termination of the call.sh process
  2. such setting does not prevent termination of child processes if their name are not equal to the value in the variable (e,g, "BUILD_ID=dontKillMe /usr/apache/bin/httpd" in the example)
I think it is a misconfiguration, not a Jenkins bug.

BR, Oleg

четверг, 17 августа 2017 г., 17:27:34 UTC+2 пользователь QinTing написал:

QinTing

unread,
Aug 24, 2017, 12:17:58 AM8/24/17
to Jenkins Developers
Hi Oleg Nenashev, 
           Thanks for your time, and  I get your point. And, I do Another attempts. 

           1、Using A FREESTYLE BUILD with the same code.  BUILD_ID=dontKillMe do works and keeps Background processes running !
           2、Then, remove BUILD_ID=dontKillMe in FREESTYLE BUILD code  and run again,  Background processes were killed.
           
           Using "BUILD_ID=dontKillMe ./call.sh " in  FREESTYLE BUILD works fine . 


my guess :
           maybe there are something wrong with PIPELINE BUILD's [sh] step, and very possible releated with OS System ?


Experimental data:
Code in [ Freestyle Build's Execute shell ] :
          
       BUILD_ID=dontKillMe  ./call.sh 

 

 
在 2017年8月20日星期日 UTC+8上午4:12:38,Oleg Nenashev写道:

Oleg Nenashev

unread,
Aug 24, 2017, 2:59:24 AM8/24/17
to JenkinsCI Developers
Maybe. Please create a bug in Jenkins JIRA an reference this thread there

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/p3HzZkvLNFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/553a7bb1-d132-4e24-ac72-6dfc990376e5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

QinTing

unread,
Aug 26, 2017, 1:58:05 PM8/26/17
to Jenkins Developers
JENKINS JIRA LINK : https://issues.jenkins-ci.org/browse/JENKINS-46481

在 2017年8月24日星期四 UTC+8下午2:59:24,Oleg Nenashev写道:
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages