Red Hat Bugzilla – Bug 971879
[RFE] rlWatchdog should have additional callback parameter
Last modified: 2016-01-31 21:28:35 EST
Description of problem:
rlWatchdog while great feature is very limited in that it can only send a signal to each process within a process group once the time is up. It would be very useful to have additional parameter that would be treated as callback function to be run with PGID of the process group as its first parameter before the processes of that process group are signalled.
Use case is this: We have a lot of test cases where the tested process might hang/end up the spinning forever and we need to get some info (strace/ltrace/gdb/pstree/lsof/logs//proc/*/... whatever) before we terminate it with SIGKILL. In this case we would simply write the function that takes PGID as the first argument and let the rlWathdog call it.
I would be willing to write a patch if you are not against it.
Seems useful to me, will happily accept a patch.
Created attachment 758195 [details]
Patch to provide callback parameter to rlWatchdog
Does this look sane enough? I tried it on RHEL 5.9 and Fedora 17.
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20.
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed.
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20.
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.