[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
back-bdb resource leak (ITS#2040)
Full_Name: Steven Wilton
Version: 2.1.4
OS: Debian Linux 3.0 (woody) 2.4.18 kernel
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (203.24.100.132)
I noticed that the ldap server is running out of 'locker' entries in the
back-bdb code, and have come up wit the following results:
- Every search on an indexed ldap attribute will result in 1x extra "Current
lock" being used
- Every search that includes (&(objectclass=posixAccount)(uidNumber=x)) with
objectclass indexed as pres,eq results in 5xlockers and 1xlock being used
- Every search that includes (&(objectclass=posixAccount)(uidNumber=x)) with
objectclass indexed as eq results in 2x lockers and 1xlock being used
- Every search that includes (&(uid=y)(uidNumber=x)) (where both attributes are
indexed 'eq' will result in 2x locks being used
- Every search that includes no indexed fileds results in no lost locks or
lockers.
We are using version 4.0.14 of the berkely db library, glibc2.2.5, gcc-3.0 under
linux. The following is the output from various searches and db_stat commands:
sv1:~# db4.0_stat -c -h /var/lib/ldap/
101 Last allocated locker ID.
9 Number of lock modes.
1000 Maximum number of locks possible.
1000 Maximum number of lockers possible.
1000 Maximum number of objects possible.
24 Current locks.
27 Maximum number of locks so far.
61 Current number of lockers.
62 Maximum number lockers so far.
0 Current number lock objects.
6 Maximum number of lock objects so far.
306 Number of lock requests.
306 Number of lock releases.
0 Number of lock requests that would have waited.
0 Number of lock conflicts.
0 Number of deadlocks.
0 Number of transaction timeouts.
0 Number of lock timeouts.
352KB Lock region size (360448 bytes).
0 The number of region locks granted after waiting.
945 The number of region locks granted without waiting.
sv1:~# ldapsearch -b o=EFTEL
'(&(objectclass=posixAccount)(uidNumber=20678))'
# extended LDIF
#
# LDAPv3
# filter: (&(objectclass=posixAccount)(uidNumber=20678))
# requesting: ALL
#
# prolfe, People, q-net, net, au, EFTEL
dn: uid=prolfe,...,o=EFTEL
objectClass: posixAccount
...
uid: prolfe
...
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
sv1:~# db4.0_stat -c -h /var/lib/ldap/
107 Last allocated locker ID.
9 Number of lock modes.
1000 Maximum number of locks possible.
1000 Maximum number of lockers possible.
1000 Maximum number of objects possible.
25 Current locks. <----- +1
28 Maximum number of locks so far.
66 Current number of lockers. <----- +5
67 Maximum number lockers so far.
0 Current number lock objects.
6 Maximum number of lock objects so far.
318 Number of lock requests.
318 Number of lock releases.
0 Number of lock requests that would have waited.
0 Number of lock conflicts.
0 Number of deadlocks.
0 Number of transaction timeouts.
0 Number of lock timeouts.
352KB Lock region size (360448 bytes).
0 The number of region locks granted after waiting.
979 The number of region locks granted without waiting.
sv1:~# ldapsearch -b o=EFTEL uid=swilton
# extended LDIF
#
# LDAPv3
# filter: uid=swilton
# requesting: ALL
#
# swilton, People, vision, net, au, EFTEL
dn: uid=swilton,...,o=EFTEL
objectClass: posixAccount
...
uid: swilton
...
# swilton, People, q-net, net, au, EFTEL
dn: uid=swilton,...,o=EFTEL
objectClass: posixAccount
...
uid: swilton
...
# swilton, People, eftel, net, au, EFTEL
dn: uid=swilton,...,o=EFTEL
objectClass: posixAccount
...
uid: swilton
...
# search result
search: 2
result: 0 Success
# numResponses: 4
# numEntries: 3
sv1:~# db4.0_stat -c -h /var/lib/ldap/
108 Last allocated locker ID.
9 Number of lock modes.
1000 Maximum number of locks possible.
1000 Maximum number of lockers possible.
1000 Maximum number of objects possible.
26 Current locks. <---- +1
29 Maximum number of locks so far.
66 Current number of lockers. <---- unchanged
67 Maximum number lockers so far.
0 Current number lock objects.
6 Maximum number of lock objects so far.
327 Number of lock requests.
327 Number of lock releases.
0 Number of lock requests that would have waited.
0 Number of lock conflicts.
0 Number of deadlocks.
0 Number of transaction timeouts.
0 Number of lock timeouts.
352KB Lock region size (360448 bytes).
0 The number of region locks granted after waiting.
1002 The number of region locks granted without waiting.
And on an unindexed field...
sv1:~# db4.0_stat -c -h /var/lib/ldap/
109 Last allocated locker ID.
9 Number of lock modes.
1000 Maximum number of locks possible.
1000 Maximum number of lockers possible.
1000 Maximum number of objects possible.
27 Current locks.
30 Maximum number of locks so far.
66 Current number of lockers.
67 Maximum number lockers so far.
0 Current number lock objects.
6 Maximum number of lock objects so far.
334 Number of lock requests.
334 Number of lock releases.
0 Number of lock requests that would have waited.
0 Number of lock conflicts.
0 Number of deadlocks.
0 Number of transaction timeouts.
0 Number of lock timeouts.
352KB Lock region size (360448 bytes).
0 The number of region locks granted after waiting.
1021 The number of region locks granted without waiting.
sv1:~# ldapsearch -b o=EFTEL mail=prolfe@q-net.net.au
# extended LDIF
#
# LDAPv3
# filter: mail=prolfe@q-net.net.au
# requesting: ALL
#
# prolfe, People, q-net, net, au, EFTEL
dn: uid=prolfe,...,dc=au,o=EFTEL
...
mail: prolfe@q-net.net.au
...
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
sv1:~# db4.0_stat -c -h /var/lib/ldap/
110 Last allocated locker ID.
9 Number of lock modes.
1000 Maximum number of locks possible.
1000 Maximum number of lockers possible.
1000 Maximum number of objects possible.
27 Current locks. <--- unchanged
30 Maximum number of locks so far.
66 Current number of lockers. <--- unchanged
67 Maximum number lockers so far.
0 Current number lock objects.
6 Maximum number of lock objects so far.
68181 Number of lock requests.
68181 Number of lock releases.
0 Number of lock requests that would have waited.
0 Number of lock conflicts.
0 Number of deadlocks.
0 Number of transaction timeouts.
0 Number of lock timeouts.
352KB Lock region size (360448 bytes).
0 The number of region locks granted after waiting.
114101 The number of region locks granted without waiting.
Indexes on the above queries are as follows:
index objectClass pres,eq
index cn,sn,uid eq
index uidNumber,gidNumber,memberUid eq
during the above test queries, no other queries were sent to the ldap server
from any other program.