gdb broken on 9.1/amd64?

Jeremie Le Hen jlh at FreeBSD.org
Thu Mar 7 18:10:46 UTC 2013


(Please Cc: me on reply.)

On Wed, Mar 06, 2013 at 10:50:59PM +0200, Konstantin Belousov wrote:
> On Wed, Mar 06, 2013 at 07:02:22PM +0100, Jeremie Le Hen wrote:
> > root at ingwe:~ # gdb -p 521
> 
> Try to specify the executable binary on the command line.

It works better indeed!

Now I can get a backtrace for sleep(1), but I am experiencing
difficulties to debug OpenSTMPD:

    # gdb /usr/local/sbin/smtpd 25442
    GNU gdb 6.1.1 [FreeBSD]
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "amd64-marcel-freebsd"...
    Attaching to program: /usr/local/sbin/smtpd, process 25442
    Reading symbols from /usr/local/lib/libsqlite3.so.8...done.
    Loaded symbols for /usr/local/lib/libsqlite3.so.8
    Reading symbols from /usr/local/lib/libevent-1.4.so.4...done.
    Loaded symbols for /usr/local/lib/libevent-1.4.so.4
    Reading symbols from /lib/libcrypto.so.6...done.
    Loaded symbols for /lib/libcrypto.so.6
    Reading symbols from /usr/lib/libssl.so.6...done.
    Loaded symbols for /usr/lib/libssl.so.6
    Reading symbols from /lib/libz.so.6...done.
    Loaded symbols for /lib/libz.so.6
    Reading symbols from /lib/libutil.so.9...done.
    Loaded symbols for /lib/libutil.so.9
    Reading symbols from /lib/libcrypt.so.5...done.
    Loaded symbols for /lib/libcrypt.so.5
    Reading symbols from /usr/lib/libpam.so.5...done.
    Loaded symbols for /usr/lib/libpam.so.5
    Reading symbols from /lib/libc.so.7...done.
    Loaded symbols for /lib/libc.so.7
    Reading symbols from /lib/libthr.so.3...done.
    Error while reading shared library symbols:
    Cannot get thread info: invalid key
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    0x000000080ce4281c in kevent () from /lib/libc.so.7
    (gdb) bt
    #0  0x000000080ce4281c in kevent () from /lib/libc.so.7
    #1  0x0000000803104070 in kq_dispatch () from /usr/local/lib/libevent-1.4.so.4
    #2  0x00000008030f802a in event_base_loop () from /usr/local/lib/libevent-1.4.so.4
    #3  0x000000000042fd7f in smtp () at smtp.c:295
    #4  0x0000000000436c0f in fork_peers () at smtpd.c:983
    #5  0x000000000043686d in main (argc=0, argv=0x7fffffff77e8) at smtpd.c:904
    (gdb) c
    Continuing.
    no thread to satisfy query
    0x000000080ce4281c in kevent () from /lib/libc.so.7


The problem is that the process seems hung here, despite the continue.
When I am connecting to it, I say HELO but I don't get any reply if
gdb(1) is attached.

Also, the following might be relevant?

    (gdb)  thread apply all c
    Cannot get thread info: invalid key


Any idea?

Thanks.
Cheers,
-- 
Jeremie Le Hen

Scientists say the world is made up of Protons, Neutrons and Electrons.
They forgot to mention Morons.


More information about the freebsd-stable mailing list