Bug #721
closedselect in windows accepts too many fd's
Description
=begin
from http://redmine.ruby-lang.org/issues/show/670
the test files either hang or are uninterruptible, at least with 1.9 mingw SVN HEAD.
Note that you may need to
touch abc
before running the tests (once), and that sometimes they hang on accept, so you may need to do a ctrl+c to force it to progress.
Also on linux accept hangs when there are no available fd's--I'm not sure if that's expected or not.
With Linux and OS X and 1.9 the tests all work, besides that. Nice job.
Thanks!
-=R
=end
Updated by rogerdpack (Roger Pack) about 16 years ago
=begin
There are two problems here, one being that select doesn't select on all fd's you pass, the other being that an accept call with no remaining fd's available will hang forever [uninterruptibly], in windows only, not linux.
Here's an example:
require 'socket'
require 'tempfile'
s = TCPServer.new '0.0.0.0', 4000
c = TCPSocket.new '127.0.0.1', 4000
fds = []
begin
loop { fds << Tempfile.new('test')}
rescue Exception
end
puts "accepting"
s.accept # should raise
=end
Updated by usa (Usaku NAKAMURA) about 16 years ago
- Category set to core
- Assignee set to usa (Usaku NAKAMURA)
- Target version set to 2.0.0
=begin
=end
Updated by usa (Usaku NAKAMURA) about 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r20189.
=end
Updated by rogerdpack (Roger Pack) about 16 years ago
=begin
did this also fix the "hanging when you pass select > 64 fds" aspect? would you like me to file a separate report for that?
Thanks!
-=R
=end
Updated by usa (Usaku NAKAMURA) about 16 years ago
=begin
Hello,
In message "[ruby-core:19890] [Bug #721] select in windows accepts too many fd's"
on Nov.13,2008 03:58:06, redmine@ruby-lang.org wrote:
did this also fix the "hanging when you pass select > 64 fds" aspect? would you like me to file a separate report for that?
I solved only the problem that the reproduction script had shown.
I recommend to send another report for another problem :)
Regards,¶
U.Nakamura usa@garbagecollect.jp
=end