After an apache upgrade, restart-services does not detect the change. # lib_users 2796 "/opt/oracle-jdk-bin-1.8.0.202/bin/java -jar slave.jar" 2037,32389,32390,32391,32392,32393,5064 "/usr/sbin/apache2 -D STATUS -D DEFAULT_VHOST -D SSL -D SSL_DEFAULT_VHOST -D PHP -D PROXY -D PASSENGER -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf -k start" app-admin/restart-services-0.14.2::gentoo was built with the following: USE="" ABI_X86="(64)" 0.14.2 works fine # restart-services -d debug: loading config file: /etc/restart-services.conf debug: loading config file: /etc/restart-services.d/00-local.conf debug: loading config file: /etc/restart-services.d/10-local.conf -> Searching for services that need to be restarted ... debug: analyzing lib_users output ... debug: checking pid 2796 debug: lu_pid set to its ppid: 2766 debug: process root is / debug: no direct hit: process "/opt/oracle-jdk-bin-1.8.0.202/bin/java -jar slave.jar" (2766) has no RC_SERVICE env set, adding to TODO_PROCESSES debug: checking pid 2037 debug: lu_pid set to its ppid: 2037 debug: process root is / debug: direct hit: found /etc/init.d/apache2 for /usr/sbin/apache2 (2037) debug: adding to INIT_SCRIPTS: /etc/init.d/apache2 debug: adding to KNOWN_PROCESSES: /usr/sbin/apache2 debug: checking pid 32389 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: checking pid 32390 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: checking pid 32391 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: checking pid 32392 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: checking pid 32393 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: checking pid 5064 debug: lu_pid set to its ppid: 2037 debug: skipping /usr/sbin/apache2 with pid 2037: we already found that ppid debug: analyzing remaining processes (not direct hits) ... debug: TODO_PROCESSES_EXE: /usr/sbin/sshd debug: checking exe /usr/sbin/sshd (pid 2766) debug: pid 2766 does not look like a script debug: found package: net-misc/openssh debug: found init scripts: /etc/init.d/sshd debug: found started service, adding init script: /etc/init.d/sshd done => sshd: Restarting... * Stopping sshd ... [ ok ] * Starting sshd ... [ ok ] => apache2: Not restarting critical service (requires -c) ... debug: looking for false positives in unknown processes app-admin/restart-services-0.14.3::gentoo was built with the following: USE="" ABI_X86="(64)" 0.14.3 does not detect the changes # restart-services -d debug: loading config file: /etc/restart-services.conf debug: loading config file: /etc/restart-services.d/00-local.conf debug: loading config file: /etc/restart-services.d/10-local.conf -> Searching for services that need to be restarted ... debug: analyzing lib_users output ... debug: analyzing remaining processes (not direct hits) ... debug: TODO_PROCESSES_EXE: done No known services need to be restarted. debug: looking for false positives in unknown processes
Thanks for reporting! I'll look into this today.
Please provide some more details: - Version of lib_users: 0.13? - Output of "lib_users -m" Its a bit weird because in this version I added to ignore deleted files in /tmp, but I cannot see any such thing in your lib_users output TIA
app-admin/restart-services-0.14.3::gentoo was built with the following: USE="" ABI_X86="(64)" app-admin/lib_users-0.13::gentoo was built with the following: USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5 -python3_7" # lib_users -m 1761;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0;/usr/sbin/named -u named -t /chroot/dns 1853;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;/usr/bin/nrpe --config=/etc/nagios/nrpe.cfg --daemon 2637;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/net-misc/openssh-7.9_p1-r4/image/usr/sbin/sshd;sshd: user@pts/0 1705;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;supervising syslog-ng 13543;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;/usr/sbin/glusterfs --process-name fuse --volfile-server=gentoo-mirror.sygic.com --volfile-id=/distfiles /usr/portage/distfiles 1021,12656,13777,1555,20613,22887,27246,28457,30287,3847,5089,5091;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;/usr/sbin/apache2 -D DEFAULT_VHOST -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf -k start 4897;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/net-misc/openssh-7.9_p1-r4/image/usr/sbin/sshd;/usr/sbin/sshd -o PidFile=/run/sshd.pid -f /etc/ssh/sshd_config 10010;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;tlsmgr -l -t unix -u 25931;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf 1706;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libssl.so.1.0.0;/usr/sbin/syslog-ng --cfgfile /etc/syslog-ng/syslog-ng.conf --control /run/syslog-ng.ctl --persist-file /var/lib/syslog-ng/syslog-ng.persist --pidfile /run/syslog-ng.pid 2635;/var/tmp/portage/dev-libs/openssl-1.0.2q/image/usr/lib64/libcrypto.so.1.0.0,/var/tmp/portage/net-misc/openssh-7.9_p1-r4/image/usr/sbin/sshd;sshd: user [priv]
# lib_users <= 0.12 reports postgres' "/anon_hugepage" as deleted lib, so tell it to ignore this manually (see bug #648356) -done < <(lib_users -I /anon_hugepage) +# bug #678500: ignore tmp-files (lib_users will not match anything without the leading * in the glob ... lib_users bug?) +done < <(lib_users -I /anon_hugepage -i '*/tmp/*') Doesn't '*/tmp/*' in 0.14.3 also match /var/tmp/portage?
The output provided was from a virtual machine (xen domU). Using the same newest versions on a regular computer, the output of lib_users -m is different: # lib_users -m 3154;/usr/lib64/libcrypto.so.1.1,/usr/lib64/libssl.so.1.1;supervising syslog-ng 4142;/lib64/libbz2.so.1.0.6;pidgin 2139;/usr/lib64/libcrypto.so.1.1;/sbin/udevd ...
You were right. This was a bug introduced in 0.14.3 I just released 0.14.4 which should fix the issue. Please reopen if prpoblem still exists in 0.14.4 for you. Thanks!
Just tested 0.14.4 and it works fine, thank you.