bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time seg fault


From: Justin Williams
Subject: Re: time seg fault
Date: Thu, 23 Jul 2009 13:42:15 -0400

Greg, you mentioned that it might be a build bug causing headaches.
As the same build environment was used to build tcsh, and to
(re)build/upgrade bash on this system, and tcsh's time works while bash's
doesn, I'm curious where the idea comes from.  I don't doubt it, but I'm
curious what leads you to that.

Thanks!
Justin

On Thu, Jul 23, 2009 at 10:24 AM, Justin Williams <address@hidden
> wrote:

> That's a huge help; thanks!
>
> Output below:
> execve("/bin/bash", ["bash", "-c", "time ls"], [/* 22 vars */]) = 0
> brk(0)                                   = 0x74c079d3c20
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x306158131000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=18395, ...}) = 0
> mmap(NULL, 18395, PROT_READ, MAP_PRIVATE, 3, 0) = 0x306158132000
> close(3)                                = 0
> open("/lib/libncurses.so.5", O_RDONLY)  = 3
> read(3,
> "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\2\0\0\0\0\0"..., 832)
> = 832
> fstat(3, {st_mode=S_IFREG|0755, st_size=406112, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x306158137000
> mmap(NULL, 2504632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0x306158138000
> mprotect(0x30615818d000, 2093056, PROT_NONE) = 0
> mmap(0x30615838c000, 61440, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54000) = 0x30615838c000
> mmap(0x30615839b000, 1976, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30615839b000
> close(3)                                = 0
> open("/lib/libdl.so.2", O_RDONLY)       = 3
> read(3,
> "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\0\0\0\0\0\0"..., 832)
> = 832
> fstat(3, {st_mode=S_IFREG|0755, st_size=14328, ...}) = 0
> mmap(NULL, 2109600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0x30615839c000
> mprotect(0x30615839e000, 2097152, PROT_NONE) = 0
> mmap(0x30615859e000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x30615859e000
> close(3)                                = 0
> open("/lib/libc.so.6", O_RDONLY)        = 3
> read(3,
> "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\342\1\0\0\0\0\0"...,
> 832) = 832
> fstat(3, {st_mode=S_IFREG|0755, st_size=1330184, ...}) = 0
> mmap(NULL, 3438296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0x3061585a0000
> mprotect(0x3061586de000, 2097152, PROT_NONE) = 0
> mmap(0x3061588de000, 20480, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e000) = 0x3061588de000
> mmap(0x3061588e3000, 18136, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3061588e3000
> close(3)                                = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x3061588e8000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x3061588e9000
> arch_prctl(ARCH_SET_FS, 0x3061588e8e60) = 0
> open("/dev/urandom", O_RDONLY)          = 3
> read(3, "\323k\263\254\265\6\201\247", 8) = 8
> close(3)                                = 0
> mprotect(0x3061588de000, 16384, PROT_READ) = 0
> mprotect(0x30615859e000, 4096, PROT_READ) = 0
> mprotect(0x30615838c000, 57344, PROT_READ) = 0
> mprotect(0x74c079ba000, 16384, PROT_READ) = 0
> mprotect(0x30615812f000, 4096, PROT_READ) = 0
> munmap(0x306158132000, 18395)           = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> open("/dev/tty", O_RDWR|O_NONBLOCK)     = 3
> close(3)                                = 0
> brk(0)                                  = 0x74c079d3c20
> brk(0x74c079f4c20)                      = 0x74c079f4c20
> brk(0x74c079f5000)                      = 0x74c079f5000
> getuid()                                = 1005
> getgid()                                = 1006
> geteuid()                               = 1005
> getegid()                               = 1006
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> open("/proc/meminfo", O_RDONLY)         = 3
> fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x306158132000
> read(3, "MemTotal:     18529272 kB\nMemFre"..., 1024) = 725
> close(3)                                = 0
> munmap(0x306158132000, 4096)            = 0
> rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
> uname({sys="Linux", node="XXXXXXXXXXXX", ...}) = 0
> stat("/home/XXXXXXXX", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> getpid()                                = 12196
> getppid()                               = 12193
> stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> stat("/usr/local/bin/bash", 0x78b935f19eb0) = -1 ENOENT (No such file or
> directory)
> stat("/usr/bin/bash", 0x78b935f19eb0)   = -1 ENOENT (No such file or
> directory)
> stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1052984, ...}) = 0
> open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
> read(3, "65536\n", 31)                  = 6
> close(3)                                = 0
> mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x3061588ea000
> getgroups(65536, [10, 452, 1006])       = 3
> stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1052984, ...}) = 0
> getpgrp()                               = 12193
> rt_sigaction(SIGCHLD, {0x74c0771a74a, [], SA_RESTORER, 0x3061585d0f10},
> {SIG_DFL}, 8) = 0
> getrlimit(RLIMIT_NPROC, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) =
> 0
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
>
> On Thu, Jul 23, 2009 at 10:12 AM, Greg Wooledge <address@hidden>wrote:
>
>> On Thu, Jul 23, 2009 at 09:59:48AM -0400, Justin Williams wrote:
>> > Unfortunately, if I try to strace it (strace time ls), I get command not
>> > found.
>>
>> ''strace time ls'' will try to run the external command ''time'' which
>> apparently you haven't got installed.  (Which is probably good in this
>> case, as it avoided some confusion....)
>>
>> What you want is:
>>
>>  strace bash -c 'time ls'
>>
>> (You may need to give additional options to strace as well, to get the
>> behavior you want.)
>>
>> > If I try to strace `time ls`, I get a hung screen.
>> >
>> > Attaching gdb to the running bash session from which I am trying to run
>> > time, I don't get any useful pointers, but, what I get is below:
>> >
>> > (no debugging symbols found)
>> > Attaching to program: /bin/bash, process 5647
>> > linux-nat.c:988: internal-error: linux_nat_attach: Assertion `pid ==
>> GET_PID
>> > (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP'
>> > failed.
>> > A problem internal to GDB has been detected,
>> > further debugging may prove unreliable.
>>
>> Maybe your libc is broken?  Or your compiler, if all of these are
>> self-compiled gentoo e-builds?
>>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]