# Segfaults from the 'object-free' dtrace probe

**URL:** <https://www.ruby-forum.com/t/segfaults-from-the-object-free-dtrace-probe/183820>\
**Category:** Ruby\
**Created:** [February 21, 2010, 1:23am UTC](https://www.ruby-forum.com/t/segfaults-from-the-object-free-dtrace-probe/183820 "2010-02-21T01:23:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dane\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@Dane\_J](https://www.ruby-forum.com/u/Dane_J)\
**Post date:** [February 21, 2010, 1:23am UTC](https://www.ruby-forum.com/t/segfaults-from-the-object-free-dtrace-probe/183820/1 "2010-02-21T01:23:55Z")

</div>

Hi All-

Has anyone had any luck with the ‘object-free’ dtrace probe… ever…  
on  
any platform? It segfaults ruby without fail, absolutely 100% of the  
time,  
everywhere.

It did it in Leopard, and there’s a thread about it here:  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/287796](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/287796) .

I tried testing it again yesterday in Snow Leopard and got the same  
segfault. Then in OpenSolaris 2009.06, and then OpenSolaris b133 that  
came  
out last night. Without fail they all die after the probe fires.

There was a patch mentioned in the thread above, did that ever come  
about?

-Dane

---

<div class="post-metadata">

**Author:** ![Dane\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@Dane\_J](https://www.ruby-forum.com/u/Dane_J)\
**Post date:** [February 21, 2010, 7:37am UTC](https://www.ruby-forum.com/t/segfaults-from-the-object-free-dtrace-probe/183820/2 "2010-02-21T07:37:54Z")

</div>

On Sat, Feb 20, 2010 at 4:23 PM, Dane J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I tried testing it again yesterday in Snow Leopard and got the same  
> segfault. Then in OpenSolaris 2009.06, and then OpenSolaris b133 that came  
> out last night. Without fail they all die after the probe fires.
> 
> There was a patch mentioned in the thread above, did that ever come about?
> 
> -Dane

Ahhh… I think I see what it’s doing, at least in a simple test case  
I just cooked up that doesn’t segfault, but rather explodes with:  
[BUG] object allocation during garbage collection phase

The object-free probe fires during GC in obj\_free. The entire probe is  
two lines, most of which is dtrace boilerplate… So the only thing  
that could be causing it is:  
rb\_class2name(CLASS\_OF(obj)));

So… that ends up creating an object in there I assume, right?

-Dane
