apt-get leaking memory and filling disk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
We have a few ppc64el machines in our lab running Ubuntu 15.04 and the daily apt-get cronjob that runs will intermittently use all of its memory and fill its disk.
Looking at the disk, it appears that the sources and packages files it's downloading are unreasonably huge.
$ ls -l /var/lib/
...
-rw-r--r-- 1 root root 480265872092 Jul 28 06:15 archive.
-rw-r--r-- 1 root root 462813724672 Jul 28 03:04 ports.ubuntu.
...
All of the other files look normal, maybe a few megabytes at most (as you would expect from apt) but these two are almost half a terabyte in size apiece which is clearly wrong and may only be limited by our disk space (it's got a 1TB disk).
It appears that /usr/lib/
$ ps aux | grep apt
root 1675 0.0 0.0 3136 1536 ? S 06:25 0:00 /bin/sh /etc/cron.daily/apt
root 1749 0.0 0.0 12864 4544 ? S 06:28 0:00 apt-get -qq -y update
root 1752 79.9 0.0 12032 3840 ? R 06:28 102:30 /usr/lib/
root 1753 77.7 0.0 12032 3840 ? R 06:28 99:39 /usr/lib/
root 1755 0.0 0.0 11328 3136 ? S 06:28 0:00 /usr/lib/
root 1763 0.0 0.0 14912 6848 ? S 06:28 0:05 /usr/lib/
root 1766 0.0 0.0 11328 3072 ? S 06:28 0:00 /usr/lib/
The system has almost all of its 32G of RAM filled as well, looking at the rest of the ps output it doesn't look like the used memory is actually attached to a process, but it's in the cache, so I assume it's just a side effect of trying to work with the gigantic files.
$ free -m
total used free shared buffers cached
Mem: 32482 30571 1911 19 90 28860
-/+ buffers/cache: 1620 30861
Swap: 38607 0 38607
We haven't seen any similar trouble with 14.04 or 14.10.
Here's the version information
$ lsb_release -rd
Description: Ubuntu 15.04
Release: 15.04
$ apt-get -v
apt 1.0.9.7ubuntu4 for ppc64el compiled on Apr 7 2015 14:44:13
Supported modules:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
Pkg: Debian APT solver interface (Priority -1000)
S.L: 'deb' Standard Debian binary tree
S.L: 'deb-src' Standard Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian Translation Index
Idx: Debian dpkg status file
Idx: EDSP scenario file