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

RE: web500gw causing slapd segfault (ITS#83)

Hi Kurt,

More information -- since I've had some time to stick gdb in there. (And do
a make veryclean, configure --without-threads and make)

This appears to do with aliasing:  I can reproduce the problem with
ldapsearch -b 'o=bogus,c=us' -a find/always 'objectclass=*'

And for a stack trace:
#0  ch_strdup (string=0x0) at ch_malloc.c:72
#1  0x805bd40 in dn2id (be=0x807cdf8, dn=<error type>) at dn2id.c:72
#2  0x805c188 in dn2entry (be=0x807cdf8, dn=<error type>,
    matched=<error type>, rw=0) at dn2id.c:174
#3  0x805c29e in dn2entry_r (be=0x807cdf8, dn=<error type>,
    matched=<error type>) at dn2id.c:218
#4  0x8061b76 in derefDN (be=0x807cdf8, conn=0x8086c00, op=0x8085778,
    dn=0x80857d8 "O=BOGUS,C=US") at alias.c:281
#5  0x806075d in ldbm_back_search (be=0x807cdf8, conn=0x8086c00,
    op=<error type>, base=<error type>, scope=2, deref=3, slimit=500,
    tlimit=3600, filter=<error type>, filterstr=<error type>,
    attrs=<error type>, attrsonly=0) at search.c:82
#6  0x804bb90 in do_search (conn=0x8086c00, op=<error type>) at search.c:149
#7  0x804b290 in connection_operation (arg_v=0x8085768) at connection.c:74
#8  0x806a8d0 in ldap_pvt_thread_create (thread=0x80857a0, detach=1,
    start_routine=0x804b0e0 <connection_operation>, arg=0x8085768)
    at thr_stub.c:40
#9  0x804b71e in connection_activity (conn=0x8086c00) at connection.c:207
#10 0x804aea7 in slapd_daemon (port=0x2382) at daemon.c:362
#11 0x806a8d0 in ldap_pvt_thread_create (thread=0x80766fc, detach=0,
    start_routine=0x8049dfc <slapd_daemon>, arg=0x2382) at thr_stub.c:40
#12 0x8049a53 in main (argc=5, argv=0xbffff9c8) at main.c:202

The problem seems to be ...servers/slapd/back-ldbm/alias.c:281 where newDN
is null.  I'm guessing that this causes the stack to be smashed in strdup.

One guess is that my slapd.conf isn't configured correctly.  This is also
the case though, with the umich example (which will blow up with
'on=x,o=University of Michigan,c=US' )

Hope this helps,


> -----Original Message-----
> From: Ranjan Bagchi [mailto:ranjan.bagchi@pobox.com]
> Sent: Tuesday, March 02, 1999 11:53 AM
> To: Kurt Zeilenga
> Subject: RE: web500gw causing slapd segfault (ITS#83)
> Hi Kurt,
> I submitted the [one-line] backtrace as a comment to the report.
> (gdb) bt
> #0  0x4007d082 in strdup ()
> (gdb)
> I'd guess that this bug is corrupting the stack.
> -rj
> > -----Original Message-----
> > From: Kurt Zeilenga [mailto:openldap-its@OpenLDAP.org]
> > Sent: Monday, March 01, 1999 10:21 AM
> > To: ranjan.bagchi@pobox.com
> > Subject: Re: web500gw causing slapd segfault (ITS#83)
> >
> >
> > Please provide a debugger backtrace if at all possible.  Thanks.
> >
> >