Bug #9674

Segfault when marshaling Queue

Added by Peter Suschlik over 1 year ago. Updated 12 months ago.

[ruby-core:61677]
Status:Closed
Priority:Normal
Assignee:-
ruby -v:ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux] Backport:2.0.0: DONTNEED, 2.1: DONE

Description

Marshaling Queue segfaults on ruby 2.1.1p76 (see attachment)

ruby -e 'Marshal.dump(Queue.new)'

(It also segfaults for ruby 2.2.0dev (2014-03-25 trunk 45407) [x86_64-linux])

This core dump occurs when using RindgyDingy with DRb which marshals Queue.

On Ruby ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] it failed with:

$ ruby -e 'Marshal.dump(Queue.new)'
-e:1:in dump': no _dump_data is defined for class Mutex (TypeError)
from -e:1:in
'

marshal_dump_queue-2.1.1.txt Magnifier - Core dump for 2.1.1p76 (11.2 KB) Peter Suschlik, 03/25/2014 03:30 PM

marshal_dump_queue-2.2.0.txt Magnifier - Core dump for 2.2.0dev (11 KB) Peter Suschlik, 03/25/2014 03:32 PM


Related issues

Duplicated by Ruby trunk - Bug #10190: Segmentation fault when Thread::Queue#push is called through dRuby Closed 08/31/2014

Associated revisions

Revision 45423
Added by Nobuyoshi Nakada over 1 year ago

thread.c: undumpable

  • ext/thread/thread.c (undumpable): ConditionVariable and Queue are not dumpable. [Bug #9674]

Revision 45423
Added by Nobuyoshi Nakada over 1 year ago

thread.c: undumpable

  • ext/thread/thread.c (undumpable): ConditionVariable and Queue are not dumpable. [Bug #9674]

Revision 45424
Added by Nobuyoshi Nakada over 1 year ago

marshal.c: undumpable hidden objects

  • marshal.c (w_object): internal objects are not dumpable. [Bug #9674]

Revision 45424
Added by Nobuyoshi Nakada over 1 year ago

marshal.c: undumpable hidden objects

  • marshal.c (w_object): internal objects are not dumpable. [Bug #9674]

Revision 46805
Added by Tomoyuki Chikanaga 12 months ago

merge revision(s) r45423,r45424: [Backport #9674]

* ext/thread/thread.c (undumpable): ConditionVariable and Queue
  are not dumpable.   [Bug #9674]

* marshal.c (w_object): internal objects are not dumpable.
   [Bug #9674]

History

#1 Updated by Eric Hodel over 1 year ago

For clarity, a Queue is not dumpable. With DRb a reference to the Queue (DRbObject) is sent instead.

#2 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r45423.


thread.c: undumpable

  • ext/thread/thread.c (undumpable): ConditionVariable and Queue are not dumpable. [Bug #9674]

#3 Updated by Peter Suschlik over 1 year ago

Thank you for the fast fix! :)

#4 Updated by Usaku NAKAMURA about 1 year ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: DONTNEED, 2.1: REQUIRED

#5 Updated by Tomoyuki Chikanaga 12 months ago

  • Backport changed from 2.0.0: DONTNEED, 2.1: REQUIRED to 2.0.0: DONTNEED, 2.1: DONE

Backported into ruby_2_1 branch at r46805.

#6 Updated by Nobuyoshi Nakada 10 months ago

  • Duplicated by Bug #10190: Segmentation fault when Thread::Queue#push is called through dRuby added

Also available in: Atom PDF