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

FW: slapd segfaults when searching in database with empty suffix (ITS#3063)



This may get ugly. The entry cache code assumes there's an EntryInfo that
corresponds to the database suffix. There are a lot of references to
slap_entry_root here to to fake out references to the empty suffix, and these
are all broken.

  -- 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: owner-openldap-bugs@OpenLDAP.org
[mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of duke@sigsegv.at
Sent: Wednesday, April 07, 2004 6:15 AM
To: openldap-its@OpenLDAP.org
Subject: slapd segfaults when searching in database with empty suffix
(ITS#3063)


Full_Name: Thomas Hager
Version: 2.2.8
OS: Linux
URL:
Submission from: (NULL) (213.164.4.98)


OS: Linux ( 2.4.9-e.3 )
Distribution: RedHat Advanced Server 2.1
OpenLDAP Version: 2.2.8
DB: Berkeley DB 4.2.52 incl. Patch1 and Patch2

i tried upgrading one of my existing ldap databases from OpenLDAP 2.1.27 to
OpenLDAP 2.2.8 and kept the slapd.conf unchanged.
because i use several roots within the same ldap database ( ou=administrative
and dc=. ) i have set suffix to "" in my existing slapd.conf:

database bdb
suffix ""

defaultsearchbase is unset.

this setup works fine with OpenLDAP 2.1.*, but if i import a backup of my
database with OpenLDAP 2.2.8, run the daemon and search in the directory
without
specifying a base DN, slapd segfaults, e.g:

[root@mailtest lib]# ldapsearch -LLL -x -H ldap://localhost/ uid=test1
ldap_result: Can't contact LDAP server (-1)
[root@mailtest lib]#

here's a backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2051 (LWP 11239)]
0x0809594a in bdb_do_search (op=0x81447a0, rs=0x5feb687c, sop=0x81447a0,
    ps_e=0x0, ps_type=0) at search.c:539
(gdb) bt
#0  0x0809594a in bdb_do_search (op=0x81447a0, rs=0x5feb687c, sop=0x81447a0,
    ps_e=0x0, ps_type=0) at search.c:539
#1  0x08095423 in bdb_search (op=0x81447a0, rs=0x5feb687c) at search.c:361
#2  0x08059c8d in do_search (op=0x81447a0, rs=0x5feb687c) at search.c:400
#3  0x08057fa7 in connection_operation (ctx=0x5feb690c, arg_v=0x81447a0)
    at connection.c:1042
#4  0x4002e67b in ldap_int_thread_pool_wrapper (xpool=0x8102ee8) at
tpool.c:467
#5  0x40250c6f in pthread_start_thread (arg=0x5feb6be0) at manager.c:284
#6  0x40250d5f in pthread_start_thread_event (arg=0x5feb6be0) at
manager.c:308
(gdb)