Public bug reported:

Running incron daemon observing single directory for several users
consumes all available inotify watchers.

Running incrontab -l  command shows following watchers:
#       IN_ALL_EVENTS                flags                               app
/srv/docker/image       IN_CREATE,IN_MOVED_TO,recursive=false       sudo docker 
-H unix:///var/run/docker-<user_name_1>.sock load -q -i $@/$#
/srv/docker/image       IN_CREATE,IN_MOVED_TO,recursive=false         sudo 
docker -H unix:///var/run/docker-<user_name_2>.sock load -q -i $@/$#
/srv/docker/image       IN_CREATE,IN_MOVED_TO,recursive=false       sudo docker 
-H unix:///var/run/docker-<user_name_3>.sock load -q -i $@/$#
/srv/docker/image       IN_CREATE,IN_MOVED_TO,recursive=false       sudo docker 
-H unix:///var/run/docker-<user_name_4>.sock load -q -i $@/$#
/srv/docker/image       IN_CREATE,IN_MOVED_TO,recursive=false       sudo docker 
-H unix:///var/run/docker-dperisic.sock load -q -i $@/$#

and running ls -la on /srv/docker/image directory shows:
total 1752956
drwxr-xr-x 2 admin  admin        4096 sij  11  2024 .
drwxr-xr-x 3 root   root         4096 sij   3  2024 ..
-rw------- 1 admin  admin  1795014144 sij  11  2024 peta_dev.tar.gz

Only one archive in directory. Yet running the inoty watcher counting script 
from:
https://github.com/fatso83/dotfiles/blob/master/utils/scripts/inotify-consumers

shows that icron's daemon consumes all available watchers:
   INOTIFY   INSTANCES
   WATCHES      PER   
    COUNT     PROCESS   PID USER         COMMAND
------------------------------------------------------------
 1048514         3        1006 root        /usr/sbin/incrond
<other users watches account for 438 wathces - reminder of list skipped for 
privacy>

 1048952  WATCHES TOTAL COUNT

This is status of incron daemon from systemctl:
● incron.service - file system events scheduler
     Loaded: loaded (/lib/systemd/system/incron.service; enabled; vendor 
preset: enabled)
     Active: active (running) since Fri 2024-10-11 14:47:50 CEST; 2h 32min ago
       Docs: man:incrond(8)
   Main PID: 1006 (incrond)
      Tasks: 5 (limit: 154367)
     Memory: 34.6G
     CGroup: /system.slice/incron.service
             ├─  1006 /usr/sbin/incrond
             ├─154033 [incrond]
             ├─154034 [incrond]
             └─154035 [incrond]

oct 11 17:19:53 server02 incrond[1006]: PATH 
(./usr/lib/x86_64-linux-gnu/libc.so.6) FILE () EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
oct 11 17:19:53 server02 incrond[1006]: PATH (./usr/lib/x86_64-linux-gnu) FILE 
(libc-2.31.so) EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
oct 11 17:19:53 server02 incrond[1006]: PATH 
(./usr/lib/x86_64-linux-gnu/libc.so.6) FILE () EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
oct 11 17:19:53 server02 incrond[1006]: PATH (./usr/lib/x86_64-linux-gnu) FILE 
(libc-2.31.so) EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
oct 11 17:19:53 server02 incrond[1006]: PATH 
(./usr/lib/x86_64-linux-gnu/libc.so.6) FILE () EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
oct 11 17:19:53 server02 incrond[1006]: PATH (./usr/lib/x86_64-linux-gnu) FILE 
(libc-2.31.so) EVENT (IN_ACCESS)
oct 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)
lis 11 17:19:53 server02 incrond[1006]: PATH 
(./usr/lib/x86_64-linux-gnu/libc.so.6) FILE () EVENT (IN_ACCESS)
lis 11 17:19:53 server02 incrond[1006]: (admin) CMD (             flags         
                      app)

This requires daemon restart every couple of days.

** Affects: incron (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2084267

Title:
  incron daemon consumes all inotify watchers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/incron/+bug/2084267/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to