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

slapd Segmentation fault (ITS#1457)



Full_Name: Joon Jack Yap
Version: openldap-2.0.18
OS: Red Hat 7.1 (2.4.9 smp)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (168.159.45.99)


Hi, 
    There is a problem with my openldap server. There following is the error
messages that is logged in /var/log/messages.

Nov 20 09:50:39 linux151 out of memory [14001^^^M^O@out]
Nov 20 09:50:39 linux151 out of memory [14001Y¡^W@out]

Whenever the ldap server try to increase its cache in memory. it crahed and
complain that there is not enough memory, but there are actually about 2 Gb of
memory that are not being used. This only happen when I run the test for about
an hour and the usage of memory is about 1.2 Gb.

Here are the breif description of the environement that I am running in:
Red Hat Linux 7.1 with kernel 2.4.9 (smp)
High Memory Support
Memory = 3Gb

openldap-2.0.18
ldbm = SleepyCat (db-3.1.17.tar.gz)

Here is a snapshot of vmstat when the crashed occur.
   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  0  0      0 1776124   6760 712544   0   0     0     0  331  2010   5   7 
89
 0  0  0      0 1762568   7432 1250520  0   0     2 150788 2210  1906   1  22 
77

Here are some of the info that I got while running slapd in debug mode.
====> cache_return_entry_r( 52659 ): created (0)
send_ldap_search_result 0::
send_ldap_response: msgid=137114 tag=101 err=0
ber_flush: 16 bytes to sd 15
connection_get(15): got connid=1
connection_read(15): checking for input on id=1
ber_get_next
ber_get_next: tag 0x30 len 196 contents:
ber_get_next
ber_get_next on fd 15 failed errno=11 (Resource temporarily unavailable)
do_search
ber_scanf fmt ({aiiiib) ber:
ber_scanf fmt ({oo}) ber:
ber_scanf fmt ({oo}) ber:
ber_scanf fmt ({v}}) ber:
=> ldbm_back_search
dn2entry_r: dn: "DC=EMC,DC=COM"
=> dn2id( "DC=EMC,DC=COM" )
====> cache_find_entry_dn2id("DC=EMC,DC=COM"): 1 (1 tries)
<= dn2id 1 (in cache)
=> id2entry_r( 1 )
====> cache_find_entry_id( 1 ) "dc=emc,dc=com" (found) (1 tries)
<= id2entry_r( 1 ) 0x817df90 (cache)
search_candidates: base="DC=EMC,DC=COM" s=2 d=0
=> filter_candidates
=> list_candidates 0xa0
=> filter_candidates
=> dn2idl( "@DC=EMC,DC=COM" )
=> ldbm_cache_open( "dn2id.dbb", 73, 600 )
<= ldbm_cache_open (cache 0)
<= filter_candidates 500016
=> filter_candidates
=> list_candidates 0xa1
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "objectClass.dbb", 73, 600 )
<= ldbm_cache_open (cache 3)
=> key_read
<= index_read 0 candidates
<= equality_candidates NULL
<= equality_candidates 0
<= filter_candidates 0
=> filter_candidates
=> list_candidates 0xa0
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "objectClass.dbb", 73, 600 )
<= ldbm_cache_open (cache 3)
=> key_read
<= index_read 500016 candidates
<= equality_candidates 500016
<= filter_candidates 500016
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "uid.dbb", 73, 600 )
<= ldbm_cache_open (cache 4)
=> key_read
<= index_read 1 candidates
<= equality_candidates 1
<= filter_candidates 1
<= list_candidates 1
<= filter_candidates 1
<= list_candidates 1
<= filter_candidates 1
<= list_candidates 1
<= filter_candidates 1
====> cache_return_entry_r( 1 ): returned (0)
=> id2entry_r( 52659 )
====> cache_find_entry_id( 52659 ) "uid=mtest235840,ou=People,dc=emc,dc=com"
(foun
d) (1 tries)
<= id2entry_r( 52659 ) 0x59c83cf8 (cache)
=> send_search_entry: "uid=mtest235840,ou=People,dc=emc,dc=com"
ber_flush: 211 bytes to sd 15
<= send_search_entry
====> cache_return_entry_r( 52659 ): returned (0)
send_ldap_search_result 0::
send_ldap_response: msgid=137115 tag=101 err=0
ber_flush: 16 bytes to sd 15
Segmentation fault


***** sdap.conf **************
>database        ldbm
>suffix          "dc=emc,dc=com"
>#suffix         "o=My Organization Name,c=US"
>rootdn          "cn=Manager,dc=emc,dc=com"
>#rootdn         "cn=Manager,o=My Organization Name,c=US"
># Cleartext passwords, especially for the rootdn, should
># be avoid.  See slappasswd(8) and slapd.conf(5) for details.
># Use of strong authentication encouraged.
>rootpw          secret
># The database directory MUST exist prior to running slapd AND
># should only be accessible by the slapd/tools. Mode 700 recommended.
>directory       /usr/local/var/openldap-ldbm
># cache
>cachesize 430000
>#db cache
>#dbcachesize 500000
># Indices to maintain
>#index  objectClass     eq
>index   objectClass,uid,uidNumber,gidNumber     eq
>index   cn                                      eq,subinitial
>****************slapd.conf*********************************