<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6274</bug_id>
          
          <creation_ts>2014-05-07 02:46:55 +0000</creation_ts>
          <short_desc>Bitbake background tasks are not killed when ssh connection is dropped</short_desc>
          <delta_ts>2014-09-24 17:04:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>1.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ming Liu">ming.liu</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43147</commentid>
    <comment_count>0</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2014-05-07 02:46:55 +0000</bug_when>
    <thetext>Test is based on commit: 82813d27640549255dc81a15d7fb63688431f747

How to reproduce:
1 login a build server via ssh, run:
$ bitbake bash -c devshell
$ ps aux | grep mliu3
......
mliu3     4971  3.0  0.0 319180 110472 pts/67  S+   10:34   0:01 python /buildarea4/mliu3/openembedded-core/bitbake/bin/bitbake bash -c devshell
mliu3     6373 26.3  0.2 839248 376280 pts/67  Sl+  10:34   0:12 python /buildarea4/mliu3/openembedded-core/bitbake/bin/bitbake bash -c devshell
mliu3    21779  5.6  0.1 248160 158452 pts/67  S+   10:34   0:01 python /buildarea4/mliu3/openembedded-core/bitbake/bin/bitbake-worker decafbad
mliu3    23013  0.8  0.1 248164 156924 pts/67  S    10:34   0:00 python /buildarea4/mliu3/openembedded-core/bitbake/bin/bitbake-worker decafbad
mliu3    23324  0.0  0.0      0     0 pts/67   Z    10:34   0:00 [gnome-terminal] &lt;defunct&gt;
mliu3    23421  0.0  0.0  26532  1856 ?        Ss   10:34   0:00 SCREEN -D -m -t OpenEmbedded Developer Shell -S devshell_23013 /buildarea4/mliu3/openembedded-core/build/tmp-eglibc/work/core2-64-oe-linux/bash/4.3-r0/temp/run.do_terminal.23013
mliu3    23434  0.0  0.0 122952  1228 pts/67   S+   10:34   0:00 screen -r devshell_23013
mliu3    23438  0.0  0.0  13960  2056 pts/77   Ss+  10:34   0:00 /bin/bash
mliu3    23518  0.0  0.0   9996  2184 ?        Ss   10:34   0:00 /buildarea4/mliu3/openembedded-core/build/tmp-eglibc/sysroots/x86_64-linux/usr/bin/pseudo -d
......

2 then the ssh connection is closed for some reasons, then run:
$ ps aux | grep mliu3
......
mliu3    23013  0.3  0.1 248164 156924 ?       S    10:34   0:00 python /buildarea4/mliu3/openembedded-core/bitbake/bin/bitbake-worker decafbad
mliu3    23324  0.0  0.0      0     0 ?        Z    10:34   0:00 [gnome-terminal] &lt;defunct&gt;
mliu3    23421  0.0  0.0  26532  1860 ?        Ss   10:34   0:00 SCREEN -D -m -t OpenEmbedded Developer Shell -S devshell_23013 /buildarea4/mliu3/openembedded-core/build/tmp-eglibc/work/core2-64-oe-linux/bash/4.3-r0/temp/run.do_terminal.23013
mliu3    23438  0.0  0.0  13960  2056 pts/77   Ss+  10:34   0:00 /bin/bash
mliu3    23518  0.0  0.0   9996  2184 ?        Ss   10:34   0:00 /buildarea4/mliu3/openembedded-core/build/tmp-eglibc/sysroots/x86_64-linux/usr/bin/pseudo -d
......

there are still some tasks running on the background, should they exit with the closed terminal session?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44135</commentid>
    <comment_count>1</comment_count>
    <who name="Ming Liu">ming.liu</who>
    <bug_when>2014-06-23 10:05:41 +0000</bug_when>
    <thetext>I just found that the ternimal is spawned with &quot;SCREEN -D -m -t&quot;, that is saying it&apos;s forced to run in a new session, so maybe this is should not be regarded as a defect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45806</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-09-24 17:04:56 +0000</bug_when>
    <thetext>Since this has been configured with screen as the interactive terminal, I don&apos;t think this is a bug, no. Closing as such.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>