# Problems with GC.. again

**URL:** <https://www.ruby-forum.com/t/problems-with-gc-again/164296>\
**Category:** Ruby\
**Created:** [March 31, 2009, 12:16am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296 "2009-03-31T00:16:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [March 31, 2009, 12:16am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/1 "2009-03-31T00:16:00Z")

</div>

Hi.

Again, I ran into some kind of wrongly garbage collected object, but  
can’t determine exactly which one.

Sources is at:  
[http://files.whitequark.ru/rlua.tgz](http://files.whitequark.ru/rlua.tgz)

Try:  
ruby1.9 extconf.rb  
make  
ruby1.9 test.rb

A segfault!  
----%\<----  
test.rb:21: [BUG] Segmentation fault  
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

## – control frame ---------- c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :method\_missing c:0003 p:0099 s:0011 b:0009 l:001d58 d:001d58 TOP test.rb:21 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private\_class\_method c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :16

DBG\> : “test.rb:21:in `method_missing'" DBG> : "test.rb:21:in `'”  
– backtrace of native function call (Use addr2line) –  
0xb7eefc46  
0xb7e193a9  
0xb7e1941a  
0xb7ea0a56  
0xb7f6340c  
0xb7eda91e  
0xb7eda980  
0xb7ee7b07  
0xb7eead9d  
0xb7f5d300  
0xb79b5912  
0xb79b5d66  
0xb79be502  
0xb79b1a2e  
0xb7f5cde6  
0xb7f5d14f  
0xb7edbc30  
0xb7ee7dbd  
0xb7ee848e  
0xb7ee8546  
0xb7eded81  
0xb7ee08b4  
0xb7ee6a84  
0xb7ee6cad  
0xb7e1bbd7  
0xb7e1d156  
0x8048794  
0xb7c0c775  
0x8048681  
----%\<----

WBR, Peter Z.

P. S. Can someone show me how does addr2line work? It doesn’t show  
anything other than “??” with /usr/bin/ruby1.9,  
/usr/lib/libruby1.9.so, ./rlua.so… May this be because Debian  
binaries are stripped?

---

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [April 1, 2009, 7:35am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/2 "2009-04-01T07:35:06Z")

</div>

Hi,

At Tue, 31 Mar 2009 07:15:04 +0900,  
Peter Z. wrote in [ruby-talk:332540]:

> test.rb:21: [BUG] Segmentation fault  
> ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

Why do you use such old, unreleased revision?

---

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [April 1, 2009, 8:54am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/3 "2009-04-01T08:54:09Z")

</div>

Quoting “Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi,
> 
> At Tue, 31 Mar 2009 07:15:04 +0900,  
> Peter Z. wrote in [ruby-talk:332540]:
> 
> > test.rb:21: [BUG] Segmentation fault  
> > ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]
> 
> Why do you use such old, unreleased revision?

It’s latest 1.9 packaged in Debian.

WBR, Peter Z.

---

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [April 1, 2009, 10:01am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/4 "2009-04-01T10:01:45Z")

</div>

On Mar 31, 2009, at 23:51 , Peter Z. wrote:

> It’s latest 1.9 packaged in Debian.

_sigh_

Debian maintainers really seem to have it out for ruby… yet another  
example.

---

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [April 2, 2009, 3:21am UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/5 "2009-04-02T03:21:45Z")

</div>

Hi,

At Wed, 1 Apr 2009 15:51:28 +0900,  
Peter Z. wrote in [ruby-talk:332638]:

> > > test.rb:21: [BUG] Segmentation fault  
> > > ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]
> > 
> > Why do you use such old, unreleased revision?
> 
> It’s latest 1.9 packaged in Debian.

…

Well, your code doesn’t segfault with 1.9.1p0 anyway.

$ ./ruby ext/rlua/test.rb  
ruby 1.9.1p0 (2009-03-04 revision 22762) [i386-darwin9.6.0]  
ext/rlua/test.rb:9:in `define_finalizer': cannot define finalizer for Fixnum (ArgumentError) from ext/rlua/test.rb:9:in`initialize’  
from ext/rlua/test.rb:9:in `new' from ext/rlua/test.rb:9:in`method\_missing’  
from ext/rlua/test.rb:9:in `’

---

<div class="post-metadata">

**Author:** ![peterz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@peterz](https://www.ruby-forum.com/u/peterz)\
**Post date:** [April 2, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296/6 "2009-04-02T16:40:32Z")

</div>

On Wed, 01 Apr 2009 01:51:28 -0500, Peter Z. wrote:

> It’s latest 1.9 packaged in Debian.
> 
> WBR, Peter Z.

Get the latest version from experimental.

–Ken
