develooper Front page | perl.perl5.porters | Postings from March 2003

[perl #21724] segfault in 5.8.0's PerlIOStdio_close

From:
Stas Bekman
Date:
March 27, 2003 19:17
Subject:
[perl #21724] segfault in 5.8.0's PerlIOStdio_close
Message ID:
rt-21724-54186.4.89248295295468@bugs6.perl.org
# New Ticket Created by  Stas Bekman 
# Please include the string:  [perl #21724]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21724 >



This is a bug report for perl from stas@stason.org,
generated with the help of perlbug 1.34 running under perl v5.8.0.


-----------------------------------------------------------------
[Please enter your report here]

Running the 5.8.0 perl bundled with mandrake-8.0.

% /usr/bin/cpan

Your configuration suggests "/root/.cpan" as your
CPAN.pm working directory. I could not create this directory due
to this error: mkdir /root/.cpan: Permission denied at
/usr/lib/perl5/5.8.0/CPAN.pm line 530

Please make sure the directory exists and is writable.

Segmentation fault (core dumped)

#0  0x40189092 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
#1  0x4018b922 in flockfile () from /lib/i686/libpthread.so.0
#2  0x42062278 in fclose () from /lib/i686/libc.so.6
#3  0x40109fb8 in PerlIOStdio_close ()
    from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#4  0x401077b0 in PerlIO_cleantable ()
    from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#5  0x40109778 in PerlIO_cleanup ()
    from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#6  0x400345cd in perl_destruct ()
    from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#7  0x08049191 in main ()
#8  0x42015b17 in __libc_start_main () from /lib/i686/libc.so.6

I've tried to reproduce with another 5.8.0 that I have installed on the
same system, which was built with DEBUGGING enabled, so I could get a better
trace, but I can't reproduce it with that version. The difference seems to
be in the optimization flags:

the segfaulting build has:
    config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3
   -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
   -fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr
   -Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost
   -Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads'
     optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
   -ffast-math -fno-strength-reduce',
   Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
    PERL_IMPLICIT_CONTEXT

the non-segfaulting build has:
     config_args='-des -Dprefix=/home/stas/perl/5.8.0-ithread
    -Dusethreads -Doptimize=-g -Duseshrplib -Dusedevel'
     optimize='-g',
   Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
   USE_LARGE_FILES PERL_IMPLICIT_CONTEXT


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
     category=core
     severity=low
---
Site configuration information for perl v5.8.0:

Configured by pixel at Fri Sep  6 23:23:23 CEST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
   Platform:
     osname=linux, osvers=2.4.19-2mdkenterprise, archname=i386-linux-thread-multi
     uname='linux no.mandrakesoft.com 2.4.19-2mdkenterprise #1 smp tue aug 13 
00:17:42 cest 2002 i686 unknown unknown gnulinux '
     config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3 
-fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math 
-fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr 
-Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost 
-Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
     optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 
-ffast-math -fno-strength-reduce',
     cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing 
-I/usr/include/gdbm'
     ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-1mdk)', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='gcc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil
     perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
     libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
     gnulibc_version='2.2.5'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.0:
     /usr/lib/perl5/5.8.0/i386-linux-thread-multi
     /usr/lib/perl5/5.8.0
     /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
     /usr/lib/perl5/site_perl/5.8.0
     /usr/lib/perl5/site_perl/5.6.1
     /usr/lib/perl5/site_perl/5.6.0
     /usr/lib/perl5/site_perl
     /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
     /usr/lib/perl5/vendor_perl/5.8.0
     /usr/lib/perl5/vendor_perl
     .

---
Environment for perl v5.8.0:
     HOME=/home/stas
     LANG=en_US
     LANGUAGE=en_US:en
     LC_COLLATE=en_US
     LC_CTYPE=en_US
     LC_MESSAGES=en_US
     LC_MONETARY=en_US
     LC_NUMERIC=en_US
     LC_TIME=en_US
     LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/X11R6/lib/modules
     LOGDIR (unset)
 
PATH=/usr//bin:/bin:/usr/bin:.:/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/stas/bin:/home/stas/bin:/usr/local/bin:/usr/X11R6/bin:/usr/java/j2re1.4.0/bin/
     PERL_BADLANG (unset)
     SHELL=/bin/tcsh


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About