[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash 4.3 with patch 29 causing segfault during ./configure when tryi
From: |
jon |
Subject: |
Re: Bash 4.3 with patch 29 causing segfault during ./configure when trying to upgrade to patch 30 |
Date: |
Fri, 10 Oct 2014 02:06:39 +0100 |
On Thu, 2014-10-09 at 19:56 -0400, Chet Ramey wrote:
> On 10/8/14, 8:17 PM, jon wrote:
> > dmesg.....
> >
> > [307688.764489] configure[25847]: segfault at 9558104 ip 080e2246 sp
> > bfd478f0 error 4 in bash[8048000+148000]
> > [307689.436739] configure[25966]: segfault at 95580b4 ip 080e2246 sp
> > bfd478f0 error 4 in bash[8048000+148000]
> > [307689.467279] configure[25983]: segfault at 9558104 ip 080e2246 sp
> > bfd478f0 error 4 in bash[8048000+148000]
> >
> > ./configure
>
> I can't reproduce this on Mac OS X or RHEL 5 using `bash ./configure' (so
> I know what version of bash is running the script). Since configure starts
> with `#! /bin/sh', it's going to run whatever version of bash you have
> installed as /bin/sh.
>
> If you don't get the same results if you run `bash ./configure', open a
> bug report with your vendor against /bin/sh.
>
I am the vendor, this is custom linux distro for DVR machines that I
maintain.
It gets even stranger.
I checked /bin/sh
# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Oct 27 2012 /bin/sh -> bash
# which bash
/bin/bash
# /bin/bash --version
GNU bash, version 4.3.29(3)-release (i686-pc-linux-gnu)
I modified configure to :
echo $BASH_VERSION
I assume this is the version of the currently active shell not the
parent ?
# ./configure
4.3.29(3)-release
checking build system type... i686-pc-linux-gnu
<SNIP>
checking for presence of necessary job control definitions...
Segmentation fault
Ok - so far so bad - then I try
# /bin/bash ./configure
4.3.29(3)-release
checking build system type... i686-pc-linux-gnu
<SNIP>
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing default commands
#
Same shell version, but now all works, very odd?
This is all inside the same ssh session, as far as I can tell the system
has only one shell binary in the search path. Note currently a
statically linked version - faulty lib maybe ?
# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.2.5, statically linked, not stripped
I also tried
bash -c './configure' that segfaults.
I attached strace to the bash session running ./configure - it forks but
I re-attached to the child to get this, not sure that helps though ...
Thanks,
Jon
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork() = 8686
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806d3b0, [], SA_RESTORER, 0x80f08f8}, {0x8085d20, [],
SA_RESTORER, 0x80f08f8}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8686
rt_sigaction(SIGINT, {0x8085d20, [], SA_RESTORER, 0x80f08f8}, {0x806d3b0, [],
SA_RESTORER, 0x80f08f8}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0xbf977288, WNOHANG, NULL) = -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
stat64("/bin/rm", {st_mode=S_IFREG|0755, st_size=26780, ...}) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
fork() = 8689
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x806d3b0, [], SA_RESTORER, 0x80f08f8}, {0x8085d20, [],
SA_RESTORER, 0x80f08f8}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8689
rt_sigaction(SIGINT, {0x8085d20, [], SA_RESTORER, 0x80f08f8}, {0x806d3b0, [],
SA_RESTORER, 0x80f08f8}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0xbf977778, WNOHANG, NULL) = -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 128 entries */, 4096) = 4088
getdents64(3, /* 5 entries */, 4096) = 160
getdents64(3, /* 0 entries */, 4096) = 0
brk(0) = 0x8b21000
brk(0x8b1f000) = 0x8b1f000
close(3) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 9848 detached