RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2040247 - systemd: Unknown system calls should produce ENOSYS under systemd-nspawn
Summary: systemd: Unknown system calls should produce ENOSYS under systemd-nspawn
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
: 1992708 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-13 10:03 UTC by Florian Weimer
Modified: 2022-11-08 12:36 UTC (History)
5 users (show)

Fixed In Version: systemd-239-65.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 10:49:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
probe-system-calls.c (1.81 KB, text/x-csrc)
2022-01-13 10:03 UTC, Florian Weimer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel8 pull 286 0 None open Return ENOSYS for unknown system calls 2022-05-31 14:21:35 UTC
Github systemd systemd pull 16819 0 None Merged Return ENOSYS in nspawn for "unknown" syscalls 2022-01-20 11:35:53 UTC
Red Hat Bugzilla 1985499 1 unspecified CLOSED podman: Cannot run Fedora 35/RHEL 9 Beta images due to clone3 incompatibility 2023-06-16 07:56:24 UTC
Red Hat Issue Tracker RHELPLAN-107798 0 None None None 2022-01-13 10:10:58 UTC
Red Hat Product Errata RHBA-2022:7727 0 None None None 2022-11-08 10:50:26 UTC

Description Florian Weimer 2022-01-13 10:03:02 UTC
Created attachment 1850549 [details]
probe-system-calls.c

Created attachment 1850549 [details]
probe-system-calls.c

Created attachment 1850549 [details]
probe-system-calls.c

The attached program, when running under systemd-container-239-51.el8.x86_64, produces the following output for the arguments “400 430”:

400: -1 (errno 1 [EPERM])
401: -1 (errno 1 [EPERM])
402: -1 (errno 1 [EPERM])
403: -1 (errno 1 [EPERM])
404: -1 (errno 1 [EPERM])
405: -1 (errno 1 [EPERM])
406: -1 (errno 1 [EPERM])
407: -1 (errno 1 [EPERM])
408: -1 (errno 1 [EPERM])
409: -1 (errno 1 [EPERM])
410: -1 (errno 1 [EPERM])
411: -1 (errno 1 [EPERM])
412: -1 (errno 1 [EPERM])
413: -1 (errno 1 [EPERM])
414: -1 (errno 1 [EPERM])
415: -1 (errno 1 [EPERM])
416: -1 (errno 1 [EPERM])
417: -1 (errno 1 [EPERM])
418: -1 (errno 1 [EPERM])
419: -1 (errno 1 [EPERM])
420: -1 (errno 1 [EPERM])
421: -1 (errno 1 [EPERM])
422: -1 (errno 1 [EPERM])
423: -1 (errno 1 [EPERM])
424: -1 (errno 1 [EPERM])
425: -1 (errno 1 [EPERM])
426: -1 (errno 1 [EPERM])
427: -1 (errno 1 [EPERM])
428: -1 (errno 1 [EPERM])
429: -1 (errno 1 [EPERM])
430: -1 (errno 1 [EPERM])

This means that systemd-nspawn breaks various distributions that use newer system calls in glibc. Only ENOSYS triggers fallback, EPERM is treated as a regular system call error.

This causes errors like this one in mock:

Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]

For mock, the workaround is to use “simple” isolation (not systemd-nspawn). That is, add this line to /etc/mock/site-defaults.cfg:

config_opts['isolation'] = 'simple'

But ideally, this workaround should not be needed.

This appears to have been fixed in Fedora; I don't see these EPERM errors with systemd-container-249.7-2.fc35.x86_64.

Comment 1 Florian Weimer 2022-01-13 10:10:27 UTC
Bug 1985499 is essentially the same issue for the podman container stack. It was changed to use ENOSYS.

Comment 3 David Tardon 2022-04-21 12:29:44 UTC
*** Bug 1992708 has been marked as a duplicate of this bug. ***

Comment 4 Plumber Bot 2022-08-18 12:06:01 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/286

Comment 8 errata-xmlrpc 2022-11-08 10:49:54 UTC
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-2022:7727


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