Full_Name: Ralf Haferkamp Version: 2.2.X, HEAD OS: Linux (Kernel 2.6) URL: ftp://ftp.openldap.org/incoming/ralf-haferkamp-040615-bdbcache.dif Submission from: (NULL) (212.95.103.53) 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.
changed state Open to Feedback moved from Incoming to Software Bugs
This suggested fix appears correct to me. I am testing it now and will, if all goes well, commit it to HEAD later today. Thanks, Kurt At 09:42 AM 6/15/2004, rhafer@suse.de wrote: >Full_Name: Ralf Haferkamp >Version: 2.2.X, HEAD >OS: Linux (Kernel 2.6) >URL: ftp://ftp.openldap.org/incoming/ralf-haferkamp-040615-bdbcache.dif >Submission from: (NULL) (212.95.103.53) > > >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.
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
changed state Feedback to Test
Fixes (yours+howard's) have been committed to HEAD and OPENLDAP_REL_ENG_2_2. Please test. Thanks, Kurt At 09:42 AM 6/15/2004, rhafer@suse.de wrote: >Full_Name: Ralf Haferkamp >Version: 2.2.X, HEAD >OS: Linux (Kernel 2.6) >URL: ftp://ftp.openldap.org/incoming/ralf-haferkamp-040615-bdbcache.dif >Submission from: (NULL) (212.95.103.53) > > >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.
changed notes changed state Test to Release
On Thursday 17 June 2004 00:03, Kurt@OpenLDAP.org wrote: > Fixes (yours+howard's) have been committed to HEAD and > OPENLDAP_REL_ENG_2_2. Please test. Thanks, Kurt I reran my testcase again and it works for me now. -- Thanks, Ralf
changed state Release to Closed
moved from Software Bugs to Archive.Software Bugs
fixed in HEAD/re22?