On Apr 29, 2007, at 12:55 PM, Allison Randal via RT wrote:

Joshua Isom (via RT) wrote:

My current svn repository uses a patch that I sent to the list about a
week ago, in which the pge tests would run with gc on if the file
DEVELOPING existed.  Since I updated to over 18323,
t/compilers/pge/p5regex/p5rx.t segfaults after test 553.  The
current_cont in the interp's ctx is null, and results in a segfault
inside of set_returns. It doesn't happen on my darwin-ppc system, so I
don't know how specific it is, and if rebooting will fix it(as often
happens with the gc bugs in my experience).  But it is failing on my
freebsd-amd64 system. Since odds are r18323 just exposed a bug instead of adding one, maybe other people will get the crash as well. You will
have to remove -G in t/compilers/pge/p5regex.t/p5rx.t to get it to
fail, as with -G it succeeds(and with -t too).

I can't duplicate the error on darwin-intel or ubuntu-x86. Could be
specific to FreeBSD (which might help us pin it down further).

I've learned a lot lately about how to use gdb, and all I've come to
learn is that if
interp->ctx.state->current_cont->obj.u._ptrs._struct_val is null,
parrot isn't happy, of course that's with macro expansion, and that
getting the level of debugging information I'd like to be able to write
little tools to process an analyze it better isn't easy.

Could you send us a stack trace? (gdb command bt) Also, if you haven't
already, try a make realclean (we've made some significant fundamental
changes recently).

Thanks!
Allison



I've done realclean a few times actually. If I run with r18322, it runs just fine, but r18323, which dealt with zero length mallocs for strings, caused it to start crashing. Here's a backtrace. This is one of those tests where with -G it succeeds, so you'll have to make sure that gc is enabled. I'm not having any trouble on my darwin/ppc machine, but my only two running platforms are darwin/ppc and freebsd/amd64.


[freebsd:~/parrot] jisom% gdb parrot parrot.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `parrot'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/home/jisom/parrot/blib/lib/libparrot.so.0.4.11...done.
Loaded symbols for /usr/home/jisom/parrot/blib/lib/libparrot.so.0.4.11
Reading symbols from /lib/libpthread.so.2...done.
Loaded symbols for /lib/libpthread.so.2
Reading symbols from /usr/local/lib/libicuuc.so.36...done.
Loaded symbols for /usr/local/lib/libicuuc.so.36
Reading symbols from /usr/local/lib/libicudata.so.36...done.
Loaded symbols for /usr/local/lib/libicudata.so.36
Reading symbols from /lib/libm.so.4...done.
Loaded symbols for /lib/libm.so.4
Reading symbols from /lib/libcrypt.so.3...done.
Loaded symbols for /lib/libcrypt.so.3
Reading symbols from /lib/libutil.so.5...done.
Loaded symbols for /lib/libutil.so.5
Reading symbols from /usr/local/lib/libgmp.so.7...done.
Loaded symbols for /usr/local/lib/libgmp.so.7
Reading symbols from /lib/libreadline.so.6...done.
Loaded symbols for /lib/libreadline.so.6
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libncurses.so.6...done.
Loaded symbols for /lib/libncurses.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x0000000800c0589c in pthread_testcancel () from /lib/libpthread.so.2
[New Thread 0x8cbc00 (runnable)]
[New Thread 0x8cb800 (sleeping)]
[New Thread 0x8cb400 (LWP 100057)]
[New Thread 0x512000 (runnable)]
[New LWP 100086]
(gdb) bt
#0 0x0000000800c0589c in pthread_testcancel () from /lib/libpthread.so.2
#1  0x0000000800bf4100 in sigaction () from /lib/libpthread.so.2
#2 0x0000000800bfe09a in pthread_mutexattr_init () from /lib/libpthread.so.2
#3  0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffffbff000
(gdb) quit
[freebsd:~/parrot] jisom% gdb parrot
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run t/compilers/pge/p5regex/p5rx.t
Starting program: /usr/home/jisom/parrot/parrot t/compilers/pge/p5regex/p5rx.t warning: Unable to get location for thread creation breakpoint: generic error
[New LWP 100086]
1..960
ok 1 - [re_tests:1] /abc/
...really long list of tests...
ok 553 - [re_tests:553] /([\w:]+::)?(\w+)$/
[New Thread 0x512000 (LWP 100063)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x512000 (LWP 100063)]
0x00000008007a9312 in Parrot_set_returns_pc (cur_opcode=0x800540640,
    interp=0x50a400) at core.ops:567
567         if (PMC_cont(ccont)->address) {
(gdb) bt
#0  0x00000008007a9312 in Parrot_set_returns_pc (cur_opcode=0x800540640,
    interp=0x50a400) at core.ops:567
#1 0x000000080088502f in runops_slow_core (interp=0x50a400, pc=0x800540640)
    at src/runops_cores.c:184
#2  0x000000080086bea5 in runops_int (interp=0x50a400, offset=0)
    at src/interpreter.c:775
#3  0x00000008008727a0 in runops (interp=0x50a400, offs=0)
    at src/inter_run.c:88
#4  0x0000000800872a23 in runops_args (interp=0x50a400, sub=0x8c5ea8,
    obj=0x5c98c0, meth=0x0, sig=0x8009ca02a "vP", ap=0x7fffffffe8b0)
    at src/inter_run.c:202
#5  0x0000000800872bf9 in Parrot_runops_fromc_args (interp=0x50a400,
    sub=0x8c5ea8, sig=0x8009ca02a "vP") at src/inter_run.c:304
#6  0x0000000800892c65 in Parrot_runcode (interp=0x50a400, argc=1,
    argv=0x7fffffffeb50) at src/embed.c:803
#7  0x000000080099d6ac in imcc_run_pbc (interp=0x50a400, obj_file=0,
output_file=0x0, argc=1, argv=0x7fffffffeb50) at compilers/imcc/main.c:563
#8  0x000000080099dede in imcc_run (interp=0x50a400,
    sourcefile=0x7fffffffed46 "t/compilers/pge/p5regex/p5rx.t", argc=1,
    argv=0x7fffffffeb50) at compilers/imcc/main.c:759
#9 0x0000000000400bc6 in main (argc=1, argv=0x7fffffffeb50) at src/main.c:61
(gdb)

Reply via email to