Project

General

Profile

Bug #10190

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

I found a segmentation fault when `Thread::Queue` is attached to a dRuby server as a front object and `#push` is called from a dRuby client. 
 Here are programs, a procedure and logs. 

 ## server.rb 
 ~~~ruby ~~~ 
 require 'drb/drb' 
 require 'thread' 

 q = Queue.new 
 DRb.start_service('druby://localhost:12345', q) 
 DRb.thread.join 
 ~~~ 

 ## client.rb 
 ~~~ruby ~~~ 
 require 'drb/drb' 
 require 'thread' 

 DRb.start_service 
 q = DRbObject.new_with_uri('druby://localhost:12345') 
 q.push 1 
 ~~~ 

 ## procedure 
 ~~~ 
 $ ruby server.rb 

 # in another terminal 
 $ ruby client.rb 
 ~~~ 

 ## server.rb log 
 ~~~ 
 /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:562: [BUG] Segmentation fault at 0x00000000000018 
 ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] 
 ~~~ 

 ## client.rb log 
 ~~~ 
 /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:575:in `load': connection closed (DRb::DRbConnError) 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:637:in `recv_reply' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:936:in `recv_reply' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1222:in `send_message' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1110:in `block (2 levels) in method_missing' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1197:in `open' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1109:in `block in method_missing' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1128:in `with_friend' 
         from /home/itiut/.linuxbrew/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/drb/drb.rb:1108:in `method_missing' 
         from client.rb:5:in `<main>' 
 ~~~ 


 I tried executing the procedure many times but the server's log contained detailed information only once or twice.  
 Fortunately I found it in a terminal scrollback buffer, so I attach it. 

Back