holland can leave orphan grandchildren processes

Bug #1170446 reported by Andrew Garner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
holland-backup
New
Undecided
Unassigned

Bug Description

When a holland plugin forks a command which in turn forks some subset of commands, but that command is terminated or fails in some way that does not kill its children, holland can sometimes leave children of its children processes running for some time, even if the plugin otherwise tracks the child exit status properly.

This is most common with xtrabackup, where the innobackupex perl script fails to clean up after itself in a variety of circumstances. This can leave the xtrabackup_* binary running in the background even after holland has stopped.

I think we can largely resolve this by always sending a SIGTERM to the holland process group to at least signal grandchild processes to exit which will cover most of the common cases where this occurs - and certainly fix a few nasty cases with innobackupex -> xtrabackup.

We can do something like:

# temporarily ignore the signal we will send our process group
with ignored_signals(SIGTERM):
    os.killpg(os.getpid(), SIGTERM)

And then exit as normal as needed.

Andrew Garner (muzazzi)
summary: - holland can leave orphan grandchildren
+ holland can leave orphan grandchildren processes
Andrew Garner (muzazzi)
Changed in holland-backup:
milestone: none → 1.0.12
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.