Ticket #48 (closed bug: fixed)

Opened 13 years ago

Last modified 13 years ago

segfault exposed by partcl's t/cmd_break.t

Reported by: coke Owned by:
Priority: blocker Milestone: 0.9.0
Component: none Version:
Severity: high Keywords:
Cc: Language:
Patch status: Platform:

Description

First, build a copy of partcl to use against parrot's svn HEAD:

 http://code.google.com/p/partcl/wiki/PartclSource

Now run:

../../parrot tcl.pbc t/cmd_break.t

Get a segfault; the backtrace shown by gdb is slightly large (over 20K frames before I gave up.), but here's the first 2 pages or so:

#0  0xb6c6d65c in _int_malloc () from /lib/i686/nosegneg/libc.so.6
#1  0xb6c6efcf in calloc () from /lib/i686/nosegneg/libc.so.6
#2  0xb7b66155 in mem_sys_allocate_zeroed (size=16) at src/gc/memory.c:102
#3  0xb7b6694a in Parrot_alloc_context (interp=0x804f040,
    number_regs_used=0xbf7d423c, old=0x84766b0) at src/gc/register.c:428
#4  0xb7b66af7 in Parrot_set_new_context (interp=0x804f040,
    number_regs_used=0xbf7d423c) at src/gc/register.c:511
#5  0xb7b667ec in Parrot_push_context (interp=0x804f040,
    n_regs_used=0xbf7d423c) at src/gc/register.c:348
#6  0xb7b6f0da in count_signature_elements (interp=0x804f040,
    signature=0xb7ec2e44 "P->", args_sig=0xb5c152e0, results_sig=0xb5c152c4,
    flag=1) at src/inter_call.c:2028
#7  0xb7b6fcc7 in Parrot_PCCINVOKE (interp=0x804f040, pmc=0xb5c153a4,
    method_name=0x807c108, signature=0xb7ec2e44 "P->") at src/inter_call.c:2465
#8  0xb7dad0b2 in Parrot_FixedPMCArray_get_iter (interp=0x804f040,
    pmc=0xb62bed18) at ./src/pmc/fixedpmcarray.pmc:664
#9  0xb7ba42b3 in Parrot_cx_find_handler_local (interp=0x804f040,
    task=0xb5c153c0) at src/scheduler.c:754
#10 0xb7b5be34 in Parrot_ex_throw_from_c (interp=0x804f040,
    exception=0xb5c153c0) at src/exceptions.c:291
#11 0xb7b5c0ad in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0,
    exitcode=34,
    format=0xb7ee78f4 "ResizablePMCArray: Can't pop from an empty array!")
    at src/exceptions.c:394
#12 0xb7e00a55 in Parrot_ResizablePMCArray_pop_pmc (interp=0x804f040,
    pmc=0x81ee578) at ./src/pmc/resizablepmcarray.pmc:432
#13 0xb7b0d252 in Parrot_pop_p_p (cur_opcode=0x83cf484, interp=0x804f040)
    at src/ops/pmc.ops:333
#14 0xb7ba2bfc in runops_slow_core (interp=0x804f040, pc=0x83cf484)
    at src/runops_cores.c:222
#15 0xb7b73159 in runops_int (interp=0x804f040, offset=91)
    at src/interpreter.c:938
#16 0xb7b73a33 in runops (interp=0x804f040, offs=91) at src/inter_run.c:103
#17 0xb7b73cf1 in runops_args (interp=0x804f040, sub=0xb62bed34,
    obj=0x80b66b8, meth_unused=0x0, sig=0xb7e66530 "vP",
    ap=0xbf7d65cc "|VÁµ|VÁµ$âó·\030f}¿\002¾µ·@ð\004\b\002")
    at src/inter_run.c:240
#18 0xb7b73e2c in Parrot_runops_fromc_args (interp=0x804f040, sub=0xb62bed34,
    sig=0xb7e66530 "vP") at src/inter_run.c:305
#19 0xb7b5bfdf in Parrot_ex_throw_from_c (interp=0x804f040,
    exception=0xb5c1567c) at src/exceptions.c:327
#20 0xb7b5c0ad in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0,
    exitcode=34,
    format=0xb7ee78f4 "ResizablePMCArray: Can't pop from an empty array!")
    at src/exceptions.c:394
#21 0xb7e00a55 in Parrot_ResizablePMCArray_pop_pmc (interp=0x804f040,
    pmc=0x81ee578) at ./src/pmc/resizablepmcarray.pmc:432
#22 0xb7b0d252 in Parrot_pop_p_p (cur_opcode=0x83cf484, interp=0x804f040)
    at src/ops/pmc.ops:333
#23 0xb7ba2bfc in runops_slow_core (interp=0x804f040, pc=0x83cf484)
    at src/runops_cores.c:222
#24 0xb7b73159 in runops_int (interp=0x804f040, offset=91)
    at src/interpreter.c:938
#25 0xb7b73a33 in runops (interp=0x804f040, offs=91) at src/inter_run.c:103
#26 0xb7b73cf1 in runops_args (interp=0x804f040, sub=0xb62bed34,
    obj=0x80b66b8, meth_unused=0x0, sig=0xb7e66530 "vP",
    ap=0xbf7d67cc "\030ZÁµ\030ZÁµ$âó·\030h}¿\002¾µ·@ð\004\b\002")
    at src/inter_run.c:240
#27 0xb7b73e2c in Parrot_runops_fromc_args (interp=0x804f040, sub=0xb62bed34,
    sig=0xb7e66530 "vP") at src/inter_run.c:305
#28 0xb7b5bfdf in Parrot_ex_throw_from_c (interp=0x804f040,
    exception=0xb5c15a18) at src/exceptions.c:327
#29 0xb7b5c0ad in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0,
    exitcode=34,
    format=0xb7ee78f4 "ResizablePMCArray: Can't pop from an empty array!")
    at src/exceptions.c:394
#30 0xb7e00a55 in Parrot_ResizablePMCArray_pop_pmc (interp=0x804f040,
    pmc=0x81ee578) at ./src/pmc/resizablepmcarray.pmc:432
#31 0xb7b0d252 in Parrot_pop_p_p (cur_opcode=0x83cf484, interp=0x804f040)
    at src/ops/pmc.ops:333
#32 0xb7ba2bfc in runops_slow_core (interp=0x804f040, pc=0x83cf484)
    at src/runops_cores.c:222
#33 0xb7b73159 in runops_int (interp=0x804f040, offset=91)
    at src/interpreter.c:938
#34 0xb7b73a33 in runops (interp=0x804f040, offs=91) at src/inter_run.c:103
#35 0xb7b73cf1 in runops_args (interp=0x804f040, sub=0xb62bed34,
    obj=0x80b66b8, meth_unused=0x0, sig=0xb7e66530 "vP",
    ap=0xbf7d69cc "D]ÁµD]Áµ$âó·\030j}¿\002¾µ·@ð\004\b\002")
    at src/inter_run.c:240
#36 0xb7b73e2c in Parrot_runops_fromc_args (interp=0x804f040, sub=0xb62bed34,
    sig=0xb7e66530 "vP") at src/inter_run.c:305
#37 0xb7b5bfdf in Parrot_ex_throw_from_c (interp=0x804f040,
    exception=0xb5c15d44) at src/exceptions.c:327
#38 0xb7b5c0ad in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0,
    exitcode=34,
    format=0xb7ee78f4 "ResizablePMCArray: Can't pop from an empty array!")
    at src/exceptions.c:394
#39 0xb7e00a55 in Parrot_ResizablePMCArray_pop_pmc (interp=0x804f040,
    pmc=0x81ee578) at ./src/pmc/resizablepmcarray.pmc:432
#40 0xb7b0d252 in Parrot_pop_p_p (cur_opcode=0x83cf484, interp=0x804f040)
    at src/ops/pmc.ops:333
#41 0xb7ba2bfc in runops_slow_core (interp=0x804f040, pc=0x83cf484)
    at src/runops_cores.c:222
#42 0xb7b73159 in runops_int (interp=0x804f040, offset=91)
    at src/interpreter.c:938
#43 0xb7b73a33 in runops (interp=0x804f040, offs=91) at src/inter_run.c:103
#44 0xb7b73cf1 in runops_args (interp=0x804f040, sub=0xb62bed34,
    obj=0x80b66b8, meth_unused=0x0, sig=0xb7e66530 "vP",
    ap=0xbf7d6bcc "\034`Áµ\034`Áµ$âó·\030l}¿\002¾µ·@ð\004\b\002")
    at src/inter_run.c:240
#45 0xb7b73e2c in Parrot_runops_fromc_args (interp=0x804f040, sub=0xb62bed34,
    sig=0xb7e66530 "vP") at src/inter_run.c:305
#46 0xb7b5bfdf in Parrot_ex_throw_from_c (interp=0x804f040,
    exception=0xb5c1601c) at src/exceptions.c:327
#47 0xb7b5c0ad in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0,
    exitcode=34,
    format=0xb7ee78f4 "ResizablePMCArray: Can't pop from an empty array!")
    at src/exceptions.c:394
#48 0xb7e00a55 in Parrot_ResizablePMCArray_pop_pmc (interp=0x804f040,
    pmc=0x81ee578) at ./src/pmc/resizablepmcarray.pmc:432

Change History

Changed 13 years ago by coke

  • status changed from new to assigned
  • owner set to coke

I tried partcl's trunk back to parrot's r33695 (where the IO branch was merged back in), and the segfault still occurs there.

backing up to partcl r176 (before the changes to allow for IO branch modifications) and parrot r33694 yields a /different/ segfault, so bisecting this isn't going to help.

Changed 13 years ago by coke

  • status changed from assigned to new
  • owner coke deleted

Changed 13 years ago by whiteknight

  • milestone changed from 0.8.2 to 0.9.0

Changed 13 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

Turns out this segfault was caused by the recent changes to exception handling; we had just never tripped over it due to other partcl-kills.

t/cmd_break.t is now passing in partcl trunk, and I'm tracking down the remaining failures; hopefully this is the root cause of most of them.

(now, this shouldn't segfault parrot. If we're tripping the same exception handler N times, we probably want the same error you'd get when you exceed parrot's recursion limit, but...)

Closing ticket.

Note: See TracTickets for help on using tickets.