rpc.rquotad takes 100% CPU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
quota (CentOS) |
Fix Committed
|
High
|
|||
quota (Fedora) |
Fix Committed
|
High
|
|||
quota (Ubuntu) |
Fix Released
|
High
|
Christian Ehrhardt | ||
Bionic |
Fix Released
|
Undecided
|
Christian Ehrhardt |
Bug Description
[Impact]
* Certain configurations will fall into a busy loop and never fully start
* Fix by backporting from upstream
[Test Case]
1. install packages
$ sudo apt install rpcbind quota
2. to let the service start at all one need:
- Add ",usrquota" to your fstab options somewhere
- Add a fake export to /etc/exports like
/tmp 127.0.0.1
3. offending config:
Only then will quotarpc.service start, but it does not expose the
faulty behavior yet, to get that set a special port via
RPCRQUOTADOP
Now you can run systemctl restart quota and it will lock up in 100% CPU.
[Regression Potential]
* It is an extra listen and setsockipt call. While it is correct to do
those (that is the fix) there might exist cases we didn't hit in
testing where those calls fail and break it.
Yet since it lies on a code path that currently is affected by the 100%
cpu hog that should (tm) not be a huge regression potential.
At least both paths - if failing - have proper error reporting so a
user will know what broke and is not just failing without knowing why
out of a sudden.
[Other Info]
* n/a
---
This happens on Ubuntu 18.04 with package quota 4.04-2 installed.
The bug is already known and a patch is available: https:/
Related branches
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 129 lines (+95/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/lp-1774431-fix-Listen-on-a-TCP-socket.patch (+84/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 129 lines (+95/-1)4 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/lp-1774431-fix-Listen-on-a-TCP-socket.patch (+84/-0)
debian/patches/series (+1/-0)
description: | updated |
description: | updated |
Changed in quota (CentOS): | |
importance: | Unknown → High |
status: | Unknown → Fix Committed |
Changed in quota (Fedora): | |
importance: | Unknown → High |
status: | Unknown → Fix Committed |
tags: | added: server-next |
Changed in quota (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in quota (Ubuntu): | |
status: | Triaged → In Progress |
Changed in quota (Ubuntu Bionic): | |
status: | Triaged → In Progress |
Changed in quota (Ubuntu): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Changed in quota (Ubuntu Bionic): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Description of problem:
The quota daemon, rpc.rquotad consumes 100% CPU on one core.
It does answer correctly to queries though.
Version-Release number of selected component (if applicable):
quota-rpc- 4.04-5. fc28.x86_ 64
How reproducible:
100% and immediately.
Steps to Reproduce: services
1. dnf install quota-rpc
2. systemctl start rpc-rquotad.
3. top
Actual results:
You see 90+% CPU usage from rpc.rquotad
Expected results:
Minimal CPU usage from rpc.rquotad
Additional info:
1) Downgrade to the last version of Fedora 27, quota-rpc- 4.03-9. fc27.x86_ 64
makes everything okay again.
dnf -y downgrade quota-rpc --releasever=27
2) strace on the daemon spits out endless repeats of:
poll([{fd=4, events= POLLIN| POLLPRI| POLLRDNORM| POLLRDBAND} , {fd=5, POLLIN| POLLPRI| POLLRDNORM| POLLRDBAND} , {fd=6, POLLIN| POLLPRI| POLLRDNORM| POLLRDBAND} , {fd=7, POLLIN| POLLPRI| POLLRDNORM| POLLRDBAND} ], 4, -1) = 2 ([{fd=5,
events=
events=
events=
revents=POLLHUP}, {fd=7, revents=POLLHUP}])
accept(5, 0x7ffe61698700, [128]) = -1 EINVAL (Invalid argument)
accept(7, 0x7ffe61698700, [128]) = -1 EINVAL (Invalid argument)