Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678896 - app-admin/restart-services-0.14.3: does not detect library changes
Summary: app-admin/restart-services-0.14.3: does not detect library changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-27 07:11 UTC by Tomáš Mózes
Modified: 2019-04-05 06:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Mózes 2019-02-27 07:11:14 UTC
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
Comment 1 Marc Schiffbauer gentoo-dev 2019-02-27 10:56:19 UTC
Thanks for reporting! I'll look into this today.
Comment 2 Marc Schiffbauer gentoo-dev 2019-02-27 22:41:30 UTC
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
Comment 3 Tomáš Mózes 2019-03-08 07:19:38 UTC
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]
Comment 4 Tomáš Mózes 2019-03-08 07:29:34 UTC
 # 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?
Comment 5 Tomáš Mózes 2019-03-11 05:12:22 UTC
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
...
Comment 6 Marc Schiffbauer gentoo-dev 2019-03-11 11:06:52 UTC
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!
Comment 7 Tomáš Mózes 2019-04-05 06:56:31 UTC
Just tested 0.14.4 and it works fine, thank you.