https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082008-09-10T09:56:00ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=53782008-09-10T09:56:00Zdillon
<ul></ul><p>:It's not limited to `git' command; I've seen a similar stuck process<br />:(cc1) during buildworld loops on another machine running -DEVELOPMENT.<br />:The kernel and the world has been built on August 24, so it's not the<br />:lastest. Does anyone know if it's already been resolved?<br />:<br />:Thanks.</p>
<pre><code>New one to me. I've never seen this.</code></pre>
<pre><code>I think your best bet is to kgdb the live kernel and see if it shows<br /> up on 'info threads'. If you can get a process or thread address out<br /> of ps it should be possible to track down the actual state of the<br /> process.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=53792008-09-10T10:46:01Zqhwt+dfly
<ul></ul><p>No luck with kgdb; the psx macro doesn't show the process 44758.<br />`info threads' doesn't show any relavant threads, either.</p>
<p>$ ps <del>o pid,tid,tt,stat,start,command -x |grep -e 44758<br />44758 0 p3</del> DEL Fri08AM (git)<br />56964 0 p8 RL+ 12:37PM grep -e 44758</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=58772009-01-21T04:00:03Zcorecode
<ul></ul><p>does this still happen?</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=58902009-01-21T10:59:49Zqhwt+dfly
<ul></ul><p>Yes, it's happening now. My mail server is running a UP kernel built from<br />941f5de0 (around Oct. 10), but I can't find a relavant fix on<br />DragonFly_RELEASE_2_0 branch. I have another box running -DEVELOPMENT,<br />but its uptime is probably not long enough to reproduce it.</p>
<p>$ top -n -U qhwt 4<br />load averages: 0.00, 0.00, 0.00 up 100+00:41:22 11:01:26<br />78 processes: 78 running</p>
<p>Mem: 116M Active, 210M Inact, 138M Wired, 16M Cache, 59M Buf, 1220K Free<br />Swap: 2048M Total, 15M Used, 2033M Free</p>
<pre><code>PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND<br />63039 qhwt 179 0 2084K 1136K RUN 0:00 1161.00% 56.69% top<br />18535 qhwt 159 0 0K 4K 0:00 0.00% 3.91% git<br />18527 qhwt 159 0 0K 4K 0:00 0.00% 3.91% git<br />18517 qhwt 157 0 0K 4K 0:00 0.00% 1.95% git</code></pre>
<p>I played with kgdb a bit and found that these 3 processes are on zombproc<br />but with p_stat==SACTIVE and p_lock==1. I have no idea how it happened.</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=58912009-01-21T11:08:49Zdillon
<ul></ul><p>:941f5de0 (around Oct. 10), but I can't find a relavant fix on<br />:DragonFly_RELEASE_2_0 branch. I have another box running -DEVELOPMENT,<br />:but its uptime is probably not long enough to reproduce it.<br />:<br />:$ top -n -U qhwt 4<br />:load averages: 0.00, 0.00, 0.00 up 100+00:41:22 11:01:26<br />:78 processes: 78 running<br />:<br />:Mem: 116M Active, 210M Inact, 138M Wired, 16M Cache, 59M Buf, 1220K Free<br />:Swap: 2048M Total, 15M Used, 2033M Free<br />:<br />:<br />: PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND<br />:63039 qhwt 179 0 2084K 1136K RUN 0:00 1161.00% 56.69% top<br />:18535 qhwt 159 0 0K 4K 0:00 0.00% 3.91% git<br />:18527 qhwt 159 0 0K 4K 0:00 0.00% 3.91% git<br />:18517 qhwt 157 0 0K 4K 0:00 0.00% 1.95% git<br />:<br />:I played with kgdb a bit and found that these 3 processes are on zombproc<br />:but with p_stat==SACTIVE and p_lock==1. I have no idea how it happened.</p>
<pre><code>This should hopefully be fixed with this commit I made in December:</code></pre>
<p>commit 2e425d87dc98885c44799de0327ab0013a7c34d6<br />Author: Matthew Dillon <<a class="email" href="mailto:dillon@apollo.backplane.com">dillon@apollo.backplane.com</a>><br />Date: Thu Dec 18 20:20:15 2008 -0800</p>
<pre><code>Close a possible bug where the p_lock for a new process inherits a<br /> non-zero value from its parent on fork(), preventing the process<br /> from being able to exit later on.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=58922009-01-21T14:19:56Zqhwt+dfly
<ul></ul><p>Ok, I'll try this on top of R2.0, or the pre-release of R2.2,<br />depending on when the new branch becomes available.</p>
<p>Thanks.</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=59552009-01-25T12:05:59Zqhwt+dfly
<ul></ul><p>I found a similar zombie process on a PC running -DEVELOPMENT<br />(as of 89f297df...), with p_stat==SACTIVE and p_lock==1. The stuck<br />process was git again. The previous ones were `git log', and this time<br />`git show', all of which involve $PAGER. I tried issuing the same command<br />several times, but I couldn't reproduce another zombie yet.</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=59562009-01-25T16:27:02Zdillon
<ul></ul><p>:I found a similar zombie process on a PC running -DEVELOPMENT<br />:(as of 89f297df...), with p_stat==SACTIVE and p_lock==1. The stuck<br />:process was git again. The previous ones were `git log', and this time<br />:`git show', all of which involve $PAGER. I tried issuing the same command<br />:several times, but I couldn't reproduce another zombie yet.</p>
<pre><code>Check p_xstat, see if it is SIGSTOP or SIGTSTP. I think it's going<br /> from SZOMB -> SSTOP -> SACTIVE (on kill or cont) due to the signal.<br /> The p_lock == 1 is due to the exiting LWP and is correct.</code></pre>
<pre><code>I just made another commit which should catch zombied processes which<br /> are improperly resurrected by a stop signal. However, I couldn't<br /> reproduce it to test the fix... the window of opportunity is fairly<br /> small. </code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=59582009-01-25T17:07:59Zqhwt+dfly
<ul></ul><p>Yes, that's SIGTSTP (attached `p *zombproc->lh_first' result).</p>
<p>I found how I made the zombie:<br />----<br />$ unset PAGER (or unsetenv if you like *csh)<br />$ cd /path/to/git/repo<br />$ git show 55a9cd0fa2b75e61230e2802b78eaec8937a1e42<br />here the pager display 7 lines of commitlog and the patch, and `(END)'<br />at the end. Suspend it by pressing ctrl+Z, then type fg to resume,<br />and press `q' in the pager to leave it.</p>
<p>$ ps x<br />now you see another zombie.<br />----</p>
<p>I'll try this on the new kernel and see if I can still reproduce it.</p>
<p>Thanks.</p> DragonFlyBSD - Bug #1137: Process stuck with an empty STATEhttps://bugs.dragonflybsd.org/issues/1137?journal_id=60212009-01-29T09:28:23Zqhwt+dfly
<ul></ul><p>After the commit 81b18e51, I can no longer reproduce the zombies, so I'd say<br />it's resolved now. 2.0-RELEASE is affected by this issue, so 81b18e51 and<br />related commits should be back ported, too.</p>
<p>Thanks.</p>