[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt hangs for ever

Andreas Fester wrote:
> I tried to track it down; I could reproduce it with non-stripped apt-binaries from
> a re-compiled apt source package. pstree showed the following processes while
> apt-get was hanging:
> apt-get(5027)???bzip2(5049)
>               ??gpgv(5032)
>               ??gzip(5038)
>               ??http(5029)
>               ??http(5030)

I'm also seeing this, I've been seeing it starting approximatly 2 weeks ago
(well before the new apt key) on several machines (i386, arm) with several
mirrors, including mirrors.kernel.org and ftp.nl.debian.org.

> apt-get was blocked in a select() called from apt-get.cc:1354
> 1353   // Run it
> 1354   if (Fetcher.Run() == pkgAcquire::Failed)   // <<==
> 1355      return false;

Hmm, when I straced apt-get, it was in a loop looking for a file:

select(8, [5 6 7], [], NULL, {0, 500000}) = 0 (Timeout)
0xafe9b960) = -1 ENOENT (No such file or directory)
gettimeofday({1164688481, 613704}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(1, "\r99% [3 Packages bzip2 0]", 25) = 25

I've also seen this on some of the machines. Running apt again clears
this up:

Get: 9 http://mirrors.kernel.org testing/main Packages [4249kB]
Get: 10 http://mirrors.kernel.org testing/main Packages [4249kB]              
50% [9 Packages bzip2 0] [10 Packages 22499/4249kB 0%]              512kB/s 8s
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.

Err http://mirrors.kernel.org testing/main Packages                           
  Sub-process bzip2 returned an error code (2)

> Then, strangely, while still debugging, apt-get update suddenly
> worked again (even without updating the apt key), so I was not able to
> further examine it ... Maybe the above observations help when it happens
> again :)

Ditto, after I run it 4-5 times it completes.

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: