Actions
Bug #10868
closedObject allocation within an extension during garbage collection terminates the Ruby process
Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux], ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux], ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
Backport:
Description
It appears that when a CFUNC makes an allocation when garbage collection is running within a different thread/context, it yields the error "[BUG] object allocation during garbage collection phase" and the Ruby process is subsequently terminated.
Ruby versions 1.9.3, 2.1.5, and 2.2.0 all yield the same behavior (per the attached files).
Note that similar behavior has been reported within issues 7750, 9090, and 1049.
Files
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Status changed from Open to Third Party's Issue
Using ffi.
Updated by charlez (Charles Leu) almost 10 years ago
For the benefit of those encountering this same (or similar) behavior:
- This particular problem was observed with ffi-rzmq. It appears that ffi-rzmq code isn't fully thread aware, hence this issue.
- The problem was elicited by creating a single socket, and performing I/O via the single socket from multiple threads.
- It is OK to create a socket in one thread, and perform I/O with the socket within a single separate sibling thread.
- It is OK to create a socket per thread, and have each thread perform I/O using its designated socket.
Actions
Like0
Like0Like0