Project

General

Profile

Actions

Bug #10190

closed

Segmentation fault when Thread::Queue#push is called through dRuby

Added by itiut (Yuichi TANIKAWA) about 10 years ago. Updated about 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
[ruby-core:64694]

Description

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

require 'drb/drb'
require 'thread'

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

client.rb

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.


Files

server.log (13.8 KB) server.log itiut (Yuichi TANIKAWA), 08/31/2014 09:32 PM

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #9674: Segfault when marshaling QueueClosed03/25/2014Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0