[LTP] [PATCH] test_children_cleanup.sh: Fix race condition

Martin Doucha mdoucha@suse.cz
Tue Feb 15 10:27:24 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.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list