Bug 2137584
Summary: | bus_poll() can fail with EINTR, which doesn't seem handled by callers at all | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Renaud Métrich <rmetrich> |
Component: | systemd | Assignee: | David Tardon <dtardon> |
Status: | CLOSED ERRATA | QA Contact: | Frantisek Sumsal <fsumsal> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9.0 | CC: | dtardon, jamacku, systemd-maint-list |
Target Milestone: | rc | Keywords: | Improvement, Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | systemd-252-2.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-05-09 08:21:58 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
Renaud Métrich
2022-10-25 15:02:07 UTC
If I understand the code correctly, EINTR is supposed to be handled by callers of bus_poll() (because it's almost always called from a loop anyway), but the check is missing at a few places. In particular, I think that sd_bus_call() is the culprit in the case of bug 2137579. EAGAIN is not interesting because systemd doesn't support "some other UNIX systems", only Linux. (In reply to David Tardon from comment #1) > If I understand the code correctly, EINTR is supposed to be handled by > callers of bus_poll() (because it's almost always called from a loop > anyway), but the check is missing at a few places. In particular, I think > that sd_bus_call() is the culprit in the case of bug 2137579. Eh, actually I was looking at how EINTR is typically handled, not specifically just places that call bus_poll(). But I still think that the error should be handled by callers of bus_poll(). I think specifically for bus_poll() we should just retry immediately. But maybe there are other places to look at indeed. I tried producing some EINTR on RHEL8 this morning but couldn't. (In reply to Renaud Métrich from comment #3) > I tried producing some EINTR on RHEL8 this morning but couldn't. Just to simulate the situation to see what happens should be relatively simple using a gdb script that breaks on bus_poll() and returns -EINTR. Something like (untested): # cat > eintr.gdb <<EOF break bus_poll commands disable return -EINTR end continue EOF # gdb -nx -x eintr.gdb --pid=1 Given that there's no known reproducer for the issue on RHEL-8, do we need to backport the fix(es) there? Maybe RHEL-9 is enough? Yes RHEL9 is good enough. fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/123 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (systemd bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2531 |