<?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>14339</bug_id>
          
          <creation_ts>2021-04-07 14:20:36 +0000</creation_ts>
          <short_desc>bitbake generates zombie Parser processes (hard to reproduce)</short_desc>
          <delta_ts>2022-04-28 15:23:12 +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>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Fan Yu">yf3yu</reporter>
          <assigned_to name="Randy MacLeod">randy.macleod</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yf3yu</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>89882</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-07 14:20:36 +0000</bug_when>
    <thetext>Not able to reproduce consistently, i think this is also dependent on load on the shared machine, perhaps the signal handler doesn&apos;t get to run properly.

it usually happen when I hit control-c too many times and bitbake will hang.
I remember deleting the *sock and *lock files to be able to restart bitbake.


here is the top output maybe after 2 weeks (I have around 50 zombies laying around).
```
wrlbuild  6016  0.0  0.0      0     0 ?        Z    Apr05   0:00 [Parser-35] &lt;defunct&gt;   0     0 ?        ZN   Mar22   0:06 [Parser-31] &lt;defunct&gt;
yyu1      6266  0.0  0.0      0     0 ?        ZN   Mar22   0:08 [Parser-32] &lt;defunct&gt;
wrlbuild 25648  0.0  0.0      0     0 ?        Z    Apr05   0:00 [Parser-1] &lt;defunct&gt;
```
```
ps aux | grep &apos;Z&apos; | wc -l
58
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89901</commentid>
    <comment_count>1</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-08 14:50:17 +0000</bug_when>
    <thetext>10061 might be related

Need to figure out at which bitbake cycle are we getting stuck/hanging/needing to rm the lock file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89925</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-13 20:17:11 +0000</bug_when>
    <thetext>Encountered a similar issue I believe:

```
yyu1@yow-lpggp3:/yow-lpggp32/yyu1/b/build$ MACHINE=intel-x86-64 bitbake lib32-clang-native                                                              
WARNING: You have included the meta-openstack layer, but &apos;openstack&apos; has not been enabled in your DISTRO_FEATURES. Some bbappend fil.                   
Loading cache: 100% |#################################################################################################| Time: 0:00:01                   
Loaded 9617 entries from dependency cache.                                                                                                              
                                                                                                                                                        
Keyboard Interrupt, closing down...                                                                                                                     
                                                                                                                                                        
NOTE: No reply from server in 30s                                                                                                                       
Timeout while waiting for a reply from the bitbake server (60s) 
```


```
yyu1@yow-lpggp3:/yow-lpggp32/yyu1/b/build$ ls *ock
bitbake.lock  bitbake.sock
```

```
lsof bitbake.lock

COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF        NODE NAME
Cooker   35965 yyu1    3u   REG   8,33        6 15328396296 bitbake.lock
Parser-2 36082 yyu1    3u   REG   8,33        6 15328396296 bitbake.lock
```

```
yyu1@yow-lpggp3:/yow-lpggp32/yyu1/b/build$ ps -aux | grep Z
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
yyu1     24750  0.0  0.0  13076  1052 pts/19   S+   16:00   0:00 grep Z
yyu1     36083  0.0  0.0      0     0 ?        Z    15:34   0:00 [Parser-3] &lt;defunct&gt;
```

Can&apos;t kill parser3, but the lock files do disappear if I kill parser-2 with
kill `kill -s SIGTERM 36082`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89926</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-13 20:38:49 +0000</bug_when>
    <thetext>Reproducible on this particular build server, but not reproducible on my personal machine.

Difference is that the system makes a slight pause after seeing this

```
Loading cache: 100% ###################################################################################################################################################| Time: 0:00:00
Loaded 1438 entries from dependency cache.
```

if you hit controlc right after &quot;Loaded 1438 ...&quot;, the bitbake server will stop responding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90012</commentid>
    <comment_count>4</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-19 20:28:28 +0000</bug_when>
    <thetext>only reproduced on poky today, not on oe-core or wrlinux.



yyu1@yow-lpggp3:/yow-lpggp32/yyu1/yocto/b_poky/build$ bitbake core-image-minimal
WARNING: You have included the meta-virtualization layer, but &apos;virtualization&apos; has not .
Loading cache: 100% |####################################################| Time: 0:00:00
Loaded 4779 entries from dependency cache.                                     
                                                    
Keyboard Interrupt, closing down...                                                    
                                                                                 
NOTE: No reply from server in 30s                                                   
                                                           
Second Keyboard Interrupt, stopping...                                                              
                                                               
NOTE: No reply from server in 30s                                                              
Traceback (most recent call last):</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90013</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-04-19 21:00:38 +0000</bug_when>
    <thetext>Could you put a time.sleep(5) in the code to isolate the exact spot we need the Ctrl+C to make it easier to reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90101</commentid>
    <comment_count>6</comment_count>
    <who name="Yi Fan Yu">yf3yu</who>
    <bug_when>2021-04-23 21:04:15 +0000</bug_when>
    <thetext>I spent some time adding time.sleep to locations.
And I have given up trying.
it sometimes stops responding and it happens at different steps...

usually it is able to recover.

Sorry for not being helpful</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91345</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-09-06 23:36:16 +0000</bug_when>
    <thetext>Added Yi Fan who may want to work on this bug now that he&apos;s got some time available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93211</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-04-28 15:23:12 +0000</bug_when>
    <thetext>Richard fixed a parse time race windown and shortened the lifespan of python zombies. Re-open if seen again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>