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

Re: (ITS#3684) ldapadd and ldapsearch cause slapd segfault



rob@dsvr.net wrote:

>Unfortunately OpenLDAP wouldn't segfault when compiled with CFLAGS="-g",
>instead it just hung there, with the client attached, so I could only
>get DB-4.2.52 compiled with debugging.
>
>As you can (and have) guessed, I'm a little outside my sphere here, and
>whilst I'd like to help the project, I'm getting out of my depth. I
>shall endeavour to update my skills.
>
>Hope this helps,
>
>So we start slapd in GDB:
>
>$ gdb /path/to/slapd
>run -d -1
>  
>
Use the slapd in the build tree, as the installed binary has all symbols 
stripped. Even without -g there will at least be function names in the 
non-installed binary, which will be more helpful.

><snipped slapd startup and initial ldap connection>
>
>>From another shell on the server run ldapsearch:
>
>[root@ldap-pnb openldap-data]# ldapsearch -w foo -x -b 'o=foo' -D
>'cn=root'
>
>When openldap not compiled with CFLAGS="-g", it immediately returns
>thus:
>
>ldap_result: Can't contact LDAP server (-1)
>
>as slapd has segfaulted.
>
>  
>


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