develooper Front page | perl.perl5.porters | Postings from December 2007

[perl #48248] perl thread Segmentation fault

Thread Next
From:
Vikulin Vitaly
Date:
December 6, 2007 05:07
Subject:
[perl #48248] perl thread Segmentation fault
Message ID:
rt-3.6.HEAD-28750-1196944409-513.48248-75-0@perl.org
# New Ticket Created by  Vikulin Vitaly 
# Please include the string:  [perl #48248]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=48248 >


This is a bug report for perl from vitus@ac-sw.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.


-----------------------------------------------------------------


perl Segmentation fault.

test:
#!/usr/bin/perl -w

use strict;
use threads;

use utf8;
use encoding "utf8", STDIN => "utf8", STDOUT => "utf8";

threads->create(sub {});

while( 1 ) {
  sleep 1;
}

execute:
./test.pl
Segmentation fault

end of strace log:
stat64("/etc/perl/PerlIO/encoding.pmc", 0xbfa6b7ac) = -1 ENOENT (No such
file or directory)
stat64("/etc/perl/PerlIO/encoding.pm", 0xbfa6b6bc) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/lib/perl/5.8.8/PerlIO/encoding.pmc", 0xbfa6b7ac) = -1
ENOENT (No such file or directory)
stat64("/usr/local/lib/perl/5.8.8/PerlIO/encoding.pm", 0xbfa6b6bc) = -1
ENOENT (No such file or directory)
stat64("/usr/local/share/perl/5.8.8/PerlIO/encoding.pmc", 0xbfa6b7ac) =
-1 ENOENT (No such file or directory)
stat64("/usr/local/share/perl/5.8.8/PerlIO/encoding.pm", 0xbfa6b6bc) =
-1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/PerlIO/encoding.pmc", 0xbfa6b7ac) = -1 ENOENT (No
such file or directory)
stat64("/usr/lib/perl5/PerlIO/encoding.pm", 0xbfa6b6bc) = -1 ENOENT (No
such file or directory)
stat64("/usr/share/perl5/PerlIO/encoding.pmc", 0xbfa6b7ac) = -1 ENOENT
(No such file or directory)
stat64("/usr/share/perl5/PerlIO/encoding.pm", 0xbfa6b6bc) = -1 ENOENT
(No such file or directory)
stat64("/usr/lib/perl/5.8/PerlIO/encoding.pmc", 0xbfa6b7ac) = -1 ENOENT
(No such file or directory)
stat64("/usr/lib/perl/5.8/PerlIO/encoding.pm", {st_mode=S_IFREG|0644,
st_size=1186, ...}) = 0
open("/usr/lib/perl/5.8/PerlIO/encoding.pm", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfa6b4c8) = -1 ENOTTY
(Inappropriate ioctl for device)
_llseek(4, 0, [0], SEEK_CUR)            = 0
read(4, "package PerlIO::encoding;\n\nuse s"..., 4096) = 1186
_llseek(4, 390, [390], SEEK_SET)        = 0
_llseek(4, 0, [390], SEEK_CUR)          = 0
close(4)                                = 0
stat64("/usr/lib/perl/5.8/auto/PerlIO/encoding/encoding.so",
{st_mode=S_IFREG|0644, st_size=22256, ...}) = 0
stat64("/usr/lib/perl/5.8/auto/PerlIO/encoding/encoding.bs",
{st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/usr/lib/perl/5.8/auto/PerlIO/encoding/encoding.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\32"...,
512) = 512
fstat64(4, {st_mode=S_IFREG|0644, st_size=22256, ...}) = 0
mmap2(NULL, 21172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0)
= 0xb7f4c000
mmap2(0xb7f51000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x5) = 0xb7f51000
close(4)                                = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo
...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo
...}) = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7b6b000
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo
...}) = 0
_llseek(0, 0, 0xbfa6bab0, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 13536 detached

in perl (linux debian 4.0 (5.8.8) & suse linux 9.3 (5.8.6)).

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

Configured by Debian Project at Wed Dec  6 23:17:41 UTC 2006.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.18.3, archname=i486-linux-gnu-thread-multi
    uname='linux saens 2.6.18.3 #1 smp sat nov 25 13:39:52 est 2006 i686
gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.8
-Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
    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='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian
4.1.1-20)', 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='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.6.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.8
    gnulibc_version='2.3.6'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.8:
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    .

---
Environment for perl v5.8.8:
    HOME=/home/vitus
    LANG=ru_RU.UTF-8
    LANGUAGE (unset)
   
LD_LIBRARY_PATH=/usr//lib:/u/app/oracle/product/9.2.0/lib:/home/vitus/programs/lib/kde3:/home/vitus/programs/lib:/u/app/oracle/product/9.2.0/lib:/home/vitus/programs/lib/kde3:/home/vitus/programs/lib:
    LOGDIR (unset)
   
PATH=/home/vitus/bin:/bin:/home/vitus/programs/usr/lib/perl5/bin:/home/vitus/bin:/bin:/home/vitus/programs/bin:/home/vitus/bin:/home/vitus/bin:/bin:/home/vitus/programs/usr/lib/perl5/bin:/home/vitus/bin:/bin:/home/vitus/programs/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr//bin:/home/vitus/programs/bin:/usr//bin:/home/vitus/programs/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

.


Thread Next


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