Bug 99093

Summary: Cannot set undef timeout in perl 5.8.0 IO::Socket
Product: [Retired] Red Hat Linux Reporter: Hrunting Johnson <hrunting>
Component: perlAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: FC5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-07 20:21:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 175135    

Description Hrunting Johnson 2003-07-14 13:45:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b)
Gecko/20030516 Mozilla Firebird/0.6

Description of problem:
In perl 5.8.0, the IO::Socket implementation is broken such that you cannot set
an undefined timeout to create a blocking socket.  This was broken in an attempt
to allow a 0 second timeout.  Now, if you set an undefined timeout, it sets a 0
second timeout, which means calls to accept() return immediately (in essence, a
non-blocking socket).  The fix is easy.  At http://bugs.perl.org/, bug ID 22965
has the very simple patch to allow both 0-second timeouts and undefined timeouts
to coexist.

I consider this a major bug.  Not being able to turn sockets into blocking
sockets breaks a lot of perl code.

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

How reproducible:
Always

Steps to Reproduce:
1. $sock = IO::Socket->new(..., 'Timeout' => 5);
2. $sock->timeout(undef);
3. $sock->accept();
    

Actual Results:  accept() call returns immediately, even if there is nothing to
accept.

Expected Results:  accept() call returns when there is something to accept, and
not before.

Additional info:

bugs.perl.org, #22965

Comment 1 Chip Turner 2003-07-21 20:03:45 UTC
this is purely an upstream bug; we will incorporate any fix they make but it
needs to come from upstream

Comment 2 Hrunting Johnson 2003-07-29 15:20:05 UTC
bugs.perl.org RT #22965
perl patch #20193

Comment 3 Jason Vas Dias 2005-11-12 00:29:52 UTC
Sorry for the long delay in process this bug.
Upstream perl patch #20193 has been applied to the next RHEL-3 perl version,
perl-5.8.0-90.2, in which this bug should be fixed .

Comment 5 Bill Nottingham 2006-08-07 20:21:23 UTC
This should be fixed in current Fedora and RHEL releases.