Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl thread Segmentation fault #9143

Closed
p5pRT opened this issue Dec 6, 2007 · 7 comments
Closed

perl thread Segmentation fault #9143

p5pRT opened this issue Dec 6, 2007 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 6, 2007

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

Searchable as RT48248$

@p5pRT
Copy link
Author

p5pRT commented Dec 6, 2007

From vitus@ac-sw.com

Created by vitus@ac-sw.com

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)).

Perl Info

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

.


@p5pRT
Copy link
Author

p5pRT commented Dec 6, 2007

From @jdhedden

Vikulin Vitaly reported​:

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

This is a known problem with the Encode module​: It is not
thread safe. I will file this as a bug against the Encode
module.

Change 32146 to blead added the following to the KNOWN
PROBLEMS section of the 'encoding' POD​:

  Thread safety
  "use encoding ..." is not thread-safe (i.e., do not
  use in threaded applications).

@p5pRT
Copy link
Author

p5pRT commented Dec 6, 2007

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

@p5pRT
Copy link
Author

p5pRT commented Dec 16, 2013

From @jkeenan

On Thu Dec 06 06​:15​:50 2007, jdhedden@​cpan.org wrote​:

Vikulin Vitaly reported​:

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

This is a known problem with the Encode module​: It is not
thread safe. I will file this as a bug against the Encode
module.

Change 32146 to blead added the following to the KNOWN
PROBLEMS section of the 'encoding' POD​:

Thread safety
    "use encoding \.\.\." is not thread\-safe \(i\.e\.\, do not
    use in threaded applications\)\.

Given that the encoding module is deprecated in Perl 5.18, what should we do with this ticket?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 16, 2013

From @khwilliamson

On 12/15/2013 07​:52 PM, James E Keenan via RT wrote​:

On Thu Dec 06 06​:15​:50 2007, jdhedden@​cpan.org wrote​:

Vikulin Vitaly reported​:

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

This is a known problem with the Encode module​: It is not
thread safe. I will file this as a bug against the Encode
module.

Change 32146 to blead added the following to the KNOWN
PROBLEMS section of the 'encoding' POD​:

 Thread safety
     "use encoding \.\.\." is not thread\-safe \(i\.e\.\, do not
     use in threaded applications\)\.

Given that the encoding module is deprecated in Perl 5.18, what should we do with this ticket?

Thank you very much.
Jim Keenan

We are not planning to make a deprecated feature thread safe in the
meantime. I think it should be closed

@p5pRT
Copy link
Author

p5pRT commented Dec 16, 2013

From @jkeenan

On Sun Dec 15 21​:22​:30 2013, public@​khwilliamson.com wrote​:

On 12/15/2013 07​:52 PM, James E Keenan via RT wrote​:

On Thu Dec 06 06​:15​:50 2007, jdhedden@​cpan.org wrote​:

Vikulin Vitaly reported​:

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

This is a known problem with the Encode module​: It is not
thread safe. I will file this as a bug against the Encode
module.

Change 32146 to blead added the following to the KNOWN
PROBLEMS section of the 'encoding' POD​:

Thread safety
"use encoding ..." is not thread-safe (i.e., do not
use in threaded applications).

Given that the encoding module is deprecated in Perl 5.18, what
should we do with this ticket?

Thank you very much.
Jim Keenan

We are not planning to make a deprecated feature thread safe in the
meantime. I think it should be closed

Done.

@p5pRT
Copy link
Author

p5pRT commented Dec 16, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant