Ticket #34 (new defect)

Opened 11 months ago

Last modified 10 months ago

Patches from Roger Pack, including 1024 and 64 descriptor patch

Reported by: rogerdpack Assigned to: francis
Priority: major Milestone:
Keywords: Cc:

Description

Unless using epoll or kqueue, EM incorrectly handles file descriptors > 1024 (> 64 on windows) It creates the new servers or connects the sockets, but the sockets are ignored by select and thus never have any of their actions called on them.

I'd be happy to update my patch to be against trunk if anybody would like it. http://rubyforge.org/tracker/index.php?group_id=1555&atid=6058

Attachments

test_lotsa_sockets.rb (4.5 kB) - added by rogerdpack on 06/26/08 20:14:37.
lotsa_sockets_updated.diff (27.0 kB) - added by rogerdpack on 06/30/08 13:30:29.
updated diff. It includes a few extra functionality not related to this one [GetMaxTimers?] which should probably be extracted, and applies to a different ticket
lotsa_sockets_updated.2.diff (14.8 kB) - added by raggi on 06/30/08 19:34:08.
Munged out whitespace and other purely syntax changes, removed whole changeset for cmain.cpp (applied). Contains changes for select argument boundaries and get timer millis.

Change History

06/26/08 20:14:37 changed by rogerdpack

  • attachment test_lotsa_sockets.rb added.

06/30/08 13:30:29 changed by rogerdpack

  • attachment lotsa_sockets_updated.diff added.

updated diff. It includes a few extra functionality not related to this one [GetMaxTimers?] which should probably be extracted, and applies to a different ticket

06/30/08 13:31:20 changed by rogerdpack

that diff also includes a mingw hack which would be nice, but isn't necessarily part of this ticket

06/30/08 14:27:10 changed by rogerdpack

Ideally we should actually use IO Completion Ports for windows [though this patch is still necessary for Linux, since any descriptors > 1024 is not accepted by select].

06/30/08 19:32:09 changed by raggi

  • owner set to raggi.
  • status changed from new to assigned.
  • summary changed from EM errs with file descriptors over 1024 to Patches from Roger Pack, including 1024 and 64 descriptor patch.

Ok, I've refactored and merged in the error value changes on that patch. Renaming this to Roger patch set, and will re-open windows stuff.

  • In your extconf changes, can you explain the PPC one, does mkmf not use uname -m?
  • Can you confirm that uname -m returns a viable value (it should)?
  • The mingw stuff is already integrated on my branch, by using a POSIX (gcc) build chain target now.
  • The edd.cpp patch for assert(nbytes > 0); I have only seen this appear if kqueue is causing issues, can you confirm why and for what reason you added this patch?
  • The get timer quantumn millis I will split out into a seperate patch and apply as an aside.

And down to about a 300 line diff (n.b. munged), that's a little more manageable. I will continue with this tomorrow.

06/30/08 19:34:08 changed by raggi

  • attachment lotsa_sockets_updated.2.diff added.

Munged out whitespace and other purely syntax changes, removed whole changeset for cmain.cpp (applied). Contains changes for select argument boundaries and get timer millis.

07/14/08 22:20:52 changed by rogerdpack

yeah I don't care about the PPC stuff anymore, but it worked as it should. Might fail in windows [?] I can't remember if I ran into the assert(nbytes > 0) problem in windows or not. I'd say leave it in until it gets recreated in windows. It gets thrown all the time [as you noted] with kqueue. See the other ticket regarding it. Thanks for doing that! -R

07/22/08 15:09:25 changed by raggi

  • owner changed from raggi to francis.
  • status changed from assigned to new.

Francis, can you verify the remainder of this patchset?

I have applied / split out most of it, so the last diffset in the list should be good to look at.