Bug 712585

Summary: python package urllib2 fails to fetch page, instead it times out.
Product: [Fedora] Fedora Reporter: Sreenidhi Nair <sreenidimn>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dmalcolm, ivazqueznet, jonathansteffan, sreenidimn
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-13 19:55:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
output after the script times out
none
a testcase which generates error none

Description Sreenidhi Nair 2011-06-11 11:34:14 UTC
Created attachment 504243 [details]
output after the script times out

Description of problem:

When a webpage is fetched by urllib2 , it hangs for a long time. On stopping the script it shows

Version-Release number of selected component (if applicable):

Python version 2.7.1
2.6.38.7-30.fc15.i686.debug

How reproducible:
A simple script using urllib2 will show the error

Steps to Reproduce:
1. Run the script <attached>
2. 
3.
  
Actual results:
The page is fetched

Expected results:
The page should be fetched

Additional info:
The package works well in f13 [dont know if this is useful]

Comment 1 Sreenidhi Nair 2011-06-11 11:35:24 UTC
Created attachment 504244 [details]
a testcase which generates error

Comment 2 Sreenidhi Nair 2011-06-11 11:40:17 UTC
(In reply to comment #0)
> 
> Actual results:
> The page is fetched

Sorry, it should have been ' The page is not fetched '

Comment 3 Dave Malcolm 2011-06-13 19:55:30 UTC
The test case works for me (with python-2.7.1-5.fc15.x86_64), and fetches the page.

F13 had Python 2.6; F14 onwards has 2.7, so perhaps you might be seeing a difference there.

However, I would expect that network delays could cause timeouts to happen with either version; it may just have been luck that led it to work before.

Note that the opener.open() method takes an optional "timeout" argument, which defaults to socket._GLOBAL_DEFAULT_TIMEOUT   You may need to tweak this, or to catch timeouts and retry, perhaps.

Hope this is helpful; closing this out as "NOTABUG".

Comment 4 Sreenidhi Nair 2011-06-13 21:35:01 UTC
(In reply to comment #3)

> However, I would expect that network delays could cause timeouts to happen with
> either version; it may just have been luck that led it to work before.

I'm pretty sure its not network delays - the script attached works very well with f13. Also, I think I've found a similar bug as that of mine

https://bugzilla.redhat.com/show_bug.cgi?id=650341

That one is with f14 though - but similar issue.
Can't find any other similar bugs though - so I could still be wrong.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers