PL/Perl?

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PL/Perl?
Date: 2002-08-05 22:01:03
Message-ID: 1028584864.410.57.camel@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I upgraded PostgreSQL to 7.2.1 from a 7.2beta (yeah, I know). One of my
users requested plperl, so I got it to createlang, but it SIGSEGV's on
any simple perl.

The compile gives:

plperl_installdir='$(DESTDIR)/usr/local/pgsql/lib' \
/usr/bin/perl Makefile.PL INC='-I. -I../../../src/include -I/usr/local/include'
Writing Makefile for plperl
gmake -f Makefile all VPATH=
gmake[1]: Entering directory `/home/ler/pg-prod/postgresql-7.2.1/src/pl/plperl'
cc -c -I. -I../../../src/include -I/usr/local/include -I/usr/local/include -O -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -Kpic -I/usr/local/lib/perl5/5.6.1/i386-svr5/CORE plperl.c
UX:acomp: WARNING: "/usr/local/lib/perl5/5.6.1/i386-svr5/CORE/perl.h", line 469: macro redefined: USE_LOCALE
UX:acomp: WARNING: "/usr/local/lib/perl5/5.6.1/i386-svr5/CORE/perl.h", line 2155: macro redefined: DEBUG
UX:acomp: WARNING: "plperl.c", line 244: syntax error: empty declaration
cc -c -I. -I../../../src/include -I/usr/local/include -I/usr/local/include -O -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -Kpic -I/usr/local/lib/perl5/5.6.1/i386-svr5/CORE eloglvl.c
/usr/bin/perl -I/usr/local/lib/perl5/5.6.1/i386-svr5 -I/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.6.1/ExtUtils/typemap SPI.xs > SPI.c
cc -c -I. -I../../../src/include -I/usr/local/include -I/usr/local/include -O -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -Kpic -I/usr/local/lib/perl5/5.6.1/i386-svr5/CORE SPI.c
UX:acomp: WARNING: "/usr/local/lib/perl5/5.6.1/i386-svr5/CORE/perl.h", line 469: macro redefined: USE_LOCALE
UX:acomp: WARNING: "/usr/local/lib/perl5/5.6.1/i386-svr5/CORE/perl.h", line 2155: macro redefined: DEBUG
UX:acomp: WARNING: "SPI.c", line 73: end-of-loop code not reached
UX:acomp: WARNING: "SPI.c", line 88: end-of-loop code not reached
UX:acomp: WARNING: "SPI.c", line 103: end-of-loop code not reached
UX:acomp: WARNING: "SPI.c", line 118: end-of-loop code not reached
UX:acomp: WARNING: "SPI.c", line 133: end-of-loop code not reached
Running Mkbootstrap for plperl ()
chmod 644 plperl.bs
rm -f blib/arch/auto/plperl/plperl.so
LD_RUN_PATH="" cc -G -Wl,-Bexport -L/usr/local/lib -L/usr/gnu/lib plperl.o eloglvl.o SPI.o -L/usr/local/lib -L/usr/gnu/lib /usr/local/lib/perl5/5.6.1/i386-svr5/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.6.1/i386-svr5/CORE -lperl -lsocket -lnsl -ldl -lld -lm -lcrypt -lutil -o blib/arch/auto/plperl/plperl.so
chmod 755 blib/arch/auto/plperl/plperl.so
cp plperl.bs blib/arch/auto/plperl/plperl.bs
chmod 644 blib/arch/auto/plperl/plperl.bs
gmake[1]: Leaving directory `/home/ler/pg-prod/postgresql-7.2.1/src/pl/plperl'

and any run gives the following backtrace:
$ debug -ic -c core.16991 /usr/local/pgsql/bin/postgres
Warning: No debugging information in /usr/local/pgsql/bin/postgres
Core image of postgres (process p1) created
CORE FILE [Perl_hv_fetch in hv.c]
SIGNALED 11 (segv code[SEGV_MAPERR] address[0x20202020]) in p1
0xa7cc306e (Perl_hv_fetc+126:) cmpl $0,(%eax)
debug> stack
Stack Trace for p1, Program postgres
*[0] Perl_hv_fetch(0x8431d54, 0xbfffd090, 0x4, 0x2, 0xbfffd090,
0xa7d217d8, 0x2) [0xa7cc306e]
[1] Perl_gv_fetchpv(presumed: 0xa7d217d8, 0x2, 0xb) [0xa7c81675]
[2] S_init_main_stash(presumed: 0xbfffd4a4, 0xa7d34924, 0)
[0xa7c7c8df]
[3] S_parse_body(0, 0xa7d3ab70) [0xa7c79556]
[4] perl_parse(presumed: 0x8431c08, 0xa7d3ab70, 0x3) [0xa7c79370]
[5] plperl_init_interp(presumed: 0xa7d3e25c, 0x8427a7c, 0xa7d3a77d)
[0xa7d3a711]
[6] plperl_init_all(presumed: 0, 0x8427cb4, 0x8427a7c) [0xa7d3a689]
[7] plperl_call_handler(presumed: 0xbfffd51c, 0x8427a7c, 0x8427cb4)
[0xa7d3a778]
[8] ExecMakeFunctionResult(0x8427cb4, 0, 0x8427a7c, 0xbfffd7ab,
0xbfffd610) [0x80e813d]
[9] ExecEvalFunc(presumed: 0x8427834, 0x8427a7c, 0xbfffd7ab)
[0x80e8276]
[10] ExecEvalExpr(presumed: 0x8427834, 0x8427a7c, 0xbfffd7ab)
[0x80e7000]
[11] ExecTargetList(presumed: 0x84278b8, 0x1, 0x8427ac8)
[0x80e8a83]
[12] ExecProject(presumed: 0x84278d4, 0xbfffd80c, 0x842792c)
[0x80e8db8]
[13] ExecResult(presumed: 0x842792c, 0x84279d4, 0x84279d4)
[0x80eedcc]
[14] ExecProcNode(presumed: 0x842792c, 0, 0x842792c) [0x80e6b3d]
[15] ExecutePlan(presumed: 0x84279d4, 0x842792c, 0x1) [0x80e4d06]
[16] ExecutorRun(0x84279b8, 0x84279d4, 0x3, 0) [0x80e5387]
[17] ProcessQuery(presumed: 0x841943c, 0x842792c, 0x2) [0x8140d02]
[18] pg_exec_query_string(0x8419108, 0x2, 0x83cf7a4, 0x8419108)
[0x813f354]
[19] PostgresMain(0x4, 0xbfffdb38, 0x83cb8e9) [0x8140117]
[20] DoBackend(0x83cb7b8, 0x8378aa8) [0x811f3e3]
[21] BackendStartup(presumed: 0x83cb7b8, 0x8317384, 0xffff1538)
[0x811eaa6]
[22] ServerLoop(presumed: 0xbfffee04, 0x1f, 0x8378a10) [0x811e8aa]
[23] PostmasterMain(presumed: 0x2, 0x8378a10, 0xbfffedf8)
[0x811da7a]
[24] main(0x2, 0xbfffee04, 0xbfffee10) [0x80f9b58]
[25] _start() [0x8067e6c]
debug>

Any ideas?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-08-05 23:08:40 Re: FUNC_MAX_ARGS benchmarks
Previous Message Tom Lane 2002-08-05 21:31:03 Re: FUNC_MAX_ARGS benchmarks