Bug 2172846 - sd_bus_add_match often fails with EINTR "Interrupted system call"
Summary: sd_bus_add_match often fails with EINTR "Interrupted system call"
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard: CockpitTest
: 2210317 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-23 09:59 UTC by Martin Pitt
Modified: 2023-07-26 10:44 UTC (History)
4 users (show)

Fixed In Version: systemd-239-77.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel8 pull 372 0 None open ppoll() + EINTR fixes 2023-03-16 07:57:37 UTC
Github systemd systemd pull 21564 0 None Merged tree-wide: introduce ERRNO_IS_TRANSIENT() and use it 2023-02-28 08:54:30 UTC
Github systemd systemd pull 25483 0 None Merged ppoll() + EINTR fixes 2023-02-28 08:54:30 UTC
Red Hat Issue Tracker RHELPLAN-149759 0 None None None 2023-02-23 10:00:15 UTC

Description Martin Pitt 2023-02-23 09:59:11 UTC
Description of problem: The cockpit team is working on a new feature to connect to machines which don't have any Cockpit packages installed. For that we use libsystemd's sd-bus API. We noticed that we get a lot of failures like this:

   InterruptedError: [Errno 4] sd_bus_add_match: Interrupted system call

when setting up D-Bus watches. This does not happen on RHEL 9 and current Fedora, as it was fixed upstream already:

   https://github.com/systemd/systemd/commit/b3d06b9226db96fddb6bb45a4708e2e8d413d91d
   https://github.com/systemd/systemd/commit/3022916b4d2483452c3ddbbac9ee7c4372b1cb46

We have a workaround in Cockpit:

    https://github.com/cockpit-project/cockpit/commit/de5b3562827f2662df11621cff3e55a717e55967

But this is suboptimal -- it can happen to other code paths as well, and likely also to other consumers of the sd-bus API.


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

systemd-libs-239-72.el8.x86_64


How reproducible: Very reliably when running Cockpit's test suite (about 10 in 300 tests fail on this, like in https://cockpit-logs.us-east-1.linodeobjects.com/pull-18318-20230216-065702-d382fce4-centos-8-stream-pybridge/log.html#69 .

However, I don't have an isolated standalone reproducer.

Comment 1 Martin Pitt 2023-02-23 10:12:07 UTC
Let's make this explicit: Could these two commits be backported to RHEL, please?

Comment 2 David Tardon 2023-02-28 08:54:31 UTC
(In reply to Martin Pitt from comment #1)
> Let's make this explicit: Could these two commits be backported to RHEL,
> please?

Yes, they can. This came around before (bug 2137584), but it was just a potential issue then, so we decided not to do anything in RHEL-8.

Comment 3 Lukáš Nykrýn 2023-05-29 12:33:36 UTC
*** Bug 2210317 has been marked as a duplicate of this bug. ***

Comment 4 Plumber Bot 2023-06-14 15:43:06 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/372


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