Bug 1310780

Summary: RFC: Add dnf plugin to detect processes running with deleted shared libraries (or reboot required).
Product: [Fedora] Fedora Reporter: Carlos O'Donell <codonell>
Component: tracerAssignee: Jakub Kadlčík <jkadlcik>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: fweimer, jkadlcik, jlebon, packaging-team-maint, RadekHolyPublic, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 21:48:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos O'Donell 2016-02-22 16:12:02 UTC
The recent glibc CVE-2015-7547 has raised a number of interesting issues when it comes to upgrading. Users have chosen not to reboot per the "reboot suggested" (not required), have been failing to restart dependent processes, and have been filing bugs when their processes fail (not robust against dlopen failures or process startup failures).

I can make two recommendations:

(a) Add a "reboot required" to bodhi and dnf. This is used only as a last resort for critical security issues that require a new kernel or core runtime and everything depends upon it. When an update is installed that requires an update a dnf core plugin would keep warning the user that they need to reboot. This could be done at every subsequent dnf operation.

(b) Add a dnf plugin which scans all running processes on the system in the current process namespace (or in a target namespace if dnf is being used to act upon a container) and detects if any are using deleted shared libraries e.g. /proc/$PID/map_files contains deleted entries. At that point the plugin should recommend a restart of those processes because of the deleted shared libraries which are still mapped into the process. This warning should not be seen for files the user installs and deletes, just for shared libraries which are part of packages controlled by the package manager.

This would greatly help the situation and keep users aware that they have processes or systems that need restarting.

Comments welcome.

Comment 1 Carlos O'Donell 2016-02-22 16:44:21 UTC
It should be noted that this may interact with systemd cgroups, and may need some systemd integration also for a high-quality implementation, but I'm not sure if that is immediately required.

Notes:
https://github.com/stdevel/yum-plugin-needs-restarting
https://rwmj.wordpress.com/2014/07/10/which-services-need-restarting-after-an-upgrade/
https://rwmj.wordpress.com/2014/07/10/which-services-need-restarting-after-an-upgrade/#comment-11067

Comment 2 Jonathan Lebon 2016-02-22 17:17:13 UTC
Note that there is a dnf-tracer plugin: http://dnf-plugins-extras.readthedocs.org/en/latest/tracer.html.

$ sudo dnf install 'dnf-command(tracer)'
$ sudo dnf tracer
You should restart:
  Nothing needs to be restarted

Though recommendation (a) would be nice as well (or maybe even have `dnf update` automatically run `dnf tracer` after the transaction).

Comment 3 Jonathan Lebon 2016-02-22 17:21:17 UTC
Actually, from the docs on that page, it seems to do that already (i.e. runs `tracer` after every transaction). Though on my machine, I have to run it manually (probably not using the latest version or something).

Comment 4 Carlos O'Donell 2016-02-22 21:43:52 UTC
(In reply to Jonathan Lebon from comment #3)
> Actually, from the docs on that page, it seems to do that already (i.e. runs
> `tracer` after every transaction). Though on my machine, I have to run it
> manually (probably not using the latest version or something).

Thanks for that post! Yes, it might mean that we should adopt tracer in some way into the core set of plugins which are enabled. Users need to know what needs restarting IMO. They simply don't pay attention to anything else other than warnings from dnf.

Comment 5 Jan Kurik 2016-02-24 15:28:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 6 Honza Silhan 2016-02-29 12:24:33 UTC
DNF tracer plugin was created by community. Reassigning to plugins extras component to check whether tracer plugin really runs after the transaction.

We don't plan to move tracer plugin into plugins core but you can add tracer plugin alone to base Fedora image (probably needs approval of FESCo).

Comment 7 Fedora End Of Life 2017-07-25 20:14:56 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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.

Comment 8 Fedora End Of Life 2017-08-08 13:04:32 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.

Comment 9 Carlos O'Donell 2017-08-16 16:38:58 UTC
Problem still remains in Rawhide. We should have a way to detect processes running with old libraries and inform the user of them.

Comment 10 Jan Kurik 2018-05-31 09:06:29 UTC
This bug is currently reported against a Fedora version which is already unsuported.
I am changing the version to '27', the latest supported release.

Please check whether this bug is still an issue on the '27' release.
If you find this bug not being applicable on this release, please close it.

Comment 11 Ben Cotton 2018-11-27 15:22:16 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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.

Comment 12 Ben Cotton 2018-11-30 21:48:41 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 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.