Project

General

Profile

Bug #10062

Segfault involving Queue

Added by LordAlveric (Fred Mitchell) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
trun
[ruby-core:63826]

Description

Pushing an object onto a Queue instantiation causes a segfault. This was seen on Ruby versions 2.1.1 and 2.1.2

In the interests of being able to completely reproduce the environment in which this happens, I have included detailed instructions here.

  1. Clone https://github.com/flajann2/rubyneat/tree/devready (yes, the devready branch)
  2. In its root do "rake install" to install the gem
  3. Clone https://github.com/flajann2/rubyneat_dashboard/tree/master
  4. In its root do "rake install" to install that gem
  5. Clone https://github.com/flajann2/rubyneat_examples/tree/devready (yes, the devready branch)
  6. Go to the root of that and
  7. Run "bundle update"
  8. Run "neat run xor"
  9. It should segfault almost immediately.

Files

bug-10062.txt (189 KB) bug-10062.txt nobu (Nobuyoshi Nakada), 08/19/2014 12:48 AM

Updated by LordAlveric (Fred Mitchell) over 6 years ago

The condition has been tagged as 'segfault' on all three projects. Since I will attempt to find a workaround, be sure to pull those tags, as well as 'devready' branches on rubyneat and rubyneat_examples

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

Hello fred, thank you for your reporting.

At first, could you try to reproduce it with 2.1-head and trunk?

Updated by nagachika (Tomoyuki Chikanaga) about 6 years ago

  • Status changed from Open to Feedback
  • Priority changed from 7 to Normal

Does anyone can reproduce this?

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

Seems the Queue instance is not initialized properly.
Probably, Queue#initialize is overridden somewhere?

$ ruby -rthread -e 'class Thread::Queue; def initialize;end;end;q=Thread::Queue.new;q.push(nil)'
-e:1: [BUG] Segmentation fault at 0x00000000000008
ruby 2.2.0dev (2014-08-18 trunk 47214) [universal.x86_64-darwin13]

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport21 to Ruby master
  • ruby -v set to trun
  • Backport set to 2.0.0: REQUIRED, 2.1: REQUIRED

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

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

Applied in changeset r47217.


thread.c: check initialized

  • ext/thread/thread.c (get_array): check instance variables are initialized properly. [ruby-core:63826][Bug #10062]

Updated by nagachika (Tomoyuki Chikanaga) about 6 years ago

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

Backported into ruby_2_1 branch at r47378.

Updated by usa (Usaku NAKAMURA) about 6 years ago

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

Also available in: Atom PDF