Bug 1644377 - auto* tools - Segmentation fault (core dumped)
Summary: auto* tools - Segmentation fault (core dumped)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 29
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-30 16:35 UTC by tla2k15
Modified: 2018-11-02 17:25 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-02 17:25:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
configure.ac from bulk_extractor (23.24 KB, text/plain)
2018-10-31 15:30 UTC, tla2k15
no flags Details

Description tla2k15 2018-10-30 16:35:30 UTC
Description of problem:

Running an autoconf package tool (autoconf, autoheader) causes Segmentation fault (core dumped).

Version-Release number of selected component (if applicable):

Name         : autoconf
Version      : 2.69
Release      : 28.fc29
Arch         : noarch
Size         : 2.2 M
Source       : autoconf-2.69-28.fc29.src.rpm
Repo         : @System
From repo    : fedora

How reproducible:

Always. Just run autoconf or autoheader with or without options.

Steps to Reproduce:
1. autoconf
2.
3.

Actual results:

Segmentation fault (core dumped)

Expected results:

Tool should run and produce ./configure

Additional info:

$ coredumpctl dump 18238 --output=/tmp/x
           PID: 18238 (autom4te)
           UID: 1000 (xxx)
           GID: 1000 (xxx)
        Signal: 11 (SEGV)
     Timestamp: Tue 2018-10-30 16:16:53 GMT (17min ago)
  Command Line: /usr/bin/perl -w /usr/bin/autom4te --language=autoconf --output=configure configure.ac
    Executable: /usr/bin/perl
 Control Group: /user.slice/user-1000.slice/user/gnome-terminal-server.service
          Unit: user
     User Unit: gnome-terminal-server.service
         Slice: user-1000.slice
     Owner UID: 1000 (xxx)
       Boot ID: adce2070a2cb4798901e0bafe3393b9d
    Machine ID: 7725dfc225d14958a625ddaaaea5962b
      Hostname: xxx.yyy
       Storage: /var/lib/systemd/coredump/core.autom4te.1000.adce2070a2cb4798901e0bafe3393b9d.18238.1540916213000000.lz4
       Message: Process 18238 (autom4te) of user 1000 dumped core.
                
                Stack trace of thread 18238:
                #0  0x00007f6505625757 boot_List__Util (Util.so)
                #1  0x00007f6505ce6299 Perl_pp_entersub (libperl.so.5.28)
                #2  0x00007f6505cdc485 Perl_runops_standard (libperl.so.5.28)
                #3  0x00007f6505c50f95 Perl_call_sv (libperl.so.5.28)
                #4  0x00007f6505c53aaf Perl_call_list (libperl.so.5.28)
                #5  0x00007f6505c317bd n/a (libperl.so.5.28)
                #6  0x00007f6505c4a70d Perl_newATTRSUB_x (libperl.so.5.28)
                #7  0x00007f6505c4d337 Perl_utilize (libperl.so.5.28)
                #8  0x00007f6505c87615 Perl_yyparse (libperl.so.5.28)
                #9  0x00007f6505d20eff n/a (libperl.so.5.28)
                #10 0x00007f6505d267ef Perl_pp_require (libperl.so.5.28)
                #11 0x00007f6505cdc485 Perl_runops_standard (libperl.so.5.28)
                #12 0x00007f6505c50f95 Perl_call_sv (libperl.so.5.28)
                #13 0x00007f6505c53aaf Perl_call_list (libperl.so.5.28)
                #14 0x00007f6505c317bd n/a (libperl.so.5.28)
                #15 0x00007f6505c4a70d Perl_newATTRSUB_x (libperl.so.5.28)
                #16 0x00007f6505c4d337 Perl_utilize (libperl.so.5.28)
                #17 0x00007f6505c87615 Perl_yyparse (libperl.so.5.28)
                #18 0x00007f6505c57b21 perl_parse (libperl.so.5.28)
                #19 0x000055b245e571bf n/a (perl)
                #20 0x00007f650584f413 __libc_start_main (libc.so.6)
                #21 0x000055b245e572ae n/a (perl)

Comment 1 Pavel Raiskup 2018-10-30 18:45:57 UTC
This rather looks like Perl issue.  Can you provide self-standing
reproducer (configure.ac at least)?  I was not able to reproduce
on my box with:
<mock-chroot> sh-4.4# rpm -q autoconf perl m4
autoconf-2.69-28.fc29.noarch
package perl is not installed
m4-1.4.18-9.fc29.x86_64

Comment 2 Petr Pisar 2018-10-31 06:32:48 UTC
The stack trace indicates the perl executable crashed when loading an XS module into the interpreter. I suspect the reporter has third-party XS modules installed in his system that are used instead of the system ones.

But we need more details:

Can you provide us the configure.ac? We cannot reproduce the crash without it. Or at least tell us where did you get the file from.

Could you run the "/usr/bin/perl -w /usr/bin/autom4te --language=autoconf --output=configure configure.ac" or the command you used to invoke it under a strace ("strace -fq -e open,openat -- /usr/bin/perl -w /usr/bin/autom4te --language=autoconf --output=configure configure.ac") so that we can see what files perl attempts to load?

Comment 3 tla2k15 2018-10-31 15:21:38 UTC
(In reply to Pavel Raiskup from comment #1)
> This rather looks like Perl issue.  Can you provide self-standing
> reproducer (configure.ac at least)?  I was not able to reproduce
> on my box with:
> <mock-chroot> sh-4.4# rpm -q autoconf perl m4
> autoconf-2.69-28.fc29.noarch
> package perl is not installed
> m4-1.4.18-9.fc29.x86_64

$ rpm -q autoconf perl m4
autoconf-2.69-28.fc29.noarch
perl-5.28.0-423.fc29.x86_64
m4-1.4.18-9.fc29.x86_64

Comment 4 tla2k15 2018-10-31 15:25:37 UTC
(In reply to Petr Pisar from comment #2)
> The stack trace indicates the perl executable crashed when loading an XS
> module into the interpreter. I suspect the reporter has third-party XS
> modules installed in his system that are used instead of the system ones.
> 
> But we need more details:
> 
> Can you provide us the configure.ac? We cannot reproduce the crash without
> it. Or at least tell us where did you get the file from.
> 
> Could you run the "/usr/bin/perl -w /usr/bin/autom4te --language=autoconf
> --output=configure configure.ac" or the command you used to invoke it under
> a strace ("strace -fq -e open,openat -- /usr/bin/perl -w /usr/bin/autom4te
> --language=autoconf --output=configure configure.ac") so that we can see
> what files perl attempts to load?

$ strace -fq -e open,openat -- /usr/bin/perl -w /usr/bin/autom4te --language=autoconf --output=configure configure.ac
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libperl.so.5.28", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/en_GB.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/bin/autom4te", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/autoconf/Autom4te/C4che.pm", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/Data/Dumper.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/perl5/vendor_perl/constant.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/strict.pm", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/usr/share/perl5/warnings/register.pm", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/usr/share/perl5/warnings.pm", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/usr/local/share/perl5/Carp.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/vendor_perl/Exporter.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/XSLoader.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/auto/Data/Dumper/Dumper.so", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/bytes.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/autoconf/Autom4te/Request.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/perl5/Class/Struct.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/vendor_perl/Exporter/Heavy.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/vars.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/autoconf/Autom4te/ChannelDefs.pm", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/usr/share/autoconf/Autom4te/Channels.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/perl5/File/Basename.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/autoconf/Autom4te/FileUtils.pm", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/usr/share/perl5/File/stat.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/lib64/perl5/Fcntl.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/auto/Fcntl/Fcntl.so", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/overload.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/overloading.pm", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/usr/lib64/perl5/IO/File.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/perl5/Symbol.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/SelectSaver.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/IO/Seekable.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/IO/Handle.pm", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/usr/lib64/perl5/IO.pm", O_RDONLY|O_CLOEXEC) = 8
openat(AT_FDCWD, "/usr/lib64/perl5/auto/IO/IO.so", O_RDONLY|O_CLOEXEC) = 8
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/File/Spec.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/File/Spec/Unix.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/Cwd.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/auto/Cwd/Cwd.so", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/share/perl5/File/Compare.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/share/perl5/File/Copy.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/lib64/perl5/Config.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/Time/HiRes.pm", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/lib64/perl5/vendor_perl/auto/Time/HiRes/HiRes.so", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 6
openat(AT_FDCWD, "/usr/local/lib64/perl5/Scalar/Util.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/local/lib64/perl5/List/Util.pm", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/usr/local/lib64/perl5/auto/List/Util/Util.so", O_RDONLY|O_CLOEXEC) = 5
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

Comment 5 tla2k15 2018-10-31 15:30:24 UTC
Created attachment 1499466 [details]
configure.ac from bulk_extractor

Issue encountered when trying to build bulk_extractor (git clone --recursive https://github.com/simsong/bulk_extractor.git) under Fedora 29. I have another Fedora 28 server that builds fine.  The most recent change was the upgrade from Fedora 28 Workstation to Fedora 29 Workstation.  I had not previously built bulk_extractor so cannot say whether it would have built under Fedora 28 Workstation or not.

Comment 6 Petr Pisar 2018-11-01 09:12:01 UTC
(In reply to tla2k15 from comment #4)
> $ strace -fq -e open,openat -- /usr/bin/perl -w /usr/bin/autom4te
> --language=autoconf --output=configure configure.ac
[...]
> openat(AT_FDCWD, "/usr/local/share/perl5/Carp.pm", O_RDONLY|O_CLOEXEC) = 6
[...]
> openat(AT_FDCWD, "/usr/local/lib64/perl5/Scalar/Util.pm",
> O_RDONLY|O_CLOEXEC) = 5
> openat(AT_FDCWD, "/usr/local/lib64/perl5/List/Util.pm", O_RDONLY|O_CLOEXEC)
> = 5
> openat(AT_FDCWD, "/usr/local/lib64/perl5/auto/List/Util/Util.so",
> O_RDONLY|O_CLOEXEC) = 5
> --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5} ---
> +++ killed by SIGSEGV (core dumped) +++
> Segmentation fault (core dumped)

You have Carp, Scalar::Util, and List::Util Perl modules built locally, possibly against a different perl or with an incompatible compiler or linker flags. And that very probably causes the crash. "perl -e 'use Scalar::Util'" command should crash for you too.

Either rebuild them or remove them from /usr/local.

Comment 7 tla2k15 2018-11-02 17:25:17 UTC
(In reply to Petr Pisar from comment #6)
> (In reply to tla2k15 from comment #4)
> > $ strace -fq -e open,openat -- /usr/bin/perl -w /usr/bin/autom4te
> > --language=autoconf --output=configure configure.ac
> [...]
> > openat(AT_FDCWD, "/usr/local/share/perl5/Carp.pm", O_RDONLY|O_CLOEXEC) = 6
> [...]
> > openat(AT_FDCWD, "/usr/local/lib64/perl5/Scalar/Util.pm",
> > O_RDONLY|O_CLOEXEC) = 5
> > openat(AT_FDCWD, "/usr/local/lib64/perl5/List/Util.pm", O_RDONLY|O_CLOEXEC)
> > = 5
> > openat(AT_FDCWD, "/usr/local/lib64/perl5/auto/List/Util/Util.so",
> > O_RDONLY|O_CLOEXEC) = 5
> > --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5} ---
> > +++ killed by SIGSEGV (core dumped) +++
> > Segmentation fault (core dumped)
> 
> You have Carp, Scalar::Util, and List::Util Perl modules built locally,
> possibly against a different perl or with an incompatible compiler or linker
> flags. And that very probably causes the crash. "perl -e 'use Scalar::Util'"
> command should crash for you too.
> 
> Either rebuild them or remove them from /usr/local.

Removing /usr/local/lib64/perl5 fixes the issue.  Apologies for the noise.


Note You need to log in before you can comment on or make changes to this bug.