Bug 1621238 - Using exec causes zombie processes to be left behind
Summary: Using exec causes zombie processes to be left behind
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: swatch
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-23 14:29 UTC by John Horne
Modified: 2018-09-27 02:58 UTC (History)
4 users (show)

Fixed In Version: swatch-3.2.3-22.fc27 swatch-3.2.3-22.fc28 swatch-3.2.3-22.el7
Clone Of:
Environment:
Last Closed: 2018-09-26 20:16:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for zombie problem - 1 line. (377 bytes, patch)
2018-08-23 14:29 UTC, John Horne
no flags Details | Diff

Description John Horne 2018-08-23 14:29:57 UTC
Created attachment 1478236 [details]
Patch for zombie problem - 1 line.

Description of problem:
Using the 'exec' command in a swatch config file causes zombie processes to be left.

Version-Release number of selected component (if applicable):
swatch-3.2.3-11.el7.noarch

How reproducible:
Relatively easily.

Steps to Reproduce:
1. Install swatch from yum/dnf.
2. cd /tmp and create file 'swatch.conf' with content:
        watchfor /something/
            exec echo "$S_" | mail -s test1 root
3. Start swatch with: swatch --config-file=/tmp/swatch.conf --script-dir=. --daemon --tail-file /var/log/messages >>/tmp/swatch.log
4. Send something to be detected: logger something from me

Actual results:
Checking the root account mail will show the logger message (which is what it should do).
Running 'ps auxww' shows:
=====
root     15529  0.0  0.0      0     0 ?        Z    15:08   0:00 [sh] <defunct>
=====

This zombie wasn't present before. A zombie seems to produced for each exec command. So if the config file has 5 execs in it, then 5 zombies will be produced if each exec is executed.

Expected results:
No zombies to be left behind.

Additional info:

This has been a problem for us for many years. We use swatch with the (previously 'big brother') 'xymon' software so that when a match is found xymon alerts us of the fact (and the match) on its web interface.

The problem seems to have been first reported here:
https://sourceforge.net/p/swatch/bugs/36/

As can be seen I added then that we had the same problem, but that the fix solved it for us. It has done so since then (so for the past several years).

I will add that I have tried contacting the swatch author a couple of times to see if would reassign the project to me, or make me co-author. I have heard nothing though. I gather that others have tried too, with no luck. I still find swatch the best at what it does, and it integrates so well with xymon that it is a shame that it appears to be dead.

Comment 1 Fedora Update System 2018-08-23 14:54:49 UTC
swatch-3.2.3-22.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-d9a76fb156

Comment 2 Fedora Update System 2018-08-23 14:55:00 UTC
swatch-3.2.3-22.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-57630d9802

Comment 3 Fedora Update System 2018-08-23 14:55:06 UTC
swatch-3.2.3-22.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c91722781e

Comment 4 Fedora Update System 2018-08-24 06:42:17 UTC
swatch-3.2.3-22.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-57630d9802

Comment 5 Fedora Update System 2018-08-24 07:30:56 UTC
swatch-3.2.3-22.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-d9a76fb156

Comment 6 Fedora Update System 2018-08-24 08:43:37 UTC
swatch-3.2.3-22.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c91722781e

Comment 7 Fedora Update System 2018-09-26 20:16:00 UTC
swatch-3.2.3-22.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-09-27 02:33:28 UTC
swatch-3.2.3-22.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-09-27 02:58:20 UTC
swatch-3.2.3-22.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.