Backport #1001
Interpreter-wide deadlock when native close() is called on fd which is currently being IO#select()ed
| Status: | Closed | Start date: | 01/12/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % 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
Updated by coderrr . about 3 years ago
any comments on this?
Updated by Roger Pack about 3 years ago
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?
Updated by Koichi Sasada about 3 years ago
- Assignee set to Akira Tanaka
- ruby -v set to 1.8
Updated by Akira Tanaka almost 3 years ago
- 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.
Updated by Shyouhei Urabe over 2 years ago
- Status changed from Closed to Open
- Assignee changed from Akira Tanaka to Shyouhei Urabe
Updated by Shyouhei Urabe over 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r23577.
Updated by Shyouhei Urabe over 2 years ago
- Status changed from Closed to Open
- Assignee changed from Shyouhei Urabe to Kirk Haines