Bug 446715

Summary: select always reports sctp sockets available for writing
Product: Red Hat Enterprise Linux 5 Reporter: Steven Friedman <sfriedman>
Component: lksctp-toolsAssignee: Zdenek Prikryl <zprikryl>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-21 09:25:29 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:

Description Steven Friedman 2008-05-15 18:46:02 UTC
Description of problem:
Two programs.  One a simple client selecting on a file descriptor for writing,
and the other a simple server that accepts new connections but never reads the
socket.  When the socket opened as socket(AF_INET, SOCK_STREAM, IPPROTO_TCP),
the select in the client correctly shows the socket unavailable for writing once
the write window is full.  However, when the socket is opened as socket(
AF_INET, SOCK_STREAM, IPPROTO_SCTP), then the select always reports that the
socket is available for writing.  (This occurs regardless of whether the socket
was blocking or non-blocking.)

Version-Release number of selected component (if applicable):
lksctp-tools-1.0.6-1.el5.1


How reproducible:
Every time.

Steps to Reproduce:
1. Open server stream, sctp socket and accept new connections, but never read
from the connection.
2. Open client, stream, sctp socket (either blocking or non-blocking) and do
select on write of fd, then write if able.
3. select will always report socket as writable.
  
Actual results:
Select will always report socket as writable (with sctp), works with tcp.

Expected results:
When the send window is closed, the socket is not writable and the file
descriptor should not be included in the writable fd_set.

Additional info:

Comment 1 Zdenek Prikryl 2008-05-16 13:05:28 UTC
Hello,
do you have a source code for a simple client and server which you described
above? If so, please add this source code here as an attachment. Otherwise I
will write small applications by myself.

Thanks.

Comment 2 Steven Friedman 2008-05-16 16:14:32 UTC
Grr.  I can't get the stupid thing to fail now.  When I can figure out how to
reproduce it again, I'll follow up.

Comment 3 Zdenek Prikryl 2008-08-21 09:25:29 UTC
I'm closing this bug, because neither I nor reporter can reproduce it.

Comment 4 Steven Friedman 2008-08-22 20:27:52 UTC
We've migrated from lksctp 1.0.6 (part of RHEL5) to lksctp 1.0.9 (from sf.net) and a number of other problems that we've had w/ sctp have been resolved.