Killing build jobs - mock python processes survive

Michael Schwendt bugs.michael at gmx.net
Sun Feb 3 23:58:06 UTC 2008


On Mon, 4 Feb 2008 00:50:33 +0100, Michael Schwendt wrote:

> On Thu, 31 Jan 2008 15:30:19 -0500, Mike McLean wrote:
> 
> > > Does that work successfully in koji?  Here, the mock Python processes
> > > survive the kill signal. Only the parent mock process terminates. The
> > > other ones keep building until the job succeeds or fails.
> > 
> > Koji is pretty aggressive about killing off task processes.
> > 
> > https://hosted.fedoraproject.org/koji/browser/builder/kojid#L863
> 
> Hmmm... but is it successful?
> 
> It finds more child process groups and kills them, but here it doesn't
> kill all of mock's processes either.
> 
> To take a closer look I've ported the code into Plague (on F8). Below is
> one snapshot of the /proc stats of the build processes. The code finds
> process groups 16216 and 16220. After sending SIGTERM (or SIGKILL, doesn't
> matter) to pgrp -16216, pid 16216 is reported as killed, but pid 16219 is
> still running. Another waitpid on the pgrp gives "[Errno 10] No child
> processes".

And the reason is that process 16219 gets a new parent as soon as its
parent mock process 16216 is killed. When starting the builder from within
the shell, that can be seen easily.




More information about the Fedora-buildsys-list mailing list