apt-get hangs with "Waiting for headers" for exactly two minutes on dl.google.com apt line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
APT |
Unknown
|
Unknown
|
|||
apt (Ubuntu) |
Incomplete
|
Low
|
daniele |
Bug Description
Binary package hint: apt
I installed google chrome in karmic and later lucid. Google chrome adds the following apt line to update itself:
deb http://
When running apt-get update with this line installed it will hang for exactly two minutes saying "Waiting for headers". I've ran a wireshark dump of the connection and it seems to be stopping right after receiving Release.gpg. After some kind of timeout is reached it seems to close the connection and then download everything else and finish without problems.
Attached is the wireshark log of all this. Seems to be some kind of bug in how apt's http code handles the google server. Both wget and curl fetch the file without problems. Why does apt even need its own implementation of an HTTP client?
Related branches
Changed in apt (Ubuntu): | |
status: | New → Confirmed |
Changed in apt (Ubuntu): | |
assignee: | nobody → daniele (dacelli) |
For some reason there is no apt-dbg package so I compiled a new apt package with unstripped binaries. gdb gives me this backtrace of the http method when the connection is hung:
0 0x00007f20dfbe5c53 in select () from /lib/libc.so.6 f4ab0, :RunHeaders (this=0x2080aa0) f4ab0)
#1 0x0000000000404b14 in HttpMethod::Go (this=0x7fff544
ToFile=<value optimized out>, Srv=0x2080aa0) at http.cc:789
#2 0x00000000004060e0 in ServerState:
at http.cc:396
#3 0x0000000000407ecc in HttpMethod::Loop (this=0x7fff544
at http.cc:1151
#4 0x0000000000409fcb in main () at http_main.cc:19
I haven't spent too much time looking at the code but one thing that came to mind was that the file was 189 bytes only so that maybe when it gets to the select it is waiting for extra data after the whole file has already been transmitted and it somehow has missed that.