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 dumps core after XML-Encoding-1.01 test.pl completes #1956

Closed
p5pRT opened this issue May 10, 2000 · 4 comments
Closed

PERL dumps core after XML-Encoding-1.01 test.pl completes #1956

p5pRT opened this issue May 10, 2000 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented May 10, 2000

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

Searchable as RT3229$

@p5pRT
Copy link
Author

p5pRT commented May 10, 2000

From [email protected]

Created by [email protected]

bash$ cd CPAN/build/XML-Encoding-1.01
bash$ myperl test.pl
1..7
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
Segmentation fault (core dumped)

I traced it in perl -d​:
main​::(test.pl​:101)​: print "ok 7\n";
ok 7
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:98)​:
98​: goto &longmess_heavy;
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:30)​:
30​: return @​_ if ref $_[0];
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:31)​:
31​: my $error = join '', @​_;
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:32)​:
32​: my $mess = "";
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:33)​:
33​: my $i = 1 + $CarpLevel;
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:34)​:
34​: my ($pack,$file,$line,$sub,$hargs,$eval,$require);
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:35)​:
35​: my (@​a);
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:39)​:
39​: while (do { { package DB; @​a = caller($i++) } } ) {
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:39)​:
39​: while (do { { package DB; @​a = caller($i++) } } ) {
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:125)​:
125​: my $msg = \($mess || $error);
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:126)​:
126​: $$msg =~ tr/\0//d;
Carp​::longmess_heavy(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:127)​:
127​: $$msg;
Signal SEGV​:
Abort trap (core dumped)

I also dumped a stack backtrace with gdb from the core file​:
bash$ gdb /home/jmilton/base-NB386/perl5/bin/perl perl.core
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386--netbsd"...(no debugging symbols found)...
Core was generated by `perl'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/libexec/ld.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.0.1...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libposix.so.0.1...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libc.so.12.40...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libcrypt.so.0.0...(no debugging symbols found)...
done.
Reading symbols from /home/jmilton/base-NB386/perl5/lib/site_perl/5.6.0/i386-netbsd/auto/XML/Parser/Expat/Expat.so...(no debugging symbols found)...done.
Reading symbols from /home/jmilton/base-NB386/perl5/lib/site_perl/5.6.0/i386-netbsd/auto/HTML/Parser/Parser.so...(no debugging symbols found)...done.
Reading symbols from /home/jmilton/base-NB386/perl5/lib/site_perl/5.6.0/i386-netbsd/auto/Term/ReadKey/ReadKey.so...(no debugging symbols found)...done.
#0 0x40185aeb in kill ()
(gdb) backtrace
#0 0x40185aeb in kill ()
#1 0xc0969 in Perl_apply ()
#2 0xb9818 in Perl_pp_kill ()
#3 0x8bf2e in Perl_runops_standard ()
#4 0x4c072 in S_call_body ()
#5 0x4bc72 in perl_call_sv ()
#6 0x886f8 in Perl_sighandler ()
#7 0xbfbfdfd2 in ?? ()
#8 0x401c6f26 in contentProcessor ()
#9 0x401c92da in L863 ()
#10 0x401c8d80 in prologProcessor ()
#11 0x401c8d30 in prologInitProcessor ()
#12 0x401c6931 in XML_ParseBuffer ()
#13 0x401c68e3 in XML_Parse ()
#14 0x401b2062 in XS_XML__Parser__Expat_ParseString ()
#15 0x9108e in Perl_pp_entersub ()
#16 0x8bf2e in Perl_runops_standard ()
#17 0x4b868 in S_run_body ()
#18 0x4b5d5 in perl_run ()
#19 0x183c in main ()

I have the core​:
1432 -rw------- 1 jmilton user 1454103 May 10 12​:37 perl.core.gz

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.6.0:

Configured by jmilton at Wed Apr 12 11:41:50 CDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=netbsd, osvers=1.4.2, archname=i386-netbsd
    uname='netbsd keel-verezy.mesas.com 1.4.2 netbsd 1.4.2 (eternal_doctrine) #0: mon mar 20 13:49:05 cst 2000 [email protected]:melnorme-1netbsd-src-1.4.2usrsrcsysarchi386compileeternal_doctrine i386 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=egcs-2.91.60 19981201 (egcs-1.1.1 release)
    cppflags='-fno-strict-aliasing -I/usr/pkg/include'
    ccflags ='-fno-strict-aliasing -I/usr/pkg/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    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, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags ='-L/home/jmilton/base-NB386/lib -L/usr/local/lib -L/usr/pkg/lib'
    libpth=/home/jmilton/base-NB386/lib /usr/local/lib /usr/pkg/lib /usr/lib
    libs=-lm -lc -lposix -lcrypt
    libc=/usr/lib/libc.so.12.40, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags='-Wl,-R/lib '
    cccdlflags='-DPIC -fPIC ', lddlflags='-Bshareable  -L/home/jmilton/base-NB386/lib -L/usr/local/lib -L/usr/pkg/lib'

Locally applied patches:
    


@INC for perl v5.6.0:
    /home/jmilton/base-NB386/perl5/lib/5.6.0/i386-netbsd
    /home/jmilton/base-NB386/perl5/lib/5.6.0
    /home/jmilton/base-NB386/perl5/lib/site_perl/5.6.0/i386-netbsd
    /home/jmilton/base-NB386/perl5/lib/site_perl/5.6.0
    /home/jmilton/base-NB386/perl5/lib/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/jmilton
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/home/jmilton/base-NB386/lib:/lib
    LOGDIR (unset)
    PATH=/home/jmilton/base/bin:/home/jmilton/base-NB386/bin:/usr/local/bin:/mesa/bin:/usr/pkg/bin:/usr/krb5/bin:/usr/bin:/bin:.:/usr/X11R6/bin:/sbin:/usr/sbin:/etc:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

From @smpeters

bash$ cd CPAN/build/XML-Encoding-1.01
bash$ myperl test.pl
1..7
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
Segmentation fault (core dumped)

I traced it in perl -d​:
main​::(test.pl​:101)​: print "ok 7\n";
ok 7
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to
not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to
not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:97)​:
97​: { local $@​; require Carp​::Heavy; } # XXX fix require to
not clear $@​?
Carp​::(/home/jmilton/base-NB386/perl5/lib/5.6.0/Carp.pm​:98)​:
98​: goto &longmess_heavy;
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:30)​:
30​: return @​_ if ref $_[0];
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:31)​:
31​: my $error = join '', @​_;
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:32)​:
32​: my $mess = "";
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:33)​:
33​: my $i = 1 + $CarpLevel;
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:34)​:
34​: my ($pack,$file,$line,$sub,$hargs,$eval,$require);
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:35)​:
35​: my (@​a);
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:39)​:
39​: while (do { { package DB; @​a = caller($i++) } } ) {
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:39)​:
39​: while (do { { package DB; @​a = caller($i++) } } ) {
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:125)​:
125​: my $msg = \($mess || $error);
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:126)​:
126​: $$msg =~ tr/\0//d;
Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:127)​:
127​: $$msg;
Signal SEGV​:
Abort trap (core dumped)

I also dumped a stack backtrace with gdb from the core file​:
bash$ gdb /home/jmilton/base-NB386/perl5/bin/perl perl.core
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386--netbsd"...(no debugging symbols
found)...
Core was generated by `perl'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/libexec/ld.so...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libm.so.0.1...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/libposix.so.0.1...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/libc.so.12.40...(no debugging symbols
found)...
done.
Reading symbols from /usr/lib/libcrypt.so.0.0...(no debugging symbols
found)...
done.
Reading symbols from /home/jmilton/base-
NB386/perl5/lib/site_perl/5.6.0/i386-
netbsd/auto/XML/Parser/Expat/Expat.so...(no debugging symbols
found)...done.
Reading symbols from /home/jmilton/base-
NB386/perl5/lib/site_perl/5.6.0/i386-
netbsd/auto/HTML/Parser/Parser.so...(no debugging symbols
found)...done.
Reading symbols from /home/jmilton/base-
NB386/perl5/lib/site_perl/5.6.0/i386-
netbsd/auto/Term/ReadKey/ReadKey.so...(no debugging symbols
found)...done.
#0 0x40185aeb in kill ()
(gdb) backtrace
#0 0x40185aeb in kill ()
#1 0xc0969 in Perl_apply ()
#2 0xb9818 in Perl_pp_kill ()
#3 0x8bf2e in Perl_runops_standard ()
#4 0x4c072 in S_call_body ()
#5 0x4bc72 in perl_call_sv ()
#6 0x886f8 in Perl_sighandler ()
#7 0xbfbfdfd2 in ?? ()
#8 0x401c6f26 in contentProcessor ()
#9 0x401c92da in L863 ()
#10 0x401c8d80 in prologProcessor ()
#11 0x401c8d30 in prologInitProcessor ()
#12 0x401c6931 in XML_ParseBuffer ()
#13 0x401c68e3 in XML_Parse ()
#14 0x401b2062 in XS_XML__Parser__Expat_ParseString ()
#15 0x9108e in Perl_pp_entersub ()
#16 0x8bf2e in Perl_runops_standard ()
#17 0x4b868 in S_run_body ()
#18 0x4b5d5 in perl_run ()
#19 0x183c in main ()

I installed XML-Encoding-1.01 and had no such core dump. Of course, the
core dump could have occured somewhere in one of the modules rather than
in Perl itself. Or the bug could have been in Perl and resolved
somewhere in the past four years.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

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

@p5pRT p5pRT closed this as completed Oct 24, 2004
@p5pRT
Copy link
Author

p5pRT commented Oct 25, 2004

From @schwern

On Sun, Oct 24, 2004 at 01​:29​:27AM -0000, Steve Peters via RT wrote​:

Carp​::longmess_heavy(/home/jmilton/base-
NB386/perl5/lib/5.6.0/Carp/Heavy.pm​:127)​:
127​: $$msg;
Signal SEGV​:
Abort trap (core dumped)

<snip>

I installed XML-Encoding-1.01 and had no such core dump. Of course, the
core dump could have occured somewhere in one of the modules rather than
in Perl itself. Or the bug could have been in Perl and resolved
somewhere in the past four years.

5.6.0 had a nasty habit of generating odd errors in Carp.pm. "Bizarre copy
of array" was one of the more common ones. I wouldn't be surprised if this
was related and has long since been fixed.

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern/
Now if you'll excuse me, I've got about a hundred hours of memories to
erase!!
  -- http​://www.angryflower.com/allrigh.gif

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