<?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>4750</bug_id>
          
          <creation_ts>2013-06-19 09:04:20 +0000</creation_ts>
          <short_desc>interrupting bitbake doesn&apos;t kill all child processes</short_desc>
          <delta_ts>2013-10-07 13:38:55 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Stanacar">sstncr</reporter>
          <assigned_to name="valentin">valentin.popa</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>valentin.popa</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>33971</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-06-19 09:04:20 +0000</bug_when>
    <thetext>Double Ctrl+C doesn&apos;t seem to kill all bitbake&apos;s sub-processes:

steps to reproduce:

1. Create a simple class with a simple task, e.g:


python do_testimage() {
    import subprocess, time
    subprocess.Popen(&quot;ping 127.0.0.1&quot;, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    # do something for a while
    endtime = time.time() + 1000
    while time.time() &lt; endtime:
        pass

    

}
addtask testimage

2. bitbake something -c testimage: 
NOTE: Executing RunQueue Tasks
Currently 1 running tasks (164 of 164):
0: core-image-sato-1.0-r0 do_testimage (pid 9762)

Meanwhile check ps output


stefans   9671  4676  5 12:02 pts/0    00:00:03 python /home/stefans/z/poky/bitb
stefans   9720  9671 29 12:02 pts/0    00:00:15 python /home/stefans/z/poky/bitb
stefans   9742  9720  1 12:02 pts/0    00:00:00 python /home/stefans/z/poky/bitb
stefans   9762  9742 98 12:02 pts/0    00:00:39 python /home/stefans/z/poky/bitb
stefans   9765  9762  0 12:02 pts/0    00:00:00 ping 127.0.0.1



3. Double Ctrl+C bitbake -  build stops
However running bitbake &lt;something&gt; again

ERROR: Only one copy of bitbake should be run against a build directory

Check ps output again. I still have:

stefans   9762     1 99 12:02 pts/0    00:01:11 python /home/stefans/z/poky/bitb
stefans   9765  9762  0 12:02 pts/0    00:00:00 ping 127.0.0.1


I have to kill the ping process then the python process ends.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33973</commentid>
    <comment_count>1</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-06-19 09:09:41 +0000</bug_when>
    <thetext>I&apos;m sorry for the ps truncated output, (narrow terminal and didn&apos;t used -w  option on ps -ef)

in step 2:
Currently 1 running tasks (164 of 164):
0: core-image-sato-1.0-r0 do_testimage (pid 10211)


stefans   9992  9989  0 12:05 pts/0    00:00:00 ping 127.0.0.1
stefans  10120  4676  7 12:07 pts/0    00:00:03 python /home/stefans/z/poky/bitbake/bin/bitbake core-image-sato -c testimage
stefans  10169 10120 37 12:07 pts/0    00:00:15 python /home/stefans/z/poky/bitbake/bin/bitbake core-image-sato -c testimage
stefans  10191 10169  2 12:07 pts/0    00:00:00 python /home/stefans/z/poky/bitbake/bin/bitbake-worker decafbad
stefans  10211 10191 99 12:07 pts/0    00:00:27 python /home/stefans/z/poky/bitbake/bin/bitbake-worker decafbad




in step 3:

stefans  10211     1 99 12:07 pts/0    00:01:31 python /home/stefans/z/poky/bitbake/bin/bitbake-worker decafbad
stefans  10214 10211  0 12:07 pts/0    00:00:00 ping 127.0.0.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33974</commentid>
    <comment_count>2</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-06-19 09:13:30 +0000</bug_when>
    <thetext>poky commit  master:590010a6525b0e1bc1de73e794764e23404591df</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33998</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-06-20 12:22:41 +0000</bug_when>
    <thetext>As another data point, we discovered a bug when we dropped pre python 2.7.3 support in that our multiprocessing pool workaround was always being used. There is a slim chance that now we require 2.7.3, the issue might be resolved...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33999</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-06-20 12:23:05 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; As another data point, we discovered a bug when we dropped pre python 2.7.3
&gt; support in that our multiprocessing pool workaround was always being used.
&gt; There is a slim chance that now we require 2.7.3, the issue might be
&gt; resolved...

[Sorry, wrong bug for this comment :(]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34189</commentid>
    <comment_count>5</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2013-06-27 14:52:04 +0000</bug_when>
    <thetext>Hi Cristiana and Ross

In the bug triage meeting, we decide to reassign this bug to Cristiana but very likely need Ross&apos;s help.  So please work together.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35152</commentid>
    <comment_count>6</comment_count>
    <who name="valentin">valentin.popa</who>
    <bug_when>2013-07-30 08:28:27 +0000</bug_when>
    <thetext>Patch sent on bitbake-devel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35337</commentid>
    <comment_count>7</comment_count>
    <who name="valentin">valentin.popa</who>
    <bug_when>2013-08-02 14:01:45 +0000</bug_when>
    <thetext>Merged:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=888d1f35ee19665741bf3a78627cf2a8d3d6824b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37685</commentid>
    <comment_count>8</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-10-07 13:38:55 +0000</bug_when>
    <thetext>Verified in master:3c5b6af99110bd7f64f5240a3e9d156f0593c497</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>