Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyinotify creates Zombie (defunct) processes #195

Open
TheDevarshiShah opened this issue Aug 20, 2021 · 1 comment
Open

Pyinotify creates Zombie (defunct) processes #195

TheDevarshiShah opened this issue Aug 20, 2021 · 1 comment

Comments

@TheDevarshiShah
Copy link

We are using latest Pyinotify (0.9.6) on a K8S cluster as a monitor. We are seeing Pyinotify creating 1 to 4 Zombie (defunct) processes. We couldn't find any fix or workaround. We have tried workaround mentioned in this issue both in Python 2 and 3 but it's not working. We also tried with different sleep seconds, still it's not working.
See logs:

$ python2 --version
Python 2.7.5
$
$
$
$
$ ps -efl | egrep 'defunct|pyinotify'
0 S root  46030 24027  0    80   0 - 28203 pipe_w 15:07 pts/12   00:00:00 grep -E --color=auto defunct|pyinotify
$
$
$
$
$ python2 /usr/lib/python2.7/site-packages/pyinotify.py -e IN_MODIFY -f /tmp/pyinotify/text.txt -c 'sleep 1' & sleep 2 ; echo hello >temp.log
[1] 48953
$
$
$
$
$ ps -efl | egrep 'defunct|pyinotify'
0 S root  48953 24027  1    80   0 - 51855 poll_s 15:08 pts/12   00:00:00 python2 /usr/lib/python2.7/site-packages/pyinotify.py -e IN_MODIFY -f /tmp/pyinotify/text.txt -c sleep 1
0 Z root  48964 48953  0    80   0 -     0 do_exi 15:08 pts/12   00:00:00 [sleep] <defunct>
0 S root  51118 24027  0    80   0 - 28204 pipe_w 15:08 pts/12   00:00:00 grep -E --color=auto defunct|pyinotify
$
$
$
$
$ python2 /usr/lib/python2.7/site-packages/pyinotify.py --version
0.9.4
@TheDevarshiShah
Copy link
Author

May we know some workaround to get rid of these zombie processes if possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant