Backport #1001 [ruby-core:21264]

Interpreter-wide deadlock when native close() is called on fd which is currently being IO#select()ed

Added by coderrr . 393 days ago. Updated 173 days ago.

Status :Closed Start :01/12/2009
Priority :Normal Due date :
Assigned to :Kirk Haines % Done :

100%

Category :-
Target version :-

Description

Associated revisions

Revision 22299
Added by akr 360 days ago

Revision 23577
Added by shyouhei 259 days ago

merge revision(s) 22299:

Revision 24600
Added by wyhaines 173 days ago

Backport #1001; handle EBADF in select() to avoid Interpreter-wide deadlock when native close() is called on fd which is currently being IO#select()ed.

History

01/24/2009 05:04 AM - coderrr .

any comments on this?

01/25/2009 06:23 AM - Roger Pack

it might be nice to submit a patch which "fixes" this.

My question, however, is what is the right behavior when a bad socket is discovered?  I believe Python raises on the thread that passed it in [not just ignore it], which seems reasonable.

Regardless, looks like a bug to me.  Is it exhibited in 1.9?

Thoughts?

02/02/2009 12:49 PM - Koichi Sasada

  • Assigned to set to Akira Tanaka
  • ruby -v set to 1.8

02/14/2009 06:59 PM - Akira Tanaka

  • Status changed from Open to Closed
Thank you for investigating the problem.

However the fix makes IO.select hang when the fd is closed.
I think it is not good behavior.

05/12/2009 05:17 PM - Shyouhei Urabe

  • Status changed from Closed to Open
  • Assigned to changed from Akira Tanaka to Shyouhei Urabe

05/26/2009 08:57 PM - Shyouhei Urabe

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
Applied in changeset r23577.

05/26/2009 08:59 PM - Shyouhei Urabe

  • Status changed from Closed to Open
  • Assigned to changed from Shyouhei Urabe to Kirk Haines

08/21/2009 02:23 AM - Kirk Haines

  • Status changed from Open to Closed
Applied in r24600.

Also available in: Atom PDF