<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 15, 2022 at 5:39 PM Petr Vorel <<a href="mailto:pvorel@suse.cz">pvorel@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> On 15. 02. 22 5:30, Li Wang wrote:<br>
> > It doesn't work for all platforms and we can not guarantee how long it will<br>
> > cost before PID 1 reaps zombie process.<br>
<br>
> > Also, I just get to know that Docker does not run processes under a<br>
> > special init process that properly reaps child processes, so that it is<br>
> > possible for the container to end up with zombie processes that cause<br>
> > all sorts of trouble.<br>
<br>
> > I even try adding `kill -SIGCHLD 1` but does not work as expected.<br>
<br>
> > See CI jobs:<br>
> > <a href="https://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true" rel="noreferrer" target="_blank">https://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true</a><br>
> > <<a href="https://mail.google.com/mail/u/1/%E2%80%8Bhttps://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true" rel="noreferrer" target="_blank">https://mail.google.com/mail/u/1/%E2%80%8Bhttps://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true</a>><br>
<br>
> > Therefore, I suggest giving a chance to my refined patch V2 :).<br>
<br>
> When I was testing the libtest yesterday on a moderately stressed<br>
> machine, I actually saw the child process still in the R state during<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">That might cause by signal asynchronous processing when the system is under pressure.</div><div class="gmail_default" style="font-size:small"></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> the first state check a couple of times. That's why I've added looping<br>
> with delay.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> On the other hand I did not see any zombies even after several hundred<br>
> tries. But I can add a zombie check to my patch a well.<br>
I'd be for it. As Li noticed, containers behave really differently<br>
(maybe it'd be faster to debug tests using podman).<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Right, we have to consider many scenarios:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">1. asynchronous processing signal so that child still in 'R' </div><div class="gmail_default" style="font-size:small">2. the child correctly terminated on bare-metal system</div><div class="gmail_default" style="font-size:small">3. allow zombied while running by docker (without a formal init(PID 1) process)</div><br></div><div><div class="gmail_default" style="font-size:small">Especially scenario-3 confused me for quite a while.</div><br></div><div><div class="gmail_default" style="font-size:small">@Martin, feel free to send the patch that includes the above.</div><div class="gmail_default" style="font-size:small">or I can help summarize these in the commit description.</div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>