Bug 25130 - incrond forks a process on invocation which is never killed
Summary: incrond forks a process on invocation which is never killed
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2019-07-15 15:52 CEST by Marc Krämer
Modified: 2020-01-05 16:39 CET (History)
3 users (show)

See Also:
Source RPM: incron-0.5.12-3.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Marc Krämer 2019-07-15 15:52:23 CEST
I noticed incrond to fork a child on each file beeing processed, but the process is not killed afterwards.
I'm quite sure this did not happen in mga6.

Since there is not much change at the project, there has to be a change in kernel/compiler or anywhere else.
Comment 1 Marc Krämer 2019-07-23 10:06:53 CEST
in mageia6 we had 0.5.10 which did not have this behaviour, so there might be a change in the code too.
Currently we have 9 patches - maybe one of these patches is obsolete and does this harm.
Comment 2 Marc Krämer 2019-07-23 10:10:20 CEST
@Jani: you committed the latest patches and updated the package, do you know anything about this?
Currently I'm running a cron-job to restart this sevice every hour - but this is not what it is intended to be ;)

Assignee: bugsquad => jani.valimaa

Comment 3 Marc Krämer 2019-12-23 12:06:43 CET
anything new about this?
see the following testcase:

$ cat /etc/incron.d/test 
/tmp/in IN_CLOSE_WRITE /usr/bin/echo $@ $#

$ mkdir /tmp/in

$ systemctl start incrond.service

$ ps aux|grep incron
root       921  0.0  0.0   5532  2600 ?        Ss   12:02   0:00 /usr/sbin/incrond
root      1657  0.0  0.0  28536   828 pts/12   S+   12:02   0:00 grep --color inc

$ touch /tmp/in/a /tmp/in/b /tmp/in/c
$ ps aux|grep incron
root       921  0.0  0.0   5532  2600 ?        Ss   12:02   0:00 /usr/sbin/incrond
root      2393  0.0  0.0   5532  1096 ?        S    12:03   0:00 /usr/sbin/incrond
root      2394  0.0  0.0   5532  1096 ?        S    12:03   0:00 /usr/sbin/incrond
root      2396  0.0  0.0   5532  1096 ?        S    12:03   0:00 /usr/sbin/incrond
root      2402  0.0  0.0   5532   708 ?        S    12:03   0:00 /usr/sbin/incrond
root      2404  0.0  0.0   5532   708 ?        S    12:03   0:00 /usr/sbin/incrond
root      2405  0.0  0.0   5532   708 ?        S    12:03   0:00 /usr/sbin/incrond
root      2410  0.0  0.0   5532   708 ?        S    12:03   0:00 /usr/sbin/incrond
root      2419  0.0  0.0  28536   824 pts/12   S+   12:03   0:00 grep --color incron
Marc Krämer 2019-12-23 12:19:21 CET

See Also: (none) => https://github.com/ar-/incron/issues/65

Comment 4 Marc Krämer 2019-12-23 12:19:58 CET
@Jani: checked the patches, this happens also without the patches, added an issue upstream.
Comment 5 Marc Krämer 2019-12-23 15:11:02 CET
Patched incron package fix fork problem:

In the current release after each processed file the child process is not killed. This is now fixed.

========================

Updated packages in core/updates_testing:
========================
incron-0.5.12-4.mga7
incron-debugsource-0.5.12-4.mga7
incron-debuginfo-0.5.12-4.mga7

SRPM:
incron-0.5.12-4.mga7.src.rpm

Assignee: jani.valimaa => qa-bugs

Comment 6 Len Lawrence 2020-01-05 03:38:14 CET
Mageia7, x86_64
Installed incron and reproduced the problem using Mark's test case.

Updated incron.
$ sudo rm -rf /tmp/in
$ sudo systemctl restart incrond.service
$ systemctl status incrond
● incrond.service - Inotify System Scheduler
   Loaded: loaded (/usr/lib/systemd/system/incrond.service; disabled; vendor pr>
   Active: active (running) since Sun 2020-01-05 02:30:07 GMT; 28s ago

$ cat /etc/incron.d/test
/tmp/in IN_CLOSE_WRITE /usr/bin/echo $@ $#
$ mkdir /tmp/in
$ ps aux | grep incron
root      3035  0.0  0.0   5532  2712 ?        Ss   02:30   0:00 /usr/sbin/incrond
$ touch /tmp/in/a /tmp/in/c /tmp/in/e
$ ps aux | grep incron
root      3035  0.0  0.0   5532  2712 ?        Ss   02:30   0:00 /usr/sbin/incrond

Fix confirmed.

CC: (none) => tarazed25
Whiteboard: (none) => MGA7-64-OK

Thomas Backlund 2020-01-05 15:56:01 CET

Keywords: (none) => advisory, validated_update
CC: (none) => tmb, sysadmin-bugs

Comment 7 Mageia Robot 2020-01-05 16:39:25 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0003.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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