Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
systemctl incorrectly reports "Error: No space left on device" when restarting a service. The issue is related to the kernel setting fs.inotify.max_user_watches
Version-Release number of selected component (if applicable):
# rpm -qa |grep systemd
systemd-219-30.el7_3.8.x86_64
How reproducible:
Always
Steps to Reproduce / Actual Results:
(Have Crashplan backup client installed - or another application using up user_watches)
# sysctl fs.inotify.max_user_watches=8192
fs.inotify.max_user_watches = 8192
# systemctl restart ntpd
Error: No space left on device
# sysctl -w fs.inotify.max_user_watches=131072
fs.inotify.max_user_watches = 131072
# systemctl restart ntpd
#
Expected results:
Error message describing the actual root cause of the error condition: max_user_watches exhausted.
Additional info:
See also BZ# 1316855 and BZ# 894483
Created attachment 1281430[details]
reproducer
Steps to reproduce:
1) Untar the reproducer.
2) $ sh run.sh
3) Observe.
Note that the reproducer sets max_user_watches to 8192. If, by any chance, step 2 doesn't reproduce the issue, any subsequent "systemctl start test" followed by "systemctl stop test" should do it.
The thing here is that systemd simply translates the errno returned by inotify_add_watch(), which is ENOSPC and then translates it into string, which is "No space left on device", as can be seen in the output of "systemctl status test". I think that, in this particular case, it would be reasonable to add one if (r == -ENOSPC) {...} to create a message fitting for this case instead of a general one.
Rescheduling this for RHEL-7.5.
(In reply to Jan Synacek from comment #2)
> I think that, in this particular case, it would be
> reasonable to add one if (r == -ENOSPC) {...} to create a message fitting
> for this case instead of a general one.
Unfortunately, after some debugging I found out that it's actually not so trivial to fix this bug.
(In reply to Jan Synacek from comment #3)
> Unfortunately, after some debugging I found out that it's actually not so
> trivial to fix this bug.
Scratch that, it is easy to fix, it just wasn't obvious at first sight...
https://github.com/systemd/systemd/issues/6030
Created attachment 1282191[details]
patch
This patch fixes this particular problem, which will probably be enough. I figure that a correct upstream patch would be more general, though.
Comment 8RHEL Program Management
2021-01-15 07:36:37 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.