[Zope-Perl] SegFault on `import perl'
Alexander Klimov
ask@wisdom.weizmann.ac.il
Wed, 14 Feb 2001 13:20:56 +0200 (IST)
Hi.
I built two additional perls. First with usemymalloc=n, i.e. use native
malloc:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
uname='sunos iridium 5.6 generic_105181-20 sun4u sparc sunw,ultra-5_10
'
config_args='-des -Dprefix=/usr/local/thrshmlcperl -Uusemymalloc
-Dusethreads -Duseshrplib -DDEBUGGING -Doptimize=-g -O3 -Dcc=gcc'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-g -O3', gccversion=2.95.2 19991024 (release)
cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include'
ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lposix4 -lpthread -lc -lsec
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R
/usr/local/thrshmlcperl/lib/5.6.0/sun4-solaris-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under solaris
Compiled at Feb 14 2001 12:24:51
@INC:
/usr/local/thrshmlcperl/lib/5.6.0/sun4-solaris-thread-multi
/usr/local/thrshmlcperl/lib/5.6.0
/usr/local/thrshmlcperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi
/usr/local/thrshmlcperl/lib/site_perl/5.6.0
/usr/local/thrshmlcperl/lib/site_perl
.
Now things much better (sigfault not on `import perl'), but
> python test.py
apply.py Segmentation Fault
............ failed
basic.py ............ ok
defined.py .......... ok
eval.py ............. ok
hashop.py ........... ok
import.py Segmentation Fault
...........Traceback (most recent call last):
File "test.py", line 58, in ?
File "test.py", line 43, in test_ok
UnboundLocalError: Local variable 'expect_next' referenced before
assignment
> python apply.py
1..14
Segmentation Fault (core dumped)
python import.py
1..5
2.0 (#1, Jan 25 2001, 13:09:30)
[GCC 2.95.2 19991024 (release)]
ok 1
ok 2
ok 3
Segmentation Fault (core dumped)
For both core dumps I get:
(gdb) where
#0 0xef424734 in strlen () from /usr/lib/libc.so.1
#1 0xef273258 in Perl_vmess (my_perl=0xef490, pat=0x0,
args=0xefffedd4) at util.c:1448
#2 0xef273a70 in Perl_vcroak (my_perl=0xef490, pat=0x0,
args=0xefffedd4) at util.c:1583
#3 0xef274020 in Perl_croak (my_perl=0x0, pat=0x172ff8 "") at util.c:1649
The second perl I build use its malloc, and also multithreaded:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
uname='sunos iridium 5.6 generic_105181-20 sun4u sparc sunw,ultra-5_10
'
config_args='-des -Dprefix=/usr/local/thrperl -Dusethreads -DDEBUGGING
-Doptimize=-O3 -Dcc=gcc'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O3', gccversion=2.95.2 19991024 (release)
cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include'
ccflags ='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lposix4 -lpthread -lc -lsec
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under solaris
Compiled at Feb 14 2001 11:03:23
@INC:
/usr/local/thrperl/lib/5.6.0/sun4-solaris-thread-multi
/usr/local/thrperl/lib/5.6.0
/usr/local/thrperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi
/usr/local/thrperl/lib/site_perl/5.6.0
/usr/local/thrperl/lib/site_perl
.
Now:
> python apply.py
1..14
Segmentation Fault (core dumped)
(gdb) where
#0 0xef424734 in strlen () from /usr/lib/libc.so.1
#1 0xef3309dc in Perl_vmess () from
/usr/local/lib/python2.0/site-packages/perl2.so
#2 0xef331084 in Perl_vcroak () from
/usr/local/lib/python2.0/site-packages/perl2.so
#3 0xef331500 in Perl_croak () from
/usr/local/lib/python2.0/site-packages/perl2.so
#4 0xef3d456c in croak_on_py_exception ()
from
/usr/local/thrperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi/auto/Python/Object/Object.so
#5 0xef3d9214 in XS_Python_PyEval_CallObjectWithKeywords ()
from
/usr/local/thrperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi/auto/Python/Object/Object.so
#6 0xef345a38 in Perl_pp_entersub () from
/usr/local/lib/python2.0/site-packages/perl2.so
#7 0xef33f52c in Perl_runops_standard () from
/usr/local/lib/python2.0/site-packages/perl2.so
#8 0xef2f4928 in S_call_body () from
/usr/local/lib/python2.0/site-packages/perl2.so
#9 0xef2f1168 in Perl_call_sv () from
/usr/local/lib/python2.0/site-packages/perl2.so
#10 0xef2e8940 in call_perl (method=0x0, obj=0x1, gimme=0, args=0xcb4a8,
keywds=0x0) at perlmodule.c:228
#11 0xef2ec1a0 in pysvrv_call (self=0x107008, arg=0xcb49c, kw=0x0) at
svrv_object.c:1342
#12 0x24d6c in PyEval_CallObjectWithKeywords (func=0x107008, arg=0xcb49c,
kw=0x0) at ceval.c:2614
#13 0x23704 in eval_code2 (co=0xe03d8, globals=0x0, locals=0xf062f,
args=0x107008, argcount=792428, kws=0x0, kwcount=0,
defs=0x0, defcount=0, owner=0x0) at ceval.c:1951
#14 0x20790 in PyEval_EvalCode (co=0xe03d8, globals=0xc1734,
locals=0xc1734) at ceval.c:319
#15 0x38528 in run_node (n=0xb62e8, filename=0xe03d8 "", globals=0xc1734,
locals=0xc1734) at pythonrun.c:886
#16 0x384d8 in run_err_node (n=0xb62e8, filename=0xe03d8 "",
globals=0xc1734, locals=0xc1734) at pythonrun.c:874
#17 0x384ac in PyRun_FileEx (fp=0xb5bd0, filename=0xeffff84f "apply.py",
start=746216, globals=0xc1734, locals=0xc1734,
closeit=1) at pythonrun.c:866
#18 0x3794c in PyRun_SimpleFileEx (fp=0xb5bd0, filename=0xeffff84f
"apply.py", closeit=1) at pythonrun.c:579
#19 0x374f8 in PyRun_AnyFileEx (fp=0xb5bd0, filename=0xeffff84f
"apply.py", closeit=1) at pythonrun.c:459
#20 0x1cc88 in Py_Main (argc=2, argv=0xeffff734) at main.c:289
#21 0x1c608 in main (argc=2, argv=0xeffff734) at ccpython.cc:10
> python import.py
1..5
2.0 (#1, Jan 25 2001, 13:09:30)
[GCC 2.95.2 19991024 (release)]
ok 1
ok 2
ok 3
Segmentation Fault (core dumped)
(gdb) where
#0 0xef424734 in strlen () from /usr/lib/libc.so.1
#1 0xef3309dc in Perl_vmess () from
/usr/local/lib/python2.0/site-packages/perl2.so
#2 0xef331084 in Perl_vcroak () from
/usr/local/lib/python2.0/site-packages/perl2.so
#3 0xef331500 in Perl_croak () from
/usr/local/lib/python2.0/site-packages/perl2.so
#4 0xef3d456c in croak_on_py_exception ()
from
/usr/local/thrperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi/auto/Python/Object/Object.so
#5 0xef3d9528 in XS_Python_PyImport_ImportModule ()
from
/usr/local/thrperl/lib/site_perl/5.6.0/sun4-solaris-thread-multi/auto/Python/Object/Object.so
#6 0xef345a38 in Perl_pp_entersub () from
/usr/local/lib/python2.0/site-packages/perl2.so
#7 0xef33f52c in Perl_runops_standard () from
/usr/local/lib/python2.0/site-packages/perl2.so
#8 0xef2f1594 in Perl_eval_sv () from
/usr/local/lib/python2.0/site-packages/perl2.so
#9 0xef2f1784 in Perl_eval_pv () from
/usr/local/lib/python2.0/site-packages/perl2.so
#10 0xef2e9090 in eval (self=0x0, args=0xc804c) at perlmodule.c:454
#11 0x24ef0 in call_builtin (func=0xc2ef8, arg=0xc804c, kw=0x0) at
ceval.c:2650
#12 0x24dbc in PyEval_CallObjectWithKeywords (func=0xc2ef8, arg=0xc804c,
kw=0x0) at ceval.c:2618
#13 0x23704 in eval_code2 (co=0xe04e0, globals=0x0, locals=0xf062d,
args=0xc2ef8, argcount=793664, kws=0x0, kwcount=0,
defs=0x0, defcount=0, owner=0x0) at ceval.c:1951
#14 0x20790 in PyEval_EvalCode (co=0xe04e0, globals=0xc1734,
locals=0xc1734) at ceval.c:319
#15 0x38528 in run_node (n=0xb62e8, filename=0xe04e0 "", globals=0xc1734,
locals=0xc1734) at pythonrun.c:886
#16 0x384d8 in run_err_node (n=0xb62e8, filename=0xe04e0 "",
globals=0xc1734, locals=0xc1734) at pythonrun.c:874
#17 0x384ac in PyRun_FileEx (fp=0xb5bd0, filename=0xeffff84f "import.py",
start=746216, globals=0xc1734,
locals=0xc1734, closeit=1) at pythonrun.c:866
#18 0x3794c in PyRun_SimpleFileEx (fp=0xb5bd0, filename=0xeffff84f
"import.py", closeit=1) at pythonrun.c:579
#19 0x374f8 in PyRun_AnyFileEx (fp=0xb5bd0, filename=0xeffff84f
"import.py", closeit=1) at pythonrun.c:459
#20 0x1cc88 in Py_Main (argc=2, argv=0xeffff734) at main.c:289
#21 0x1c608 in main (argc=2, argv=0xeffff734) at ccpython.cc:10
So, the question is in which combination it actually works :-)
Regards,
ASK