Incron causes defunct processes

Bug #1823490 reported by Gerry
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
incron (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu Disco Dingo (development branch)
Release: 19.04
ii incron 0.5.12-1 amd64 cron-like daemon which handles filesystem events

gsker@veeta:~>incrontab -l
/home/gsker/tmp/incrontest/testfile.txt IN_CLOSE_WRITE /home/gsker/tmp/incrontest/incron.sh $# $%

gsker@veeta:~>ps -ef | grep incron
root 5558 1 0 14:47 ? 00:00:00 /usr/sbin/incrond
gsker 6366 5558 0 14:52 ? 00:00:00 [incron.sh] <defunct>
gsker 6371 6190 0 14:52 pts/4 00:00:00 tail -f incrontest.log
gsker 6386 5558 0 14:52 ? 00:00:00 [incron.sh] <defunct>
gsker 6390 5558 0 14:52 ? 00:00:00 [incron.sh] <defunct>

The incron works, but I end up with hundreds of defunct processes.

This bug report for RedHat implies a fix:
https://bugzilla.redhat.com/show_bug.cgi?id=1656939

I grabbed the incrond executable from the x86_64 rpm here:
  https://koji.fedoraproject.org/koji/buildinfo?buildID=1235814

It appears to be working correctly.

Revision history for this message
Gerry (gsker) wrote :

Okay I see the git repo that this descends from, https://github.com/ar-/incron, has this fix and several others. And I see that the upstream is the debian package. How do we go about getting the whole chain updated?

This bug was fixed back in Oct of 2017. https://github.com/ar-/incron/commit/196975d26fd04176a1c877fa3c404efd8103c9c2#diff-d73e309589e3f71b662dce37ccc688b6

Revision history for this message
Gerry (gsker) wrote :

Given how this package is not getting much love, I switched to using systemd's systemd.path functionality.
Very briefly:

root@veeta:/etc/systemd/system>cat gsker-temptrax.path
[Path]
PathChanged= /var/www/gsker/weather/temptrax.log
[Install]
WantedBy=default.target

root@veeta:/etc/systemd/system>cat gsker-temptrax.service
[Service]
Type=oneshot
User=gsker
ExecStart= /home/gsker/weather/temptrax/plotrun.sh

root@veeta:/etc/systemd/system>systemctl daemon-reload
root@veeta:/etc/systemd/system>systemctl enable gsker-temptrax.path
root@veeta:/etc/systemd/system>systemctl start gsker-temptrax.path

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in incron (Ubuntu):
status: New → Confirmed
Revision history for this message
Philippe Cloutier (chealer-gmail) wrote :

Assuming this is about Debian #930526, this is reportedly fixed in 0.5.12-2, and therefore in all releases except bionic.

Revision history for this message
Gerry (gsker) wrote :

There are some serious bugs in incron.

It should probably be deprecated and removed from the repos for security reasons.

* https://github.com/ar-/incron/issues/67
* https://github.com/ar-/incron/issues/72
* https://github.com/ar-/incron/issues/68

Revision history for this message
Philippe Cloutier (chealer-gmail) wrote :

This is probably solved in all supported releases, as bionic uses 0.5.10-3build1, and 0.5.10 is apparently not affected.

That being said, I am experiencing a similar bug with bionic in a Docker container, where incrond itself becomes a zombie process (and therefore stops working).

Revision history for this message
Philippe Cloutier (chealer-gmail) wrote :

This was reported upstream as https://github.com/ar-/incron/issues/52

Revision history for this message
sles (slesru) wrote :

This bug still exists in 20.04.
Why?

Revision history for this message
Jason Perrin (jvperrin) wrote :

I've been able to confirm this happening also on 22.04 (Jammy) with package version 0.5.12-2build1.

I noticed that https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981124 was fixed recently (Jan 2023) with another patch in Debian (https://sources.debian.org/patches/incron/0.5.12-4/05_avoid_unterminated_forked_processes.patch/), so I think pulling in 0.5.12-4 from Debian might fix the issue here too, and would be a valuable thing to pull in for LTS releases too in order to prevent runaway zombie process issues.

Thanks!

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.