Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41087 - Perl and ReadLine results in segmentation fault (SEGV)

Attached to Project: Arch Linux
Opened by Mathieu Clement (tiktak) - Friday, 04 July 2014, 10:40 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 08 July 2014, 03:28 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Severity is low as long as no package depends on pod2html, otherwise it's critical because many components depend on GNU ReadLine.

The problem is that running any program involving ReadLine on Perl results in segmentation fault.

For instance:

/usr/bin/core_perl/pod2html
stops with a segmentation fault.

If I debug it:

perl -d /usr/bin/core_perl/pod2html

Loading DB routines from perl5db.pl version 1.39_10
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(/usr/bin/core_perl/pod2html:2):
2: eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
3: if $running_under_some_shell;
4: =pod
Signal SEGV at /usr/lib/perl5/vendor_perl/Term/ReadLine/Gnu.pm line 112.
require Term/ReadLine/Gnu.pm called at (eval 7)[/usr/share/perl5/core_perl/Term/ReadLine.pm:340] line 1
Term::ReadLine::BEGIN() called at /usr/lib/perl5/vendor_perl/Term/ReadLine/Gnu.pm line 0
eval {...} called at /usr/lib/perl5/vendor_perl/Term/ReadLine/Gnu.pm line 0
eval 'use Term::ReadLine::Gnu; 1' called at /usr/share/perl5/core_perl/Term/ReadLine.pm line 340
require Term/ReadLine.pm called at /usr/share/perl5/core_perl/perl5db.pl line 6780
DB::setterm() called at /usr/share/perl5/core_perl/perl5db.pl line 1822
DB::_DB__read_next_cmd(undef) called at /usr/share/perl5/core_perl/perl5db.pl line 2741
DB::DB called at /usr/bin/core_perl/pod2html line 2
[1] 25276 abort perl -d /usr/bin/core_perl/pod2html

You can see the SEGV signal, and also that the debugger itself crashes at the end because it relies on ReadLine itself.

Investigating with GDB:

Program received signal SIGSEGV, Segmentation fault.
0x00007fc6c24505de in boot_Term__ReadLine__Gnu ()
from /usr/lib/perl5/vendor_perl/auto/Term/ReadLine/Gnu/Gnu.so

(gdb) where
#0 0x00007fc6c24505de in boot_Term__ReadLine__Gnu ()
from /usr/lib/perl5/vendor_perl/auto/Term/ReadLine/Gnu/Gnu.so
#1 0x00007fc6c362b5d6 in Perl_pp_entersub () from /usr/lib/perl5/core_perl/CORE/libperl.so
#2 0x00007fc6c3623bd6 in Perl_runops_standard () from /usr/lib/perl5/core_perl/CORE/libperl.so
#3 0x00007fc6c35b5290 in Perl_call_sv () from /usr/lib/perl5/core_perl/CORE/libperl.so
#4 0x00007fc6c35b7367 in Perl_call_list () from /usr/lib/perl5/core_perl/CORE/libperl.so
#5 0x00007fc6c359d4af in S_process_special_blocks () from /usr/lib/perl5/core_perl/CORE/libperl.so
#6 0x00007fc6c35ae98c in Perl_newATTRSUB_flags () from /usr/lib/perl5/core_perl/CORE/libperl.so
#7 0x00007fc6c35af4e0 in Perl_newATTRSUB () from /usr/lib/perl5/core_perl/CORE/libperl.so
#8 0x00007fc6c35b1af9 in Perl_utilize () from /usr/lib/perl5/core_perl/CORE/libperl.so
#9 0x00007fc6c35e0fa9 in Perl_yyparse () from /usr/lib/perl5/core_perl/CORE/libperl.so
#10 0x00007fc6c365bb12 in S_doeval () from /usr/lib/perl5/core_perl/CORE/libperl.so
#11 0x00007fc6c3667784 in Perl_pp_entereval () from /usr/lib/perl5/core_perl/CORE/libperl.so
#12 0x00007fc6c3623bd6 in Perl_runops_standard () from /usr/lib/perl5/core_perl/CORE/libperl.so
#13 0x00007fc6c35b5290 in Perl_call_sv () from /usr/lib/perl5/core_perl/CORE/libperl.so
#14 0x00007fc6c35b7367 in Perl_call_list () from /usr/lib/perl5/core_perl/CORE/libperl.so
#15 0x00007fc6c35b8981 in perl_destruct () from /usr/lib/perl5/core_perl/CORE/libperl.so
#16 0x0000000000400e01 in main ()


Also, if I try to run the perl debugger and I write "use Pod::Html;", gdb outputs:
Program received signal SIGSEGV, Segmentation fault.
0x00007f4796aba1b3 in boot_HTML__Parser () from /usr/lib/perl5/site_perl/auto/HTML/Parser/Parser.so

(note: to use gdb with Perl, find out the process number and launch "gdb -p PID"

I witnessed the problem on perl-5.20.0-5-x86_64.
Pod2Html works on perl-5.18.2-2-x86_64, but if I do "perl -d", then Ctrl+D, it crashes the same.

The Perl package depends on 'gdbm', 'db', and 'glibc'.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 08 July 2014, 03:28 GMT
Reason for closing:  Works for me
Comment by Mathieu Clement (tiktak) - Friday, 04 July 2014, 10:46 GMT
Sorry for title
Comment by Doug Newgard (Scimmia) - Friday, 04 July 2014, 14:13 GMT
Well the crash seems to be at community/perl-term-readline-gnu, not core/readline, so severity is definitely low.

It looks like it's being caused by that site_perl module, though. Please read the news item about this on the front page (https://www.archlinux.org/news/perl-updated-to-520/) and see if this is a repo problem or a cpan/AUR problem.
Comment by Doug Newgard (Scimmia) - Tuesday, 08 July 2014, 03:28 GMT
With no response, I'm going to assume this is related to the linked news item and close it. If I'm wrong, please reopen.

Loading...