Bugs: Browse | Submit New | Admin

[#20088] select with too many sockets ignores some.

Date:
2008-05-12 07:04
Priority:
3
Submitted By:
Roger Pack (rogerdpack)
Assigned To:
Akinori MUSHA (knu)
Category:
Network / Comm / Protocols
State:
Open
Platform:
 
Summary:
select with too many sockets ignores some.

Detailed description
I haven't tested this, but I believe that if you have > 64 threads blocking on select with Ruby on windows, it allows
this, though select itself only honors the first 64 sockets in the fd_set.
Also in Linux if you pass select a file descriptor with a number > FD_SETSIZE it is ignored when passed into select.
I'd move that if users call select with 'too many sockets' [whether all together or not] that it throw them an exception
explaining such.  This would bring sanity to the multi-threaded socket world.
More info available upon request.
Thanks!
-R

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-09-27 15:16
Sender: Roger Pack

There may also be a problem where if a socket "goes bad"
and
starts breaking select, Ruby loops [in Python, this is
handled in that if select fails, it raises an error and
relies on the script writer to loop through each socket and
find the offending one].
See http://www.ruby-forum.com/topic/163996#new
Date: 2008-06-02 13:23
Sender: Roger Pack

probably work-aroundable by using the rev library

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item