[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Call For Assistance #4 - slapd won't die gracefully, multiple versions.

The first time I did have debugging symbols. I did run from the build tree after compiling with -g but alas I did re-compile without -O.

Here's what was passed to configure from make:

configure:3141: cc -c -g -fPIC -I/usr/local/include/db42 -D_THREAD_SAFE -I/usr/local/include

Now then, here's my typescript:

Script started on Sat Apr 17 13:13:41 2004
GNU gdb 6.1
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-unknown-freebsd5.2.1".
(gdb) file slapd
Reading symbols from slapd...done.
(gdb) run -d 256
Starting program: /usr/ports/net/openldap22-server/work/openldap-2.2.8/servers/slapd/ .libs/slapd -d 256
@(#) $OpenLDAP: slapd 2.2.8 (Apr 17 2004 12:53:34) $
jlixfeld@eshara.ebit.ca:/usr/ports/net/openldap22-server/work/openldap -2.2.8/servers/slapd
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
bdb_db_init: Initializing BDB database
slapd starting
conn=0 fd=15 ACCEPT from IP= (IP=
conn=0 op=0 BIND dn="" method=128
conn=0 op=0 RESULT tag=97 err=0 text=
conn=0 op=1 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
conn=0 op=1 SRCH attr=namingContexts
conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
conn=0 op=2 UNBIND
conn=0 fd=15 closed

Program received signal SIGINT, Interrupt.
0x00000002014e669c in poll () from /lib/libc.so.5
(gdb) info threads
(gdb) thread apply all bt
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Script done on Sat Apr 17 13:15:17 2004

Before I ran the SIGINT in another window, I ran this command to the server from a different window:

ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts

There is no backtrace or anything so I must be doing something wrong... should I hard kill slapd then try the backtrace?!

On Apr 17, 2004, at 3:40 AM, Howard Chu wrote:

It looks like your binary had the debug symbols stripped. "make install" does
this by default. You should use the unstripped binary in your build tree.
Also make sure your CFLAGS had no -O optimization options; they tend to
obscure the information that the debugger works with.

Next time, in gdb try
	info threads
	thread apply all bt

See "man script" re: saving the session output into a file.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

-----Original Message-----
From: Jason Lixfeld [mailto:jason+lists.openldap@lixfeld.ca]

Ok, I've got gdb installed and I re-compiled openldap 2.1.29 with -g
and am running it through gdb.  I've done:

file slapd
run -d 256
and I've sent a transaction to the server and killed it with
-INT.  I'm
at the gdb prompt then I do bt full and it gives me multiple lines of
output until line #10211 and spits out this error:

Error accessing memory address 0x6ed000: Bad address.

Now, is there a way to pipe the backtrace into a file or
something?  is
a full backtrace what you need?  I don't know anything about
etc but the info that's in there doesn't say a hell of a lot.  For

(gdb) bt full
#0  0x000000020140569c in poll () from /lib/libc.so.5
No symbol table info available.
#1  0x000000020129d5a9 in _thread_kern_sched_state_unlock () from
No symbol table info available.
#2  0x000000020129cfe3 in _thread_kern_scheduler () from
No symbol table info available.
#3  0x0000000000000000 in ?? ()
No symbol table info available.
#4  0x0000000000000000 in ?? ()