Re: test processes are not all killed

Dave Jones <[email protected]> Wed, 2 Aug 2017 12:41:43 -0400
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
On Wed, Aug 02, 2017 at 05:57:21PM +0300, Tommi Rantala wrote:
 > 2017-08-02 6:09 GMT+03:00 Dai Xiang <[email protected]>:
 > > On Tue, Aug 01, 2017 at 11:38:23AM -0400, Dave Jones wrote:
 > >> On Tue, Aug 01, 2017 at 05:38:13PM +0800, Dai Xiang wrote:
 > >>  > Hi!
 > >>  > I use below cmds(with root permission) include trinity to test and find an interesting issue:
 > >>  >
 > >>  > cmd="trinity -q -q -l off -s $seed -x get_robust_list -x remap_file_pages -N 999999999"
 > >>  > cd /tmp
 > >>  > chroot --userspec nobody:nogroup / $cmd 2>&1 &
 > >>  > pid=$!
 > >>  > sleep 300s
 > >>  > kill -9 $pid
 > 
 > Hi,
 > 
 > "kill -9 $pid" only kills the main trinity pid, right?
 > So the watchdog and all the forked child processes will not get killed.
 > 
 > Maybe Dave knows better if the other trinity processes will kill
 > themselves if they get re-parented.

They should, but only after it exits that sync() syscall.
There's a check in periodic_work() that checks the main pid is still
around every 10 syscalls.

	Dave