[#1207] warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...>

This message was posted to ruby-talk, but I didn't get responce from

22 messages 2003/07/01
[#1208] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/01

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1209] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/02

ts wrote:

[#1210] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/02

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1211] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1212] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/04

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1213] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1214] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/04

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1215] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1237] FTP.new with block — Gavin Sinclair <gsinclair@...>

Hi,

22 messages 2003/07/19
[#1238] Re: [Patch] FTP.new with block — ts <decoux@...> 2003/07/19

>>>>> "G" == Gavin Sinclair <gsinclair@soyabean.com.au> writes:

[#1240] Re: [Patch] FTP.new with block — Mathieu Bouchard <matju@...> 2003/07/19

[#1297] Fix for Bug 1058 — Markus Walser <walser@...>

Hi,

16 messages 2003/07/25

Re: warning in ruby extension eats memory

From: Eugene Scripnik <Eugene.Scripnik@...>
Date: 2003-07-04 10:40:10 UTC
List: ruby-core #1211
ts wrote:
>>>>>>"E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
> 
> 
> E> I don't see warning, script just halts consuming all the memory and 
> E> works until operating system kills it.
> E> How to debug this and find what happens?
> 
>  Something like this
> 
>    gdb ruby
> 
>    [...]
> 
>    (gdb) r test.rb
> 
>    [you wait a little, then use Control-C to stop the program ]
>    ^C
> 
>    (gdb) bt
>    [it will display the stack, to see what the program do ]
OK, I've updated my ruby to 2003-07-02 and have done what you suggested. 
Here is backtrace:
#0  0x280930b2 in rb_call0 () from /usr/local/lib/libruby.so.18
#1  0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#2  0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
#3  0x280a91ec in io_write () from /usr/local/lib/libruby.so.18
#4  0x2809e47a in call_cfunc () from /usr/local/lib/libruby.so.18
#5  0x280930c9 in rb_call0 () from /usr/local/lib/libruby.so.18
#6  0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#7  0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
#8  0x280a91ec in io_write () from /usr/local/lib/libruby.so.18
#9  0x2809e47a in call_cfunc () from /usr/local/lib/libruby.so.18
#10 0x280930c9 in rb_call0 () from /usr/local/lib/libruby.so.18
#11 0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#12 0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
#13 0x280a91ec in io_write () from /usr/local/lib/libruby.so.18
#14 0x2809e47a in call_cfunc () from /usr/local/lib/libruby.so.18
#15 0x280930c9 in rb_call0 () from /usr/local/lib/libruby.so.18
#16 0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#17 0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
[...]
#108434 0x2809e47a in call_cfunc () from /usr/local/lib/libruby.so.18
#108435 0x280930c9 in rb_call0 () from /usr/local/lib/libruby.so.18
#108436 0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#108437 0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
#108438 0x280a91ec in io_write () from /usr/local/lib/libruby.so.18
#108439 0x2809e47a in call_cfunc () from /usr/local/lib/libruby.so.18
#108440 0x280930c9 in rb_call0 () from /usr/local/lib/libruby.so.18
#108441 0x280938b9 in rb_call () from /usr/local/lib/libruby.so.18
#108442 0x28093b27 in rb_funcall () from /usr/local/lib/libruby.so.18
#108443 0x280a92ae in rb_io_write () from /usr/local/lib/libruby.so.18
#108444 0x280accb7 in rb_write_deferr2 () from /usr/local/lib/libruby.so.18
#108445 0x280acce9 in rb_write_deferr () from /usr/local/lib/libruby.so.18
#108446 0x2808775e in warn_print () from /usr/local/lib/libruby.so.18
#108447 0x280877b3 in rb_warn () from /usr/local/lib/libruby.so.18
#108448 0x2823580f in test_free () from ./mytest.so
#108449 0x280a5137 in rb_gc_call_finalizer_at_exit ()

    from /usr/local/lib/libruby.so.18
#108450 0x2808af03 in ruby_finalize () from /usr/local/lib/libruby.so.18
#108451 0x2808b010 in ruby_cleanup () from /usr/local/lib/libruby.so.18
#108452 0x2808b11f in ruby_stop () from /usr/local/lib/libruby.so.18
#108453 0x2808b176 in ruby_run () from /usr/local/lib/libruby.so.18
#108454 0x080485f6 in main ()
#108455 0x08048515 in _start ()

I've rebuilt ruby with debug information and here is complete backtrace:
Program received signal SIGINT, Interrupt.
rb_call0 (klass=134690664, recv=134688144, id=6817, oid=2, argc=1,
     argv=0xbe60d360, body=0x80731f0, nosuper=1) at eval.c:4869
4869                if (trace_func) {
(gdb) bt
#0  rb_call0 (klass=134690664, recv=134688144, id=6817, oid=2, argc=1,
     argv=0xbe60d360, body=0x80731f0, nosuper=1) at eval.c:4869
#1  0x28093949 in rb_call (klass=134690664, recv=134688144, mid=6817, 
argc=1,
     argv=0xbe60d360, scope=1) at eval.c:5100
#2  0x28093bb7 in rb_funcall (recv=134688144, mid=6817, n=1) at ruby.h:625
#3  0x280a927c in io_write (io=134688144, str=135352400) at io.c:419
#4  0x2809e50a in call_cfunc (func=0x280a91a4 <io_write>, recv=134688144,
     len=134689264, argc=1, argv=0x1) at eval.c:4761
#5  0x28093159 in rb_call0 (klass=134690664, recv=134688144, id=6817, oid=2,
     argc=1, argv=0xbe60d560, body=0x80731f0, nosuper=1) at eval.c:4883
#6  0x28093949 in rb_call (klass=134690664, recv=134688144, mid=6817, 
argc=1,
     argv=0xbe60d560, scope=1) at eval.c:5100
#7  0x28093bb7 in rb_funcall (recv=134688144, mid=6817, n=1) at ruby.h:625
#8  0x280a927c in io_write (io=134688144, str=135352400) at io.c:419
#9  0x2809e50a in call_cfunc (func=0x280a91a4 <io_write>, recv=134688144,
     len=134689264, argc=1, argv=0x1) at eval.c:4761
#10 0x28093159 in rb_call0 (klass=134690664, recv=134688144, id=6817, oid=2,
     argc=1, argv=0xbe60d760, body=0x80731f0, nosuper=1) at eval.c:4883
#11 0x28093949 in rb_call (klass=134690664, recv=134688144, mid=6817, 
argc=1,
     argv=0xbe60d760, scope=1) at eval.c:5100
#12 0x28093bb7 in rb_funcall (recv=134688144, mid=6817, n=1) at ruby.h:625
#13 0x280a927c in io_write (io=134688144, str=135352400) at io.c:419
#14 0x2809e50a in call_cfunc (func=0x280a91a4 <io_write>, recv=134688144,
     len=134689264, argc=1, argv=0x1) at eval.c:4761

-- 
Eugene Scripnik
IT Group
Software Architect
Tel./Fax +380 (372) 58-43-10
email: Eugene.Scripnik@itgrp.net
http://www.itgrp.net/


In This Thread