Bug 2051329
Summary: | systemd-sysctl couldn't write settings to 'vm/unprivileged_userfaultfd' | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Frank Liang <xiliang> | ||||
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | ||||
Status: | CLOSED NOTABUG | QA Contact: | yalzhang <yalzhang> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.6 | CC: | fsumsal, jdenemar, linl, lmen, ribarry, systemd-maint-list, virt-maint, vkuznets, xuazhao, xuzhang, ymao | ||||
Target Milestone: | rc | Keywords: | Reopened, Triaged | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2022-02-09 10:54:59 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: | 2037807 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
*** This bug has been marked as a duplicate of bug 2037807 *** I see bug 2037807 talking about "systemd-sysctl[335]: Couldn't write '0 2147483647' to '-net/ipv4/ping_group_range', ignoring: No such file or directory". Is below error fixed together? Feb 07 02:16:39 localhost systemd-sysctl[335]: Couldn't write '1' to 'vm/unprivileged_userfaultfd', ignoring: No such file or directory /proc/sys/vm/unprivileged_userfaultfd was introduced in kernel 5.2, thus it's not present in RHEL 8 as far as I know, so the error is expected. I'm not sure where 60-qemu-postcopy-migration.conf comes from, but it's definitely not systemd. Thanks, Frantisek 60-qemu-postcopy-migration.conf belongs to libvirt-daemon-driver-qemu. Hi Vitaly, I think we can reopen this bug to fix below error (not supported in RHEL-8 as above comment#3) and reassign it to libvirt team, do you have other comments? Thanks Feb 07 02:16:39 localhost systemd-sysctl[335]: Couldn't write '1' to 'vm/unprivileged_userfaultfd', ignoring: No such file or directory Well, I wouldn't consider this a bug. We added the conf file upstream because the sysctl needs to be set to 1 on new(ish) kernels to support post-copy migration. This is needed for RHEL-9, for example. In RHEL-8 such sysctl does not exist and does not need to be set, but I think it's better to keep the config file around anyway in case vm.unprivileged_userfaultfd is backported (it was added upstream as some kind of a security enhancement). And since systemd-sysctl already ignores any failures caused by attempts to set missing sysctl knobs, I don't think there's anything to fix here. Well, we should add "-" prefix upstream so that non-systemd sysctl tool ignores the errors too, but doing so would have no effect in RHEL-8 (actually adding the dash would need an updated systemd to work properly, see bug 2037807). The error message seen in the log is harmless and it's even marked as such by systemd: # journalctl --output=verbose --grep userfaultfd --boot -- Logs begin at Wed 2022-02-09 09:20:40 UTC, end at Wed 2022-02-09 10:26:33 UTC. -- Wed 2022-02-09 09:56:21.694825 UTC [s=fb5ea867bc2d48b5967a76bd59d21500;i=daa;b=da50b75465b4437fa63d703ca9d87a1c;m=2f12aa;t=5d792d88a6a77;x=492e7e8a7dcc1b7e] _BOOT_ID=da50b75465b4437fa63d703ca9d87a1c _MACHINE_ID=9db0456ca73e65891e0ab7956d91da96 _HOSTNAME=rhel86-dev.virt PRIORITY=5 SYSLOG_FACILITY=3 _UID=0 _GID=0 CODE_FILE=../src/sysctl/sysctl.c CODE_LINE=91 CODE_FUNC=apply_all ERRNO=2 SYSLOG_IDENTIFIER=systemd-sysctl MESSAGE=Couldn't write '1' to 'vm/unprivileged_userfaultfd', ignoring: No such file or directory _TRANSPORT=journal _PID=626 _COMM=systemd-sysctl _CAP_EFFECTIVE=1ffffffffff _SELINUX_CONTEXT=system_u:system_r:systemd_sysctl_t:s0 _SOURCE_REALTIME_TIMESTAMP=1644400581694825 You can see the message is logged with PRIORITY=5, that is NOTICE, which is a fairly low priority and it should not bother anyone as it's the same priority that is used for a lot of other common messages, e.g., "anacron[1656]: Anacron started on 2022-02-09". |
Created attachment 1859496 [details] os_tests.tests.test_general_check.TestGeneralCheck.test_check_journalctl_not_found.debug Description of problem: Found below error in RHEL-8.6.0-20220205.2 testing. # journalctl -u systemd-sysctl -- Logs begin at Mon 2022-02-07 02:16:38 UTC, end at Mon 2022-02-07 02:51:07 UTC. -- Feb 07 02:16:39 localhost systemd[1]: Starting Apply Kernel Variables... Feb 07 02:16:39 localhost systemd-sysctl[335]: Couldn't write '0 2147483647' to '-net/ipv4/ping_group_range', ignoring: No such file or directory Feb 07 02:16:39 localhost systemd-sysctl[335]: Couldn't write '1' to 'vm/unprivileged_userfaultfd', ignoring: No such file or directory Feb 07 02:16:39 localhost systemd[1]: Started Apply Kernel Variables. Feb 07 02:16:43 localhost systemd[1]: systemd-sysctl.service: Succeeded. Feb 07 02:16:43 localhost systemd[1]: Stopped Apply Kernel Variables. # grep -R ping_group_range 50-default.conf:-net.ipv4.ping_group_range = 0 2147483647 # grep -R unprivileged_userfaultfd 60-qemu-postcopy-migration.conf:vm.unprivileged_userfaultfd = 1 # rpm -qf /usr/lib/sysctl.d/50-default.conf systemd-239-56.el8.x86_64 # sysctl net.ipv4.ping_group_range net.ipv4.ping_group_range = 1 0 # sysctl vm.unprivileged_userfaultfd sysctl: cannot stat /proc/sys/vm/unprivileged_userfaultfd: No such file or directory RHEL Version: RHEL-8.6(4.18.0-364.el8.x86_64) How reproducible: 100% Steps to Reproduce: 1. Start a RHEL-8.6 instance 2. Run 'journalctl -u systemd-sysctl' Actual results: Some options are not set Expected results: All options should be applied successfully Additional info: - No such issue in RHEL-9. # sysctl vm.unprivileged_userfaultfd vm.unprivileged_userfaultfd = 1 # sysctl net.ipv4.ping_group_range net.ipv4.ping_group_range = 0 2147483647 # rpm -q systemd systemd-249-9.el9.x86_64