Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGTRAP leaks when using backquotes and object allocation profiler #62

Open
doudou opened this issue Jun 3, 2013 · 2 comments
Open

Comments

@doudou
Copy link

doudou commented Jun 3, 2013

The whole interpreter aborts with SIGTRAP when using the object allocation profiler. Simply creating the following bla.rb file

`ls`

and running

CPUPROFILE_OBJECTS=1 CPUPROFILE=acd-profile-allocs ruby -rperftools -S bla.rb

triggers it on my machine (Debian unstable, ruby version)

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
@doudou
Copy link
Author

doudou commented Jun 3, 2013

Oh .. and the C backtrace is

#0  0x00007f6a4b13d8c1 in rb_newobj () at gc.c:1165
#1  0x00007f6a4b144666 in io_alloc (klass=16911960) at io.c:674
#2  0x00007f6a4b151056 in pipe_open (eargp=eargp@entry=0x7fff98094b40, prog=19933640, fmode=fmode@entry=1, convconfig=convconfig@entry=0x0, modestr=0x7f6a4b2507f6 "r")
    at io.c:5454
#3  0x00007f6a4b151680 in pipe_open_s (prog=19933640, fmode=fmode@entry=1, convconfig=convconfig@entry=0x0, modestr=0x7f6a4b2507f6 "r") at io.c:5522
#4  0x00007f6a4b151e4f in rb_f_backquote (obj=<optimized out>, str=19933640) at io.c:7514
#5  0x00007f6a4b21f443 in vm_call_cfunc (me=0x10a10e0, blockptr=0x0, recv=<optimized out>, num=1, reg_cfp=0x7f6a4a1c19e0, th=0xfc7520) at vm_insnhelper.c:404
#6  vm_call_method (th=th@entry=0xfc7520, cfp=cfp@entry=0x7f6a4a1c19e0, num=1, blockptr=0x0, flag=<optimized out>, id=<optimized out>, me=0x10a10e0, recv=16747000)
    at vm_insnhelper.c:534
#7  0x00007f6a4b2152d9 in vm_exec_core (th=th@entry=0xfc7520, initial=initial@entry=0) at insns.def:1015
#8  0x00007f6a4b21a964 in vm_exec (th=0xfc7520) at vm.c:1220
#9  0x00007f6a4b221e60 in rb_iseq_eval (iseqval=16741040) at vm.c:1447
#10 0x00007f6a4b12da60 in rb_load_internal (fname=16665000, wrap=<optimized out>) at load.c:310
#11 0x00007f6a4b12db69 in rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:383
#12 0x00007f6a4b21f443 in vm_call_cfunc (me=0x10cb160, blockptr=0x0, recv=<optimized out>, num=1, reg_cfp=0x7f6a4a1c1bf0, th=0xfc7520) at vm_insnhelper.c:404
#13 vm_call_method (th=th@entry=0xfc7520, cfp=cfp@entry=0x7f6a4a1c1bf0, num=1, blockptr=0x0, flag=<optimized out>, id=<optimized out>, me=0x10cb160, recv=16963880)
    at vm_insnhelper.c:534
#14 0x00007f6a4b2152d9 in vm_exec_core (th=th@entry=0xfc7520, initial=initial@entry=0) at insns.def:1015
#15 0x00007f6a4b21a964 in vm_exec (th=0xfc7520) at vm.c:1220
#16 0x00007f6a4b221e60 in rb_iseq_eval (iseqval=28887960) at vm.c:1447
#17 0x00007f6a4b12da60 in rb_load_internal (fname=28874480, wrap=<optimized out>) at load.c:310
#18 0x00007f6a4b12db69 in rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:383
#19 0x00007f6a4b21f443 in vm_call_cfunc (me=0x10cb0c0, blockptr=0x0, recv=<optimized out>, num=1, reg_cfp=0x7f6a4a1c1f08, th=0xfc7520) at vm_insnhelper.c:404
#20 vm_call_method (th=th@entry=0xfc7520, cfp=cfp@entry=0x7f6a4a1c1f08, num=1, blockptr=0x0, flag=<optimized out>, id=<optimized out>, me=0x10cb0c0, recv=16959200)
    at vm_insnhelper.c:534
#21 0x00007f6a4b2152d9 in vm_exec_core (th=th@entry=0xfc7520, initial=initial@entry=0) at insns.def:1015
#22 0x00007f6a4b21a964 in vm_exec (th=th@entry=0xfc7520) at vm.c:1220
#23 0x00007f6a4b221f4d in rb_iseq_eval_main (iseqval=iseqval@entry=18113280) at vm.c:1461
#24 0x00007f6a4b12aeca in ruby_exec_internal (n=0x1146300) at eval.c:204
#25 0x00007f6a4b12b96d in ruby_exec_node (n=n@entry=0x1146300) at eval.c:251
#26 0x00007f6a4b12d3fe in ruby_run_node (n=0x1146300) at eval.c:244

@tmm1
Copy link
Owner

tmm1 commented Jun 3, 2013

Oof. I think its safe to say the allocation profiler is completely broken at this point. /cc #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants