FS#62695 - [snapper] dbus service activation triggers Failed to reset fd limit

Attached to Project: Community Packages
Opened by Roland Friedwagner (rfried) - Tuesday, 21 May 2019, 19:09 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Saturday, 08 June 2019, 08:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
All snapper services activated via servicehelper does trigger fd limit errors.
Showing up in systemd journal like this::
newnas systemd[1]: Started Daily Cleanup of Snapper Snapshots.
dbus-daemon[489]: [system] Activating service name='org.opensuse.Snapper' requested by ':1.22' (uid=0 pid=8379 comm="/usr/lib/snapper/systemd-helper --cleanup ") (using servicehelper)
dbus-daemon[8381]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
dbus-daemon[489]: [system] Successfully activated service 'org.opensuse.Snapper'

The "Failed to reset fd limit before activating service" is logged on each
systemd snapper timer activation (snapper-boot.timer, snapper-cleanup.timer, snapper-timeline.timer).

The service action (new snapshot; cleanup snapshots) are carried out as expected.

Additional info:
* package version(s): snapper 0.8.3-1, dbus 1.12.12-1, systemd 242.29-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
$ snapper list
$ journalctl -aeb -u dbus
...
dbus-daemon[489]: [system] Activating service name='org.opensuse.Snapper' requested by ':1.28' (uid=0 pid=8492 comm="snapper --iso list ") (using servicehelper)
dbus-daemon[8494]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
dbus-daemon[489]: [system] Successfully activated service 'org.opensuse.Snapper'
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Saturday, 08 June 2019, 08:09 GMT
Reason for closing:  Fixed
Comment by Roland Friedwagner (rfried) - Friday, 07 June 2019, 21:08 GMT
After dbus update from 1.12.12-1 to 1.12.14-1
message about "Failed to reset fd limit ..." vanished.

Found this in dbus 1.12.14 Changelog - https://gitlab.freedesktop.org/dbus/dbus/blob/a330c6184fe9c7f67495f8d4563b11d51a6dccc7/NEWS :

• Raise soft fd limit to match hard limit, even if unprivileged.
This makes session buses with many clients, or with clients that make
heavy use of fd-passing, less likely to suffer from fd exhaustion.
(dbus!103, Simon McVittie)

• If a privileged dbus-daemon has a hard fd limit greater than 64K, don't
reduce it to 64K, ensuring that we can put back the original fd limits
when carrying out traditional (non-systemd) activation. This fixes a
regression with systemd >= 240 in which system services inherited
dbus-daemon's hard and soft limit of 64K fds, instead of the intended
soft limit of 1K and hard limit of 512K or 1M.
(dbus!103, Debian#928877; Simon McVittie)

Kind Regards and many thanks for the snapper package to Massimiliano
Comment by Massimiliano Torromeo (mtorromeo) - Saturday, 08 June 2019, 08:09 GMT
Thanks for the update

Loading...