-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Hello Chuck Remes (@chuckremes),
Thank you very much for maintaining ffi-rzmq.
Since Ruby 3.4, I have observed unexpected behavior with ffi-rzmq.
When running IRuby’s test suite under Ruby 3.4, the process hangs after all tests pass and never terminates.
Dumping thread backtraces shows that the zmq_proxy call remains blocked and does not return.
Below is a minimal reproduction without using IRuby.
Steps to Reproduce
-
Install Ruby:
rbenv install 3.3.8 rbenv install 3.4.5
-
Save the following code as
hang.rb:require "ffi-rzmq" ctx = ZMQ::Context.new front = ctx.socket(ZMQ::REP) back = ctx.socket(ZMQ::REQ) front.bind("inproc://front") back.bind("inproc://back") Thread.new do ZMQ::Device.new(front, back) end sleep 1 puts "Exiting main thread"
-
Run:
ruby hang.rb
-
Compare the results:
- Ruby 3.3.8: Process exits normally after printing
Exiting main thread. - Ruby 3.4.5: Process does not exit and remains blocked in the
zmq_proxycall.
- Ruby 3.3.8: Process exits normally after printing
This issue does not occur on Ruby 3.3.x.
It may be related to thread or shutdown handling changes in Ruby 3.4.
Any guidance or insights on this behavior would be greatly appreciated.
Thanks in advance for looking into this!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels