[LTP] [PATCH] test_children_cleanup.sh: Fix race condition
Petr Vorel
pvorel@suse.cz
Tue Feb 15 10:39:09 CET 2022
> On 15. 02. 22 5:30, Li Wang wrote:
> > It doesn't work for all platforms and we can not guarantee how long it will
> > cost before PID 1 reaps zombie process.
> > Also, I just get to know that Docker does not run processes under a
> > special init process that properly reaps child processes, so that it is
> > possible for the container to end up with zombie processes that cause
> > all sorts of trouble.
> > I even try adding `kill -SIGCHLD 1` but does not work as expected.
> > See CI jobs:
> > https://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true
> > <https://mail.google.com/mail/u/1/%E2%80%8Bhttps://github.com/wangli5665/ltp/runs/5194270998?check_suite_focus=true>
> > Therefore, I suggest giving a chance to my refined patch V2 :).
> When I was testing the libtest yesterday on a moderately stressed
> machine, I actually saw the child process still in the R state during
> the first state check a couple of times. That's why I've added looping
> with delay.
> On the other hand I did not see any zombies even after several hundred
> tries. But I can add a zombie check to my patch a well.
I'd be for it. As Li noticed, containers behave really differently
(maybe it'd be faster to debug tests using podman).
Kind regards,
Petr
More information about the ltp
mailing list