Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Possible GC bug w/ fork() and Queue
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
netshade  
View profile  
 More options Mar 19 2012, 10:04 am
From: netshade <netsh...@gmail.com>
Date: Mon, 19 Mar 2012 07:04:27 -0700 (PDT)
Local: Mon, Mar 19 2012 10:04 am
Subject: Possible GC bug w/ fork() and Queue
We've got reports from some of our customers that they are getting
occasional segfaults when using Ruby Enterprise Edition in concert
with a library that is using threads and the Queue class.  After some
research, we were able to narrow it down to what looks to be a junk
pointer in the Queue class' value_available ConditionVariable var
( the error occurs in eval.c#rb_thread_check(), when it attempts to
check the type of a thread inside the Queue's .value_available
ConditionVariable's .waiting List at the time of the GC calling
free_queue() ).

You can reproduce the error by doing the following:

 ruby  -rthread -e 'q = Queue.new; Thread.new { q.pop }; pid = fork;
if pid.nil?; q = nil; GC.start; else; puts "Waiting on #{pid}";
Process.wait(pid); end'

In REE, I get an error like the following:

 wrong argument type Object (expected Thread) (TypeError)

In stock 1.8.7, I don't receive an error.

I believe what is happening is that at fork() time something is
trashing (or failing to copy) the thread entry for the Queue popper
thread that is in the original process' ConditionVariable .waiting
list.  Can someone from the Phusion team verify this bug?

Thanks,

Chris Zelenak


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
netshade  
View profile  
 More options Mar 26 2012, 9:47 am
From: netshade <netsh...@gmail.com>
Date: Mon, 26 Mar 2012 06:47:14 -0700 (PDT)
Local: Mon, Mar 26 2012 9:47 am
Subject: Re: Possible GC bug w/ fork() and Queue
After further checking, GC was not exactly the issue.  The problem
seems to originate from the MBARI patches, more information here:
https://github.com/brentr/matzruby/issues/1 .

On Mar 19, 10:04 am, netshade <netsh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »