[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Deadlocks when writing in parallell (two processes)
We get a lot of DB_LOCK_DEADLOCK when using to programs that for a
period of time continuosly writes to OpenLDAP.
Version is 2.3.39.
The information added is of the form:
ebcmdCustomer=0+ebcmdDir=220xx,ou=AuthCodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com
where xx varies.
Snippet of the output:
Mar 27 13:03:21 ldapt1 slapd[7589]: => bdb_dn2id_add: subtree
(ebcmdCustomer=0+ebcmdDir=22037,ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com)
put failed: -30995
Mar 27 13:03:26 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id
failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995)
Mar 27 13:03:26 ldapt1 slapd[7589]: => bdb_dn2id_add: parent
(ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com)
insert failed: -30995
Mar 27 13:03:28 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id
failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995)
Mar 27 13:03:28 ldapt1 slapd[7589]: => bdb_dn2id_add: parent
(ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com)
insert failed: -30995
Mar 27 13:03:36 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id
failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995)
Mar 27 13:03:36 ldapt1 slapd[7589]: => bdb_dn2id_add: parent
(ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com)
insert failed: -30995
Mar 27 13:03:38 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id
failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995)
I see in the code that a key (the same it seems to be) is repeatedly
written, and a comment is stating that
/* Don't worry if it's already there */ (line 862 in
servers/slapd/back-bdb/idl.c).
Is this to be expected or have we done something wrong?
/Stelios Grigoriadis