Re: core dump in cvsup caused by _once()?

From: Gary Jennejohn <gary.jennejohn_at_freenet.de>
Date: Wed, 2 Dec 2009 12:23:47 +0100
On Tue, 1 Dec 2009 10:09:59 -0500
John Baldwin <jhb_at_freebsd.org> wrote:

[snip old gdb stuff]
> Can you do 'x/i $rip'?  Also, if you could rebuild libc with debug symbols 
> that could be helpful (just cd /usr/src/lib/libc; make clean; make 
> DEBUG_FLAGS=-g install).
> 

OK, here it is:

Core was generated by `cvsup'.
Program terminated with signal 4, Illegal instruction.
Reading symbols from /lib/libz.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x00000008009ee0e7 in tzload (name=0xb <Address 0xb out of bounds>,
    sp=0x76fe58, doextend=0) at /usr/src/lib/libc/stdtime/localtime.c:393
393             if (name != NULL && issetugid() != 0)
(gdb) bt
#0  0x00000008009ee0e7 in tzload (name=0xb <Address 0xb out of bounds>,
    sp=0x76fe58, doextend=0) at /usr/src/lib/libc/stdtime/localtime.c:393
#1  0x00000008009edb8e in tzparse (name=0x765c6d "", sp=0x76fe58, lastditch=Variable "lastditch" is not available.
)
    at /usr/src/lib/libc/stdtime/localtime.c:1002
#2  0x00000008009ee810 in tzload (name=Variable "name" is not available.
)
    at /usr/src/lib/libc/stdtime/localtime.c:579
#3  0x00000008009eea28 in gmtload (sp=0x800b4d7a0)
    at /usr/src/lib/libc/stdtime/localtime.c:1197
#4  0x00000008009f1d78 in _once (once_control=0x800b48fe0, init_routine=Variable "init_routine" is not available.
)
    at /usr/src/lib/libc/gen/_once_stub.c:43
#5  0x00000008009ed80f in gmtsub (timep=0x774bb8, offset=0, tmp=0x800b52040)
    at /usr/src/lib/libc/stdtime/localtime.c:1489
#6  0x00000008009ef097 in gmtime (timep=0x774bb8)
    at /usr/src/lib/libc/stdtime/localtime.c:1550
#7  0x00000000004a643a in calloc ()
#8  0x000000000043aec7 in ?? ()
#9  0x0000000000448eaa in ?? ()
#10 0x0000000000409ece in ?? ()
#11 0x00000000004191a4 in ?? ()
#12 0x0000000000417cbe in ?? ()
#13 0x000000000041529f in ?? ()
#14 0x0000000000414d7a in ?? ()
#15 0x000000000049f980 in calloc ()
#16 0x000000000048fa3d in fnmatch ()
#17 0x00007fffffffd3e8 in ?? ()
#18 0x00007fffffffe950 in ?? ()
#19 0x00007fffffffea40 in ?? ()
#20 0x00007fffffffea28 in ?? ()
#21 0x0000000000000000 in ?? ()
#22 0x0000000000000000 in ?? ()
#23 0x00001fa00000037f in ?? ()
#24 0x0000000000000000 in ?? ()
#25 0x00000000006476c0 in ?? ()
#26 0x00000000006476c0 in ?? ()
#27 0x0000000000494d89 in fnmatch ()
Previous frame inner to this frame (corrupt stack?)
(gdb) x/i $rip
0x8009ee0e7 <tzload+55>:        callq  0x80094959c <_init+6180>
(gdb) up
#1  0x00000008009edb8e in tzparse (name=0x765c6d "", sp=0x76fe58, lastditch=Variable "lastditch" is not available.
)
    at /usr/src/lib/libc/stdtime/localtime.c:1002
1002            load_result = tzload(TZDEFRULES, sp, FALSE);
(gdb) x/i $rip
0x8009edb8e <tzparse+238>:      test   %eax,%eax
(gdb) up
#2  0x00000008009ee810 in tzload (name=Variable "name" is not available.
)
    at /usr/src/lib/libc/stdtime/localtime.c:579
579                             result = tzparse(&u.buf[1], &ts, FALSE);
(gdb) x/i $rip
0x8009ee810 <tzload+1888>:      test   %eax,%eax
(gdb) up
#3  0x00000008009eea28 in gmtload (sp=0x800b4d7a0)
    at /usr/src/lib/libc/stdtime/localtime.c:1197
1197            if (tzload(gmt, sp, TRUE) != 0)
(gdb) x/i $rip
0x8009eea28 <gmtload+24>:       test   %eax,%eax
(gdb) up
#4  0x00000008009f1d78 in _once (once_control=0x800b48fe0, init_routine=Variable "init_routine" is not available.
)
    at /usr/src/lib/libc/gen/_once_stub.c:43
43              init_routine();
(gdb) x/i $rip
0x8009f1d78 <_once+24>: movl   $0x1,(%rbx)
(gdb) up
#5  0x00000008009ed80f in gmtsub (timep=0x774bb8, offset=0, tmp=0x800b52040)
    at /usr/src/lib/libc/stdtime/localtime.c:1489
1489            _once(&gmt_once, gmt_init);
(gdb) x/i $rip
0x8009ed80f <gmtsub+47>:
    lea    1441674(%rip),%rdx        # 0x800b4d7a0 <_nsyyout+44408>
(gdb) up
#6  0x00000008009ef097 in gmtime (timep=0x774bb8)
    at /usr/src/lib/libc/stdtime/localtime.c:1550
1550                    gmtsub(timep, 0L, &tm);
(gdb) x/i $rip
0x8009ef097 <gmtime+119>:       jmp    0x8009ef070 <gmtime+80>
(gdb) up
#7  0x00000000004a643a in calloc ()
(gdb) x/i $rip
0x4a643a <calloc+42618>:        mov    %rax,0xffffffffffffff48(%rbp)
(gdb) frame 0
#0  0x00000008009ee0e7 in tzload (name=0xb <Address 0xb out of bounds>,
    sp=0x76fe58, doextend=0) at /usr/src/lib/libc/stdtime/localtime.c:393
393             if (name != NULL && issetugid() != 0)
(gdb)

---
Gary Jennejohn
Received on Wed Dec 02 2009 - 10:23:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:58 UTC