High CPU usage on broken request to apt-cacher-ng
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt-cacher-ng (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Chris J Arges |
Bug Description
I manage a server with apt-cacher-ng, I noted an CPU increase to 100% usage without any aparent reason, it sometimes even freezes so I have to restart the service every time this happen, but sometimes this was about twice a day...
I decided to debug it to see what was happening so I follow the steps in http://
The next day I ended with a 2.8GB apt-cacher.err and a infinite loop of:
- target: ooo vs archive.ubuntu.com, ports: 80 vs 80, good config: 0 [<email address hidden>
- >> dlcon::
- << dlcon::
Some time ago the desktops computers where configured using the following source line:
deb http://
/ooo was an alias to a ppa, the alias was removed from the server, and all the new desktops where configured using Acquire::http { Proxy "http://
but some of the older machines keep the old format...
I attach a fragment of the log where it start the infinite loop, note the time... it's an 8 seconds fragment log with 130500+ lines.
I have tracked the computer that was sending the request and change the source.list, but this should be fixed in apt-cacher-ng, and handle the request a little more graceful.
--
SRU Justification:
[Impact]
* Users of apt-cacher-ng may see CPU usage of 100% due to a infinite loop in the code.
* The fix for this package is already present in quantal and beyond, and the author has provided the patch on this bug.
[Test Case]
Use apt-cacher-ng and occasionally one may hit this infinite loop error depending on the source.list configuration.
[Regression Potential]
* Small change, present in quantal/raring and upstream.
Changed in apt-cacher-ng (Ubuntu): | |
importance: | Undecided → High |
status: | New → In Progress |
Changed in apt-cacher-ng (Ubuntu Precise): | |
assignee: | nobody → Chris J Arges (arges) |
importance: | Undecided → High |
status: | New → In Progress |
tags: |
added: verification-done removed: verification-needed |
The attached patch should prevent your daemon from looping. Why it actually happened in first place is hard to tell, but with this change the error message should be returned to client ASAP and you can check again.