Bug 197147 - net-proxy/squid-3.0_rc1 fails to resume downloads
Bug#: 197147 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: net-proxy@gentoo.org Reported By: fedux@lugmen.org.ar
Component: Applications
URL: 
Summary: net-proxy/squid-3.0_rc1 fails to resume downloads
Keywords:  
Status Whiteboard: 
Opened: 2007-10-26 15:03 0000
Description:   Opened: 2007-10-26 15:03 0000
Squid succesfully downloads a complete file, but if the download is stopped and
then resumed it fails to continue. I tested it with different webclients (wget,
curl). Also the resuming works if I don't use proxy.

Reproducible: Always

Steps to Reproduce:
1. wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
--12:02:17--  http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
           => `linux-2.6.23.1.tar.bz2.2'
Resolving genfw.integratech.net... 192.168.1.1
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 45,477,128 (43M) [application/x-bzip2]

 1% [>                                                                         
                       ] 478,567       95.74K/s    ETA 08:22

2. wget -c http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
--12:02:44--  http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
           => `linux-2.6.23.1.tar.bz2'
Resolving genfw.integratech.net... 192.168.1.1
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 45,477,128 (43M), 44,808,761 (43M) remaining [application/x-bzip2]

 1% [+                                                                         
                       ] 668,367       --.--K/s

12:02:44 (0.00 B/s) - Connection closed at byte 668367. Retrying.

--12:02:45--  http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
  (try: 2) => `linux-2.6.23.1.tar.bz2'
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 45,477,128 (43M), 44,808,761 (43M) remaining [application/x-bzip2]

 1% [+                                                                         
                       ] 668,367       --.--K/s

12:02:45 (0.00 B/s) - Connection closed at byte 668367. Retrying.

--12:02:47--  http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.1.tar.bz2
  (try: 3) => `linux-2.6.23.1.tar.bz2'
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 45,477,128 (43M), 44,808,761 (43M) remaining [application/x-bzip2]

 1% [+                                                                         
                       ] 668,367       --.--K/s

12:02:48 (0.00 B/s) - Connection closed at byte 668367. Retrying.

------- Comment #1 From Jakub Moc (RETIRED) 2007-10-26 18:23:07 0000 -------
Set yourself GENTOO_MIRRORS in make.conf; we don't have any control over
upstream mirrors.

------- Comment #2 From Federico Cuello 2007-10-26 19:37:35 0000 -------
(In reply to comment #1)
> Set yourself GENTOO_MIRRORS in make.conf; we don't have any control over
> upstream mirrors.
> 

It was just an example, squid can't resume any file. Here's another example:

1. wget
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
--16:33:20-- 
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
           => `xorg-server-1.4.tar.gz'
Resolving genfw.integratech.net... 192.168.1.1
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 8,189,388 (7.8M) [application/x-gzip]

 2% [=>                                                                        
                       ] 189,405       59.56K/s    ETA 02:11

2. Then I cancelled the download (ctrl-c)

3. Trying to resume:
wget -c
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
--16:33:27-- 
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
           => `xorg-server-1.4.tar.gz'
Resolving genfw.integratech.net... 192.168.1.1
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 8,189,388 (7.8M), 7,983,923 (7.6M) remaining [application/x-gzip]

 2% [++                                                                        
                       ] 205,465       --.--K/s

16:33:28 (0.00 B/s) - Connection closed at byte 205465. Retrying.

--16:33:29-- 
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
  (try: 2) => `xorg-server-1.4.tar.gz'
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 8,189,388 (7.8M), 7,983,923 (7.6M) remaining [application/x-gzip]

 2% [++                                                                        
                       ] 205,465       --.--K/s

16:33:29 (0.00 B/s) - Connection closed at byte 205465. Retrying.

--16:33:31-- 
http://xorg.freedesktop.org/archive/X11R7.3/src/xserver/xorg-server-1.4.tar.gz
  (try: 3) => `xorg-server-1.4.tar.gz'
Connecting to genfw.integratech.net|192.168.1.1|:3128... connected.
Proxy request sent, awaiting response... 206 Partial Content
Length: 8,189,388 (7.8M), 7,983,923 (7.6M) remaining [application/x-gzip]

 2% [++                                                                        
                       ] 205,465       --.--K/s

16:33:32 (0.00 B/s) - Connection closed at byte 205465. Retrying.

I sniffed the connection and squid is sending a FIN packet after receiving some
data.

------- Comment #3 From Jakub Moc (RETIRED) 2007-10-26 19:41:36 0000 -------
Duh... I completely misread this bug. I thought that you can't resume a
download of squid tarball.

------- Comment #4 From Alin Năstac 2007-10-28 21:38:49 0000 -------
Bug confirmed. Please signal this bug upstream - see 
http://www.squid-cache.org/bugs/enter_bug.cgi .

------- Comment #5 From Federico Cuello 2007-10-30 14:54:24 0000 -------
Reported upstream, see:

http://www.squid-cache.org/bugs/show_bug.cgi?id=2116

------- Comment #6 From Renato Caldas 2007-12-07 13:57:49 0000 -------
Solved upstream. And squid-3.0 is out..

------- Comment #7 From Renato Caldas 2007-12-07 13:59:26 0000 -------
(In reply to comment #6)
> Solved upstream. And squid-3.0 is out..
> 

Oh never mind, the "squid-3.0" is actually the rc1.. Only worth marking as
solved when rc2 comes out.

------- Comment #8 From Alin Năstac 2007-12-20 10:13:50 0000 -------
Fixed in squid-3.0.1.