[issue11199] urllib hangs when closing connection

2012-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ce4868861ba by Senthil Kumaran in branch '2.7': Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 http://hg.python.org/cpython/rev/6ce4868861ba New changeset 891184abbf6e by Senthil Kumaran in branch '

[issue11199] urllib hangs when closing connection

2011-02-22 Thread rg3
rg3 added the comment: Charles-Francois Natali, Tuesday, February 22, 2011 20:57: > Attached are two new versions which don't wait for the end of > transfer. I tested the one for Python 2.7 applied to Python 2.6 and it appears to work perfectly. Thanks for the quick fix! -- _

[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: Attached are two new versions which don't wait for the end of transfer. -- Added file: http://bugs.python.org/file20848/urllib_ftp_close.diff ___ Python tracker _

[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Removed file: http://bugs.python.org/file20814/urllib_ftp_close.diff ___ Python tracker ___ ___ Python-bu

[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file20847/urllib_ftp_close_27.diff ___ Python tracker ___ ___ Python-b

[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Removed file: http://bugs.python.org/file20815/urllib_ftp_close_27.diff ___ Python tracker ___ ___ Python

[issue11199] urllib hangs when closing connection

2011-02-22 Thread rg3
rg3 added the comment: > > I have to correct myself. I applied the patch manually to my Python > > 2.6 installation. In Python 2.6, the line you moved is number 961, > > and I did the same change. > > OK. For information, you can apply it using the Unix "patch" command, > who can most of the ti

[issue11199] urllib hangs when closing connection

2011-02-21 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > rg3 added the comment: > > I have to correct myself. I applied the patch manually to my Python 2.6 > installation. In Python 2.6, the line you moved is number 961, and I did the > same change. OK. For information, you can apply it using the Unix "

[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3
rg3 added the comment: I have to correct myself. I applied the patch manually to my Python 2.6 installation. In Python 2.6, the line you moved is number 961, and I did the same change. With your change, the connection can be closed, but you have to wait for the file to be completely transfer

[issue11199] urllib hangs when closing connection

2011-02-21 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > I just tested the patch under Python 2.6. It doesn't seem to solve the > problem. Are you sure the patch applied cleanly ? I tested both on 3.2 and 2.7, and it fixed the problem for me. If not, could you submit a tcpdump capture ? --

[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3
rg3 added the comment: I just tested the patch under Python 2.6. It doesn't seem to solve the problem. -- ___ Python tracker ___ ___

[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3
rg3 added the comment: That makes sense and explains why the problem could not be reproduced over the loopback (the transfer would be too fast). I have not tested the patch, but I can reproduce the problem with a local connection if I compile pure-ftpd with the --with-throttling switch and li

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file20815/urllib_ftp_close_27.diff ___ Python tracker ___ ___ Python-b

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, orsenthil stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___ ___

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: The problem is due to the way urllib closes a FTP data transfer. The data channel is closed, and a shutdown hook is called that waits for a message on the control channel. But in that case, when the data connection is closed while the transfer is in p

[issue11199] urllib hangs when closing connection

2011-02-12 Thread rg3
New submission from rg3 : If you run the attached program, you can see the program hangs in the connection close stage. Uncommenting the sleep line makes the program work, so I suspect some kind of race condition. The URL used belongs to a Slackware Linux mirror. I have not been able to repro