Bug 2428601 - Inconsistencies with dnf needs-restarting
Summary: Inconsistencies with dnf needs-restarting
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 43
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
: 2419668 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-11 22:25 UTC by Joe Walker
Modified: 2026-01-27 19:47 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joe Walker 2026-01-11 22:25:34 UTC
dnf5 version 5.2.17.0
dnf5 plugin API version 2.0
libdnf5 version 5.2.17.0
libdnf5 plugin API version 2.2

name: needs_restarting
version: 1.0.0
API version: 2.0

Fedora 43

This sometimes works and sometimes does not. 
What works:
dnf needs-restarting 
dnf needs-restarting --services
sudo -E dnf needs-restarting 

What doesn't always work: 
sudo dnf needs-restarting 
sudo dnf needs-restarting --services 
sudo dnf needs-restarting --reboothint

When the command with sudo fail, running without sudo functions correctly. 

What doesn't work: 
sudo -E dnf needs-restarting --services 
It returns [System.Error.ENOTCONN] Failed to flush bus on opening (Transport endpoint is not connected)
Similar to: https://bugzilla.redhat.com/show_bug.cgi?id=2419668



Reproducible: Sometimes

Steps to Reproduce:
1. sudo dnf upgrade with a kernel or systemd upgrade 
2. Before rebooting, sudo dnf needs-restarting.
3. If it indicates: 
A reboot is necessary: 
run sudo dnf needs-restarting --reboothint
or 
run dnf needs-restarting
Then re-run sudo dnf needs-restarting 
when it fails it will indicate:
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.

sudo dnf needs-restarting --services appears to also fail in a similar manner.  
Actual Results:
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
Is returned when there are packages or services that have been updated that require reboot. 

Expected Results:
sudo dnf needs-restarting returns: 
Core libraries or services have been updated since boot-up:

When the packages/services needing reboot https://github.com/rpm-software-management/dnf5/blob/835466a88172148780b5937d49da54fbcae34144/libdnf5/rpm/package_query.cpp#L3018 are modified. 


Additional Information:
https://github.com/rpm-software-management/dnf5/issues/2562

Comment 1 Pavla Kratochvilova 2026-01-16 11:56:11 UTC
*** Bug 2419668 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.