apt's lists/partial fills disk
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | APT |
New
|
Undecided
|
Unassigned | |
| | apt (Ubuntu) |
High
|
Michael Vogt | ||
| | Vivid |
High
|
Michael Vogt | ||
Bug Description
Test case:
- there is a artificial test in test/integration now
- as this is server side dependent a regression test should be enough
Since I upgraded to vivid, apt fills the disk space at /var/lib/
I tried inspecting the file to see if there is a repetition of data, and there seems to be, as I have suspected.
First of all, the file is it.archive.
I used `tail` and `hexdump` to figure out whether a certain pattern shows up in the file. Here are some examples:
$ tail -c 200000 it.archive.
0000c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0010c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0020c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0030c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
$ tail -c 200000 it.archive.
0000c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0010c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0020c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
0030c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
$ tail -c 200000 it.archive.
0002630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
0012630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
0022630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
$ tail -c 200000 it.archive.
000fa90 747d 76a8 078a 67b6 60d9 83f5 5ff3 787c
001fa90 747d 76a8 078a 67b6 60d9 83f5 5ff3 787c
002fa90 747d 76a8 078a 67b6 60d9 83f5 5ff3 787c
As you can see, it seems that after the error, a certain pattern seems to repeat every exactly 0x10000 bytes. I attached a copy of those 0x10000 bytes that keep repeating (from an arbitrary offset).
---
$ lsb_release -rd
Description: Ubuntu Vivid Vervet (development branch)
Release: 15.04
$ apt-cache policy apt
apt:
Installed: 1.0.9.7ubuntu4
Candidate: 1.0.9.7ubuntu4
Version table:
*** 1.0.9.7ubuntu4 0
500 http://
100 /var/lib/
---
Do let me know if I can test further to see what could be wrong. I'll keep an eye next times the behavior repeat to make sure the file is the same / the pattern is the same and I'll report back. If you think the problem could be the Italy server, let me know and I'll try with a different one.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: apt 1.0.9.7ubuntu4
ProcVersionSign
Uname: Linux 3.19.0-13-generic x86_64
NonfreeKernelMo
ApportVersion: 2.17-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Apr 17 00:04:05 2015
SourcePackage: apt
UpgradeStatus: Upgraded to vivid on 2015-03-28 (19 days ago)
| Shahbaz Youssefi (shabbyx) wrote : | #1 |
| Shahbaz Youssefi (shabbyx) wrote : | #2 |
| Shahbaz Youssefi (shabbyx) wrote : | #3 |
I changed the server to US and the problem doesn't seem to occur any more. Perhaps this is an issue with the Italy server, but nevertheless it is strange that apt would continuously write to the disk due to an error on the server.
| Launchpad Janitor (janitor) wrote : | #4 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in apt (Ubuntu): | |
| status: | New → Confirmed |
| Cimdrap (giosaci) wrote : | #5 |
i was on italian server too with same issue. Just migrated to principal server.....let's see what happens
Please:
1. Report to <https:/
2. Paste the new report URL here.
3. Set this bug status back to "confirmed".
Thank you.
| Changed in apt (Ubuntu): | |
| importance: | Undecided → Critical |
| status: | Confirmed → Incomplete |
| tags: | added: asked-to-upstream |
| Changed in apt (Ubuntu): | |
| importance: | Critical → High |
| Changed in apt (Ubuntu): | |
| status: | Incomplete → Confirmed |
| Brian Murray (brian-murray) wrote : | #7 |
I've been unable to recreate this on a Vivid amd64 chroot after adding i386 as an architecture.
| Brian Murray (brian-murray) wrote : | #8 |
What IP address are you connecting to? There may be multiple servers for it.archive.
| Changed in apt (Ubuntu): | |
| status: | Confirmed → Incomplete |
| Matteo Croce (teknoraver) wrote : | #9 |
same here:
$ ll /var/lib/
-rw-r--r-- 1 root root 95G apr 25 14:37 /var/lib/
| Andreas Brudin (andreas-brudin) wrote : | #10 |
I have the same problems, using the Swedish update servers. I booted my computer and leaved it for lunch, and when I came back the CPU was running at 100% (http by apt). I kept it running for a while, and then I starting investigating this issue. I checked my /var/lib/
| Brian Murray (brian-murray) wrote : | #11 |
For people experiencing this bug it'd be useful to know specifically what mirror (domain name) they are connecting to and which IP address for that domain name.
| Anton Blanchard (anton-samba) wrote : | #12 |
I've seen this a few times. It appears to be an issue with recovering partially downloaded files, and my workaround was to rm /var/lib/
Looking through some notes from a few weeks ago, the backtrace was:
(gdb) backtrace
#0 0x00003fffb5b5d6ec in SHA1Transform (state=
buffer=
at /build/
#1 0x00003fffb5b5ec9c in SHA1Summation::Add (this=0x3fffecb
data=
at /build/
#2 0x00003fffb5c7a6e0 in Add (Size=65536,
Data=
at ../build/
#3 CircleBuf::Write (this=0x3fffecb
at /build/
#4 0x00003fffb5c7b518 in HttpServerState::Go (this=0x3fffecb
0x3fffecb81980, ToFile=true)
at /build/
We were stuck in the circular buffer code, the input and output pointers got out of whack such that we would write the same buffer continually.
| diverbelow (groovygravy10-gmail) wrote : | #13 |
I also experiencing this issue 15.04 64 bit even with picking one mirror. Until this bug has been fixed, I had to setup an hourly cron job, to remove everything in partial directory.
| Changed in apt (Ubuntu Vivid): | |
| status: | Incomplete → Confirmed |
| bart (bart-wp) wrote : | #14 |
I'm randomly experiencing this problem using the German servers for 15.04. It does not affect a specific package, each time this happens some package keeps on growing until the disk is full.
| tags: | added: rls-w-incoming |
| Alex Kretzschmar (alexktz) wrote : | #15 |
I can make this issue come and go by disabling the gnome3.16 PPAs.
| Alex Kretzschmar (alexktz) wrote : | #16 |
Specifically this occurs when a 404 for a particularly repo (i.e. vivid not available in a PPA). Then a second apt-get update causes the /partial dir to fill up until my root is full.
| Anton Blanchard (anton-samba) wrote : | #17 |
I took another look at this. The problem begins in ServerState:
Content-Range: bytes 587-600/601
So we set StartPos to 587. Then in HttpServerState
In.Limit(Size - StartPos);
where Size is 14. We pass a negative number into Limit() which means MaxGet is set to something less than OutP, and we loop forever.
| Anton Blanchard (anton-samba) wrote : | #18 |
I think I see the issue. We parse both Content-Length: and Content-Range: headers.
When parsing the Content-Range: header, we set Size to the total size of the file.
If the Content-Length header comes last, we reset Size to the size of the data we are receiving, not the total size of the file.
The attached patch fixes it for me, although we do get the infamous Hash sum mismatch which clears after rerunning apt-get:
Failed to fetch http://
Another issue, but I'd love to fix that one day.
| Adam Conrad (adconrad) wrote : | #19 |
Michael, can you have a look at this one?
| Changed in apt (Ubuntu): | |
| assignee: | nobody → Michael Vogt (mvo) |
| Changed in apt (Ubuntu Vivid): | |
| assignee: | nobody → Michael Vogt (mvo) |
i already get rid of this issue. i tried many things including auto remove
apt.....now this /var/lib/
make some update, but after update the new files are removed by itself. I
dont know which app is doing this activity.. Please make a query to an
expert.
On Wed, May 13, 2015 at 3:21 AM, Anton Blanchard <email address hidden> wrote:
> I took another look at this. The problem begins in
> ServerState:
>
> Content-Range: bytes 587-600/601
>
> So we set StartPos to 587. Then in HttpServerState
>
> In.Limit(Size - StartPos);
>
> where Size is 14. We pass a negative number into Limit() which means
> MaxGet is set to something less than OutP, and we loop forever.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1448684).
> https:/
>
> Title:
> apt's lists/partial fills disk
>
> Status in APT:
> New
> Status in apt package in Ubuntu:
> Confirmed
> Status in apt source package in Vivid:
> Confirmed
>
> Bug description:
> Since I upgraded to vivid, apt fills the disk space at
> /var/lib/
> every day, and as a solution I killed the processes named `http`
> spawned by apt, and removed the offending file from lists/partial
> manually. Until now, `apt-get update` and `apt-get upgrade` had been
> working. However, today, when I tried `apt-get update`, it got stuck
> in some file, continuously increasing its size when at 100%.
>
> I tried inspecting the file to see if there is a repetition of data,
> and there seems to be, as I have suspected.
>
> First of all, the file is it.archive.ubuntu
> .com_ubuntu_
> I'm not sure if the previous time it was also this file.
>
> I used `tail` and `hexdump` to figure out whether a certain pattern
> shows up in the file. Here are some examples:
>
> $ tail -c 200000
> it.archive.
> hexdump | grep '\<bbdf\>'
> 0000c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0010c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0020c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0030c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
>
> $ tail -c 200000
> it.archive.
> hexdump | grep '\<9b95\>'
> 0000c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0010c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0020c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
> 0030c80 8d9e 63ad bbdf 40a7 3f3e 2b4a 9b95 aa5a
>
> $ tail -c 200000
> it.archive.
> hexdump | grep '\<1234\>'
> 0002630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
> 0012630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
> 0022630 fd50 b08d 7082 1234 85b3 a61e 2921 e0cd
>
> $ tail -c 200000
> it.archive.
> hexdump | grep '\<76a8\>'
> 000fa90 747d 76a8 078a 67b6 60d9 83f5 5ff3 787c
> 001fa90 747d 76a8 078a 6...
The attachment "Don't parse Content-Length if Content-Range has been parsed" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
| tags: | added: patch |
| Alex Kretzschmar (alexktz) wrote : | #22 |
Issue occurred again for me today when I interrupted apt-get update and then reran a few minutes later.
| Changed in apt (Ubuntu): | |
| status: | Confirmed → In Progress |
| Michael Vogt (mvo) wrote : | #23 |
This is fixed in git now and I will prepare a wily and vivid-proposed upload.
| Michael Vogt (mvo) wrote : | #24 |
Thanks a lot to Anton for the patch and the excellent analysis of the issue!
| Launchpad Janitor (janitor) wrote : | #25 |
This bug was fixed in the package apt - 1.0.9.10ubuntu1
---------------
apt (1.0.9.10ubuntu1) wily; urgency=low
* merged from debian/sid
apt (1.0.9.10) unstable; urgency=medium
[ Michael Vogt ]
* Fix crash in pkgDPkgPM:
* Move sysconf(
syscalls
* Fix endless loop in apt-get update that can cause disk fillup
(LP: #1445239)
[ Helmut Grohne ]
* parse arch-qualified Provides correctly (Closes: 777071)
-- Michael Vogt <email address hidden> Fri, 22 May 2015 18:08:10 +0200
| Changed in apt (Ubuntu): | |
| status: | In Progress → Fix Released |
| Kyle Beauchamp (kyleabeauchamp) wrote : | #26 |
I have a fully updated 15.04 machine and I'm still having issues with apt cache eating up my disk. I get into a situation where `http` is my most active process and my apt partial cache is growing quickly. See the logs below, which show the top processes, the large file sizes in the partial cache, and the file size growth in the partial cache. When the disk fills completely, the system is then no longer able to boot into unity and I am required to manually delete files with a command line login. ..
top:
2581 root 20 0 40260 5012 4660 R 97.0 0.0 11:04.46 http
2582 root 20 0 40260 4992 4636 R 97.0 0.0 10:40.69 http
:~$ ls /var/lib/
total 93832500
-rw-r--r-- 1 root root 49198669906 May 29 10:41 security.
-rw-r--r-- 1 root root 46855568434 May 29 10:41 us.archive.
-rw-r--r-- 1 root root 7017495 Apr 24 14:45 us.archive.
-rw-r--r-- 1 root root 6486447 Apr 24 14:40 us.archive.
:~$ ls /var/lib/
total 94526900
-rw-r--r-- 1 root root 49566396416 May 29 10:41 security.
-rw-r--r-- 1 root root 47198911538 May 29 10:41 us.archive.
-rw-r--r-- 1 root root 7017495 Apr 24 14:45 us.archive.
-rw-r--r-- 1 root root 6486447 Apr 24 14:40 us.archive.
| Brian Murray (brian-murray) wrote : | #27 |
This has only been fixed in the development release of Ubuntu, Wily Werewolf, and we are awaiting a fix from the developer for Vivid (Ubuntu 15.04).
| description: | updated |
| Changed in apt (Ubuntu Vivid): | |
| status: | Confirmed → In Progress |
| Michael Vogt (mvo) wrote : | #28 |
This is uploaded as a SRU and in https:/
Hello Shahbaz, or anyone else affected,
Accepted apt into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in apt (Ubuntu Vivid): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| Shahbaz Youssefi (shabbyx) wrote : | #30 |
Hi Brian,
Sorry for my lack of responsiveness, but I'd essentially been moving countries and I'm no longer in Italy to begin with. On another computer where I'm typing this response, this issue doesn't happen to begin with (Canada servers). Hopefully others would be able to test this out.
| Alexander List (alexlist) wrote : | #31 |
Brian,
I've run across the same problem and have installed your package from -proposed.
I will let you know after 2-3d if the problem resurfaces. If you don't hear from me by the end of the week, consider the problem fixed for me.
| Alexander List (alexlist) wrote : | #32 |
Brian,
I was using sg.archive.u.c
| Xavi Ivars (xavi-ivars) wrote : | #33 |
It's still affecting me. I'm using the CICA server (in Spain)
| Brian Murray (brian-murray) wrote : | #34 |
@Xavi could you test the proposed package as suggested in comment #29?
| Josh Holtrop (jholtrop) wrote : | #35 |
I had been observing a disk full a few times due to this issue, including this morning, after which I found this report. I just installed apt 1.0.9.7ubuntu4.1 from vivid-proposed using "apt-get install apt/vivid-
I now have:
$ apt-cache policy apt
apt:
Installed: 1.0.9.7ubuntu4.1
Candidate: 1.0.9.7ubuntu4.1
Version table:
*** 1.0.9.7ubuntu4.1 0
400 http://
100 /var/lib/
1.0.9.7ubuntu4 0
500 http://
I ran "apt-get update" manually several times and did not see the disk-filling-up problem again. I will continue to keep my eye on it.
| Adam Conrad (adconrad) wrote : | #36 |
Marking verification-done based on comments 31 and 35.
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #37 |
This bug was fixed in the package apt - 1.0.9.7ubuntu4.1
---------------
apt (1.0.9.7ubuntu4.1) vivid-proposed; urgency=low
* test/integratio
- disable as its too unreliable
* Fix endless loop in apt-get update that can cause disk fillup
LP: #1445239
-- Michael Vogt <email address hidden> Wed, 10 Jun 2015 16:09:44 +0200
| Changed in apt (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |
| Adam Conrad (adconrad) wrote : Update Released | #38 |
The verification of the Stable Release Update for apt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.


This is the next day, and this time the offending file is: it.archive. ubuntu. com_ubuntu_ dists_vivid_ restricted_ binary- amd64_Packages. bz2
The repeating data is still 0x10000 bytes, but the contents are different (another copy attached).