Description of problem: The following description of the reported problem comes from http://ingvar.blog.redpill-linpro.com/2014/01/20/finding-what-binaries-to-restart-revisited/ Processes may map libraries without opening them. If the underlying library is updated, needs-restarting won’t list the process as need to be restarted. But the process may crash or behave strangely when it some time in the future opens a mapped library, and that library has been changed by an update. And yes, this is a real problem, experienced on production systems. Additional info: It is suggested for the needs-restarting script to dig a bit deeper, by running ldd on the running process binaries, and recursively checking all underlying libraries.
Hello, thank you for the report. Could you please provide a reproducer?
Hello, Valentina. I'm the one who wrote the script on that blog entry. I can reproduce that the script does not pick up changes in a mapped but unopened library for a running process. Crashing that process may be a bit harder. We've seen this in a customer case, crashing a Java JVM some months ago, though. Here is an example. After updating openssl, ntpd should be restarted. In most cases, this is not picked up by needs-restarting: [root@nova ~]# rpm -q openssl ntp openssl-0.9.8e-27.el5_10.4 ntp-4.2.2p1-17.el5_10 [root@nova ~]# needs-restarting | grep ntp || echo nothing nothing [root@nova ~]# ldd /sbin/ntpd | grep crypt libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002abf7b1a1000) [root@nova ~]# date -d "@$(rpm -q --qf "%{INSTALLTIME}\n" -f /lib64/libcrypto.so.6)" Thu Aug 14 09:27:40 CEST 2014 [root@nova ~]# ps -o lstart,pid -p `pgrep ntpd` STARTED PID Sat Jun 7 16:58:45 2014 1982 So the ntpd process is older than the library, and should be restarted. The needs-restarting script does discover this. My script does: [root@nova ~]# check_newlibs | grep ntp Warning: Needs restart: /sbin/ntpd, pids 1982 Best regards, Ingvar Hagelund
Correction: (...) the ntpd process is older than the library, and should be restarted. The needs-restarting script does NOT discover this. My script does (...)
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Reproduced on Fedora 22 Steps to reproduce: Downgrade openssl, for example to openssl-1.0.1j-3, http://koji.fedoraproject.org/koji/buildinfo?buildID=594471 # rpm --oldpackage -Uvh openssl-1.0.1j-3.fc22.x86_64.rpm \ openssl-libs-1.0.1j-3.fc22.x86_64.rpm \ openssl-devel-1.0.1j-3.fc22.x86_64.rpm Restart ntpd # systemctl restart ntpd.service Upgrade openssl # dnf update openssl (...) Upgraded: openssl.x86_64 1:1.0.1k-10.fc22 openssl-devel.x86_64 1:1.0.1k-10.fc22 openssl-libs.x86_64 1:1.0.1k-10.fc22 As ntpd links into openssl, it should be restarted: # ldd /usr/sbin/ntpd | grep libcrypto libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fa6b3bfb000) # rpm -qf /lib64/libcrypto.so.10 openssl-libs-1.0.1k-10.fc22.x86_64 But needs-restarting does not discover this: # needs-restarting | grep ntp (no output) My script does discover this: # check_newlibs | grep ntp Warning: Needs restart: /usr/sbin/ntpd, pids 14722
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.