Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Segmentation fault in DB_File with perl-5.8.6 gcc-3.3.2 #7711

Closed p5pRT closed 19 years ago

p5pRT commented 19 years ago

Migrated from rt.perl.org#33054 (status was 'resolved')

Searchable as RT33054$

p5pRT commented 19 years ago

From Robin.Barker@npl.co.uk

Created by Robin.Barker@npl.co.uk

I recently "upgraded" gcc from 3.3 to 3.3.2 - now DB_File does not work.

5 tests fail in the test suite - all involving DB_File ext/DB_File/t/db-btree.t ext/DB_File/t/db-hash.t ext/DB_File/t/db-recno.t lib/Memoize/t/errors.t lib/Memoize/t/tie.t

More simply​: % ./perl -Ilib -MDB_File -e1 Segmentation fault

perl-5.8.6 compiled and passed all tests with gcc 3.3

Perl Info ``` Flags: category=library severity=medium Site configuration information for perl v5.8.6: Configured by rmb1 at Wed Dec 15 16:08:39 GMT 2004. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos tempest 5.7 generic_106541-04 sun4u sparc sunw,ultra-5_10 ' config_args='-des -Dprefix=/usr/local/perl -Dcc=gcc' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.3.2', gccosandvers='solaris2.7' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 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, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib' Locally applied patches: @INC for perl v5.8.6: lib /usr/local/perl/lib/5.8.6/sun4-solaris /usr/local/perl/lib/5.8.6 /usr/local/perl/lib/site_perl/5.8.6/sun4-solaris /usr/local/perl/lib/site_perl/5.8.6 /usr/local/perl/lib/site_perl . Environment for perl v5.8.6: HOME=/home/rmb1 LANG=C LANGUAGE (unset) LD_LIBRARY_PATH=/usr/lib LOGDIR (unset) PATH=/home/rmb1/appl/script:/opt/SUNWspci/bin/:/usr/tempest/bin:/usr/local/bin:/usr/local/Admigration/exec:/usr/local/hotjava/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/bin PERL5LIB=/home/rmb1/appl/lib/perl5/5.8.6:/home/rmb1/appl/lib/perl5/site_perl PERLDOC=-n 'groff -Tlatin1' PERL_BADLANG (unset) SHELL=/usr/bin/tcsh ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. ------------------------------------------------------------------- ```
p5pRT commented 19 years ago

From Robin.Barker@npl.co.uk

Created by Robin.Barker@npl.co.uk

I recently "upgraded" gcc from 3.3 to 3.3.2 - now DB_File does not work.

5 tests fail in the test suite - all involving DB_File ext/DB_File/t/db-btree.t ext/DB_File/t/db-hash.t ext/DB_File/t/db-recno.t lib/Memoize/t/errors.t lib/Memoize/t/tie.t

More simply​: % ./perl -Ilib -MDB_File -e1 Segmentation fault

perl-5.8.6 compiled and passed all tests with gcc 3.3

Perl Info ``` Flags: category=library severity=medium Site configuration information for perl v5.8.6: Configured by rmb1 at Wed Dec 15 16:08:39 GMT 2004. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos tempest 5.7 generic_106541-04 sun4u sparc sunw,ultra-5_10 ' config_args='-des -Dprefix=/usr/local/perl -Dcc=gcc' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.3.2', gccosandvers='solaris2.7' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 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, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib' Locally applied patches: @INC for perl v5.8.6: lib /usr/local/perl/lib/5.8.6/sun4-solaris /usr/local/perl/lib/5.8.6 /usr/local/perl/lib/site_perl/5.8.6/sun4-solaris /usr/local/perl/lib/site_perl/5.8.6 /usr/local/perl/lib/site_perl . Environment for perl v5.8.6: HOME=/home/rmb1 LANG=C LANGUAGE (unset) LD_LIBRARY_PATH=/usr/lib LOGDIR (unset) PATH=/home/rmb1/appl/script:/opt/SUNWspci/bin/:/usr/tempest/bin:/usr/local/bin:/usr/local/Admigration/exec:/usr/local/hotjava/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/bin PERL5LIB=/home/rmb1/appl/lib/perl5/5.8.6:/home/rmb1/appl/lib/perl5/site_perl PERLDOC=-n 'groff -Tlatin1' PERL_BADLANG (unset) SHELL=/usr/bin/tcsh ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. ------------------------------------------------------------------- ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. ------------------------------------------------------------------- ```
p5pRT commented 19 years ago

From Robin.Barker@npl.co.uk

Paul Cc​: porters

I tried compiling db-3.1.17 with gcc-3.4.3 and then compiling perl-5.8.6 with the same gcc. I had problems getting the perl configuration/compilation to see and link to the db library\, and then\, when I did\, I got a segmentation fault with the same (or similar) back trace.

I then tried to build another XS extension and had more linking problems.

My conclusion is that the fault is with my build of gcc-3.4.3 not with db or DB_File.

I have given up and reinstalled gcc-3.3 and am rebuilding perl-5.8.6 with that. So it will be difficult for me to do further investigation of gcc-3.3.2+ or -3.4+

Robin

-----Original Message----- From​: Paul Marquess [mailto​:paul.marquess@​ntlworld.com] Sent​: 01 February 2005 17​:39 To​: 'Robin Barker' Subject​: RE​: [perl #33054] Segmentation fault in DB_File with perl-5.8.6 gcc-3.3.2

Hmmm\, not sure about mixing'n'matching gcc. Any chance you could try building both with the same gcc?

Paul

-----Original Message----- From​: Robin Barker [mailto​:Robin.Barker@​npl.co.uk] Sent​: 01 February 2005 17​:33 To​: 'paul.marquess@​ntlworld.com' Subject​: RE​: [perl #33054] Segmentation fault in DB_File with perl-5.8.6 gcc-3.3.2

Paul

I've been building perl with 64-bit and db since I first compiled db- 3.1.17 (in 2000).

I successfully built perl-5.8.6 with 64-bit and db-3.1.17 using gcc-3.3 I successfully built perl-5.8.6 with 64-bit and db-4.3.27 using gcc-3.4.3

So I guess there is some incompatibility between the perl build using newer gcc and db built with an older gcc.

Robin

------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee\, you must not use\, retain or disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No​: 2937881 Registered Office​: Teddington\, Middlesex\, United Kingdom TW11 0LW. -------------------------------------------------------------------


This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee\, you must not use\, retain or disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No​: 2937881 Registered Office​: Teddington\, Middlesex\, United Kingdom TW11 0LW.


p5pRT commented 19 years ago

From @smpeters

[Robin.Barker@​npl.co.uk - Thu Feb 03 06​:21​:49 2005]​:

Paul Cc​: porters

I tried compiling db-3.1.17 with gcc-3.4.3 and then compiling perl- 5.8.6 with the same gcc. I had problems getting the perl configuration/compilation to see and link to the db library\, and then\, when I did\, I got a segmentation fault with the same (or similar) back trace.

I then tried to build another XS extension and had more linking problems.

My conclusion is that the fault is with my build of gcc-3.4.3 not with db or DB_File.

I have given up and reinstalled gcc-3.3 and am rebuilding perl-5.8.6 with that. So it will be difficult for me to do further investigation of gcc- 3.3.2+ or -3.4+

Robin

-----Original Message----- From​: Paul Marquess [mailto​:paul.marquess@​ntlworld.com] Sent​: 01 February 2005 17​:39 To​: 'Robin Barker' Subject​: RE​: [perl #33054] Segmentation fault in DB_File with perl- 5.8.6 gcc-3.3.2

Hmmm\, not sure about mixing'n'matching gcc. Any chance you could try building both with the same gcc?

Paul

-----Original Message----- From​: Robin Barker [mailto​:Robin.Barker@​npl.co.uk] Sent​: 01 February 2005 17​:33 To​: 'paul.marquess@​ntlworld.com' Subject​: RE​: [perl #33054] Segmentation fault in DB_File with perl- 5.8.6 gcc-3.3.2

Paul

I've been building perl with 64-bit and db since I first compiled db- 3.1.17 (in 2000).

I successfully built perl-5.8.6 with 64-bit and db-3.1.17 using gcc- 3.3 I successfully built perl-5.8.6 with 64-bit and db-4.3.27 using gcc- 3.4.3

So I guess there is some incompatibility between the perl build using newer gcc and db built with an older gcc.

I'm running against a current blead on OpenBSD compiled with gcc-2.9.5 and I SEGFAULT as well. The e>rror I get is​:

perl -Ilib -MDB_File -e1 perl​:/home/steve/perl-current/lib/auto/Fcntl/Fcntl.so​: undefined symbol 'Perl_Tstack_sp_ptr' lazy binding failed! Segmentation fault (core dumped)

p5pRT commented 19 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 19 years ago

From @smpeters

I'm running against a current blead on OpenBSD compiled with gcc-2.9.5 and I SEGFAULT as well. The e>rror I get is​:

perl -Ilib -MDB_File -e1 perl​:/home/steve/perl-current/lib/auto/Fcntl/Fcntl.so​: undefined symbol 'Perl_Tstack_sp_ptr' lazy binding failed! Segmentation fault (core dumped)

...but it is fixed on OpenBSD 3.7. Ticket resolved.

p5pRT commented 19 years ago

@smpeters - Status changed from 'open' to 'resolved'