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

Re: slapd (back-bdb) crashing during high modify load (ITS#3188)



rhafer@suse.de wrote:

> I ran a test with about 20 concurrent clients all modifying (replacing) the same
> Attribute of the same entry. During this test slapd segfaulted in
> bdb_modify_internal(). Different debugging sessions showed that it always
> segfaulted when accessing save_attrs struct.
> 
> Also in the log I could always see  "bdb_cache_entry_db_relock entry 225, rw 1,
> rc -30995" shorlty before the crash ( -30995 is DB_LOCK_DEADLOCK ).
> 
> bdb_cache_entry_db_relock is called be bdb_cache_modify() which is ignoring this
> error code and seems to free the struct that save_attrs is pointing to. 
> 
> I uploaded a small patch that fixes the problem for me. I am not quite sure it
> is completely correct though.

Looks like a good catch. Probably the same fix is needed for modrdn and 
delete. I'll take another look.
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.       Director, Highland Sun
   http://www.symas.com               http://highlandsun.com/hyc
   Symas: Premier OpenSource Development and Support