Backport #1001 [ruby-core:21264]
Interpreter-wide deadlock when native close() is called on fd which is currently being IO#select()ed
| Status : | Closed | Start : | 01/12/2009 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | Kirk Haines | % Done : | 100% |
|
| Category : | - | |||
| Target version : | - | |||
Description
details and fix here: http://coderrr.wordpress.com/2009/01/11/ruby-and-mysqlplus-select-deadlock/
Associated revisions
- eval.c (rb_thread_schedule): handle EBADF of select as well.
[ruby-core:21264]
merge revision(s) 22299:
- eval.c (rb_thread_schedule): handle EBADF of select as well.
[ruby-core:21264]
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/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/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.