leto / plparrot

Embed Parrot+Rakudo into PostgreSQL
http://pl.parrot.org
Artistic License 2.0
27 stars 5 forks source link

crash on Linux with pgsql HEAD and parrot-2.3.0/2.4.0 #27

Closed umitanuki closed 14 years ago

umitanuki commented 14 years ago

plparrot crashes on CREATE FUNCTION handler.

Occurs in plparrot github HEAD with parrot-2.3.0 and parrot-2.4.0 and pgsql CVS HEAD in ./configure CFLAGS= --enable-debug --enable-cassert

Linux CentOS 5.4 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)

regression=# CREATE FUNCTION plparrotu_call_handler () RETURNS language_handler AS '$libdir/plparrot' LANGUAGE C;

=== parrot-2.4.0 (gdb) c Continuing. warning: .dynamic section for "/lib/librt.so.1" is not at the expected address warning: difference appears to be caused by prelink, adjusting expectations [Thread debugging using libthread_db enabled] [New Thread 0xb7f578d0 (LWP 24524)]

Program received signal SIGABRT, Aborted. 0x0027f402 in __kernel_vsyscall () (gdb) bt

0 0x0027f402 in __kernel_vsyscall ()

1 0x0095cdf0 in raise () from /lib/libc.so.6

2 0x0095e701 in abort () from /lib/libc.so.6

3 0x00c6048f in Parrot_confess (cond=0xdc4db3 "sub_pmc",

file=0xdc4d6c "src/extend.c", line=1049) at src/exceptions.c:558

4 0x00c6318e in Parrot_ext_call (interp=0x91e1248, sub_pmc=0x0,

signature=0x1228b7 "->") at src/extend.c:1049

5 0x0011cd89 in plparrot_secure (interp=0x91e1248) at plparrot.c:357

6 0x0011c3a4 in _PG_init () at plparrot.c:129

7 0x083d5b7f in internal_load_library (

libname=0x90e2f80 "/home/forcia/build/pgsql/lib/plparrot.so")
at dfmgr.c:284

8 0x083d55da in load_external_function (

filename=0x90e32c8 "$libdir/plparrot", 
funcname=0x90e3ac8 "plparrotu_call_handler", signalNotFound=1 '\001', 
filehandle=0xbffc764c) at dfmgr.c:113

9 0x08135786 in fmgr_c_validator (fcinfo=0xbffc7694) at pg_proc.c:738

10 0x083d91b3 in OidFunctionCall1 (functionId=2247, arg1=98349) at fmgr.c:1557

11 0x081353f9 in ProcedureCreate (

procedureName=0x913e3a4 "plparrotu_call_handler", procNamespace=2200, 
replace=0 '\0', returnsSet=0 '\0', returnType=2280, languageObjectId=13, 
languageValidator=2247, prosrc=0x913e3a4 "plparrotu_call_handler", 
probin=0x913e4b0 "$libdir/plparrot", isAgg=0 '\0', isWindowFunc=0 '\0', 

=== parrot-2.3.0 Program received signal SIGABRT, Aborted. 0x0027f402 in __kernel_vsyscall () (gdb) bt

0 0x0027f402 in __kernel_vsyscall ()

1 0x0095cdf0 in raise () from /lib/libc.so.6

2 0x0095e701 in abort () from /lib/libc.so.6

3 0x00479e1f in Parrot_confess (cond=0x69da28 "dir",

file=0x69d9e4 "src/packfile.c", line=1201) at src/exceptions.c:558

4 0x004cbcfe in PackFile_add_segment (interp=0x91e0fd8, dir=0x0,

seg=0x925a9f0) at src/packfile.c:1201

5 0x004d1d55 in PackFile_append_pbc (interp=0x91e0fd8,

filename=0x925a948 "/home/forcia/build//parrot/lib/2.3.0/library/P6object.pbc") at src/packfile.c:4832

6 0x004d1ea2 in compile_or_load_file (interp=0x91e0fd8, path=0x921a1f0,

file_type=PARROT_RUNTIME_FT_PBC) at src/packfile.c:4704

7 0x004d21c6 in Parrot_load_bytecode (interp=0x91e0fd8, file_str=0x9246b08)

at src/packfile.c:4901

8 0x00367d3a in plparrot_secure (interp=0x91e0fd8) at plparrot.c:354

9 0x003673a4 in _PG_init () at plparrot.c:129

10 0x083d5b7f in internal_load_library (

libname=0x90e2f80 "/home/forcia/build/pgsql/lib/plparrot.so")
at dfmgr.c:284

11 0x083d55da in load_external_function (

filename=0x90e32c8 "$libdir/plparrot", 
funcname=0x90e3ac8 "plparrotu_call_handler", signalNotFound=1 '\001', 
filehandle=0xbffc764c) at dfmgr.c:113
leto commented 14 years ago

sub_pmc=0x0 is the issue. That means that some PIR code did not compile, most probably.

leto commented 14 years ago

I think this issue does not occur in the master branch currently. If it does, please submit a new issue. Thanks!