apt-cacher-ng using all available CPU if a package is broken

Bug #313165 reported by Юрий Чудновский
2
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apt-cacher-ng

I noticed, apt-cacher-ng every day grabs all CPU resources and don't release it in many hours, untill I have to command /etc/init.d/apt-cacher-ng restart. Since a problem was appearing in same time every day, I looked up crontab, and find an expiration task launch via perl script. I make the same via browser, and find a problem: after "Parsing metadata in /var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/intrepid-security/partner/binary-i386/Packages.bz2" output stops.
The problem was clear, then I look at file size, and try to unpack it myself:

ls -l /var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/i
ntrepid-security/partner/binary-i386/Packages.bz2
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 983 2008-12-16 21:09 /var/cache/apt-cacher-ng/securit
y.ubuntu.com/ubuntu/dists/intrepid-security/partner/binary-i386/Packages.bz2

tar -vxjf /var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/intrepid-security/partner/binary-i386/Packages.bz2

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted? *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2

So, I have to manually delete this file to "repair" apt-cacher-ng CPU usage. The problem was gone

Ubuntu 8.10
apt-cacher-ng version 0.2.1-1

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Similar issue was reported to me by another user with many mirrors in his configuration. I guess this is one of the glitches that were fixed in the downloader code overhaul and maintainenance task optimizations applied after 0.2.2.

Feel free to test the current version from Debian Unstable, but beware of potential problems with compatibility. See Rolf's comments in https://bugs.launchpad.net/ubuntu/+source/apt-cacher-ng/+bug/302693 for more details.

http://packages.debian.org/sid/apt-cacher-ng

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Frank, I believe the best advice I can give you is to install apt-cacher-ng 0.2.2 from my PPA. That version has been working flawlessly for me for a long time now.

https://launchpad.net/~r0lf/+archive

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Frank, what is your status here?

Changed in apt-cacher-ng:
status: New → Incomplete
Revision history for this message
Юрий Чудновский (fqc) wrote :

I have not updated apt-cacher-ng package version. My server now is under heavy disk/memory load, and I did not really matter now of apt-cacher-ng status. A few days later i'll give to You any future information. For now I can only tell - it's seems to work fine.

Revision history for this message
Юрий Чудновский (fqc) wrote :
Download full text (24.4 KiB)

Here is copypaste of maintenance log:

Previously detected: 35 rotten package file(s), to be deleted in about 0-1 day
Locating potentially expired files in the cache...
Redownloading index files...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/Release...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/main/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/main/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/restricted/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/restricted/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/Release.gpg...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/universe/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid-updates/universe/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/Release...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/main/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/main/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/main/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/restricted/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/restricted/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/restricted/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/Release.gpg...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/universe/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/universe/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/intrepid/universe/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/Release...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/main/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/main/binary-amd64/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/main/binary-i386/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/main/source/Sources.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/restricted/i18n/Translation-ru.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/restricted/binary-amd64/Packages.bz2...
Checking/Updating ua.archive.ubuntu.com/ubuntu/dists/hardy/restric...

Revision history for this message
Rolf Leggewie (r0lf) wrote :

thank you for reporting back. looks like the problem is gone, please reopen if it reoccurs.

closing as fix released since the version in Jaunty is unaffected.

Changed in apt-cacher-ng:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.