Bug 1952715

Summary: libcap-ng used by "/usr/sbin/irqbalance" failed due to not having CAP_SETPCAP in capng_apply
Product: [Fedora] Fedora Reporter: Jeremy Linton <jeremy.linton>
Component: irqbalanceAssignee: Timothée Ravier <travier>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: aaronuk5, alex765, alex.bramford, alexey12424323, Bert.Deknuydt, bexelbie, brendan.cunningham, bugzilla-redhat, commodorekappa+redhat, dac.override, jpazdziora, kkarampo, mark, mironov.ivan, nhorman, rabin, samoht0-bugzilla, sgrubb, thedatum+bz, travier, walters, xose.vazquez, yalzhang, zbyszek
Target Milestone: ---Flags: travier: needinfo-
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: irqbalance-1.9.0-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-01 15:55:16 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:
Bug Depends On: 2091169    
Bug Blocks: 245418    

Description Jeremy Linton 2021-04-22 23:01:58 UTC
Description of problem: Clean install of the latest f34 development image on dl.fedoraproject.org via PXE to a rpi4 using the PFTF UEFI.

Threw the following errors after install:

Apr 05 19:00:12 fedora systemd[1]: Starting System Logging Service...
Apr 05 19:00:12 fedora systemd[1]: Starting Self Monitoring and Reporting Technology (SMART) Daemon...
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ vgic(9) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ arch_timer(10) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ vtimer(11) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ mmc0(24) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ xhci-hcd:usb1(27) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ arm-pmu(29) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ arm-pmu(30) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ arm-pmu(31) guessed as class 0
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: IRQ arm-pmu(32) guessed as class 0
Apr 05 19:00:12 fedora systemd[1]: Starting OpenSSH ecdsa Server Key Generation...
Apr 05 19:00:12 fedora /usr/sbin/irqbalance[762]: libcap-ng used by "/usr/sbin/irqbalance" failed due to not having CAP_SETPCAP in capng_apply
Apr 05 19:00:12 fedora systemd[1]: Starting OpenSSH ed25519 Server Key Generation...



Version-Release number of selected component (if applicable):

libcap-ng-0.8.2-4.fc34.aarch64
irqbalance-1.7.0-5.fc34.aarch64


How reproducible:


Steps to Reproduce:
1. Install f34 server to rpi4 using UEFI, with default options
2. Boot
3. journalctl

Actual results: From systemctl it looks like irqbalance is running.
[root@fedora ~]# systemctl status irqbalance.service
● irqbalance.service - irqbalance daemon
     Loaded: loaded (/usr/lib/systemd/system/irqbalance.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-04-05 19:00:12 CDT; 2 weeks 2 days ago
       Docs: man:irqbalance(1)
             https://github.com/Irqbalance/irqbalance
   Main PID: 762 (irqbalance)
      Tasks: 2 (limit: 9222)
     Memory: 792.0K
        CPU: 501ms
     CGroup: /system.slice/irqbalance.service
             └─762 /usr/sbin/irqbalance --foreground




Expected results:


Additional info: There is a pretty similar sounding bug bz #1940791 for libvirtd

Comment 1 Jeremy Linton 2021-04-22 23:03:34 UTC
Doesn't look like an aarch64 problem but including it on the arm tracker.

Comment 2 Timothée Ravier 2021-05-05 08:37:36 UTC
From https://bugzilla.redhat.com/show_bug.cgi?id=1924218:

libcap-ng-0.8.2 does better error detection of some problems that were previously hidden. A patched version of libcap-ng is now emitting warnings when it sees a problem in the use of the API.

On a fresh Fedora CoreOS node, I get the following output in the journal:
```
/usr/sbin/irqbalance[965]: libcap-ng used by "/usr/sbin/irqbalance" failed due to not having CAP_SETPCAP in capng_apply
```

Version-Release number of selected component (if applicable):

irqbalance-1.7.0-5.fc34.x86_64

How reproducible:

Always

Comment 3 samoht0 2021-05-07 18:26:50 UTC
As already noted, also x86_64 affected (here an old AMD E-450 APU).
Maybe severity should be bumped. Broken "irqbalance" looks bad.

Comment 4 samoht0 2021-05-07 20:24:42 UTC
Upstream suggests a rebuild:
https://github.com/Irqbalance/irqbalance/issues/182

Comment 5 Steve Grubb 2021-05-11 19:05:31 UTC
A rebuild won't fix it. This is because of NoNewPrivileges=yes in irqbalance.service. That line can be deleted since the program correctly drops capabilities.

Comment 6 Sorin Sbarnea 2021-05-15 17:08:36 UTC
Is there something I can on on my machine to sort this out or I need to wait for an update?

Comment 7 Sorin Sbarnea 2021-05-16 09:55:51 UTC
I can confirm that applying https://github.com/Irqbalance/irqbalance/commit/43751dfc7f29fbf2c46ffcd4fdb6d3f6db291927 does make irqbalance service succesfully start.

Comment 8 dac.override 2021-06-30 12:45:39 UTC
Its because of an error in the service unit.

It has CapabilityBoundingSet= but that should then be CapabilityBoundingSet=CAP_SETPCAP

# /etc/systemd/system/irqbalance.service.d/override.conf
[Service]
CapabilityBoundingSet=
CapabilityBoundingSet=CAP_SETPCAP

That is not the only issue with this package though as:

https://src.fedoraproject.org/rpms/irqbalance/blob/rawhide/f/irqbalance-1.6.0-env-file-path.patch

Is not applied and so /etc/sysconfig/irqbalance is ignored.

Comment 9 Zbigniew Jędrzejewski-Szmek 2021-10-13 07:06:41 UTC
*** Bug 2009811 has been marked as a duplicate of this bug. ***

Comment 10 Zbigniew Jędrzejewski-Szmek 2021-10-13 07:08:15 UTC
It'd be nice to get this fixed in time for F35 final…

Comment 11 Brian (bex) Exelbierd 2021-11-08 09:36:50 UTC
It'd be lovely if we would consider also fixing this in F34 - that way I could delete my manual fix :)

Comment 12 Xose Vazquez Perez 2021-11-18 13:59:33 UTC
1.8.0-1 is in the oven, and this bug is still present:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1856781

Comment 13 thedatum+bz 2021-12-20 23:16:47 UTC
This issue is still present in Fedora 35 and irqbalance v1.7.0-8.fc35.x86_64

It seems the fix merged in September 2021 is not yet included in the current latest release (v1.8.0) of irqbalance from April 2021. https://github.com/Irqbalance/irqbalance/issues/182

Comment 14 thedatum+bz 2021-12-21 00:47:08 UTC
Note that the fix is in this irqbalance commit and needs to be backported as it is not in the current latest (v1.8.0) release: https://github.com/Irqbalance/irqbalance/pull/192

Comment 15 Aaron 2022-02-23 01:04:48 UTC
This build seems to be cancelled for F35 and F36, any reason why?
https://koji.fedoraproject.org/koji/buildinfo?buildID=1856781
https://koji.fedoraproject.org/koji/buildinfo?buildID=1856933

Comment 16 Zbigniew Jędrzejewski-Szmek 2022-02-23 07:43:54 UTC
Started	Tue, 16 Nov 2021 22:15:09 UTC
Completed	Mon, 13 Dec 2021 18:21:55 UTC

Looks like koji might have hung and then somebody killed the build to clean up.

Comment 17 Ben Cotton 2022-05-12 16:18:06 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
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
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 18 Steve Grubb 2022-05-18 12:48:08 UTC
This problem still exists on F35.

Comment 19 Timothée Ravier 2022-05-27 15:29:18 UTC
Still an issue on Fedora (CoreOS) 36:

```
/usr/sbin/irqbalance[868]: libcap-ng used by "/usr/sbin/irqbalance" failed dropping bounding set due to not having CAP_SETPCAP in capng_apply
```

This needs a simple backport of https://github.com/Irqbalance/irqbalance/pull/192 or maybe adding CAP_SETPCAP to the bounding set instead.

Comment 20 Xose Vazquez Perez 2022-05-27 17:32:52 UTC
FYI: Bug 2091169 - irqbalance-1.9.0 is available

Comment 21 Aaron 2022-06-13 10:23:37 UTC
I have successfully updated irqbalance https://copr.fedorainfracloud.org/coprs/ukbeast89/irqblance/ (Yes I realise the typo)
Fixes issue and irqbalance runs fine with no warnings.
I Only needed to update source and bump version on .spec

Missing/wrong source is preventing the build?  2091169

Comment 22 Timothée Ravier 2022-07-12 14:15:08 UTC
@aaronuk5 Please make a PR at https://src.fedoraproject.org/rpms/irqbalance for the new version

Comment 23 Aaron 2022-07-12 15:58:04 UTC
@travier Done https://src.fedoraproject.org/rpms/irqbalance/pull-request/2

This is my first PR on Fedora.

Comment 25 Fedora Update System 2022-08-01 15:51:58 UTC
FEDORA-2022-bbdbfbc2a9 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bbdbfbc2a9

Comment 26 Fedora Update System 2022-08-01 15:55:16 UTC
FEDORA-2022-bbdbfbc2a9 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 27 alexey12424323 2022-09-17 23:39:28 UTC
What about backporting the change to fedora 36?