[Date Prev][Date Next]
(ITS#3638) back-bdb search stack corruption (with bugfix?)
Full_Name: Rein Tollevik
OS: Solaris 8
Submission from: (NULL) (188.8.131.52)
We was experiencing problems where one-level searches with alias dereferencing
enabled using entries without any children as base took a very long time to
complete (full scan of the database), and occationally caused slapd to die with
a segmentation fault or bus error. This was seen on a Solaris8 system with
OpenLDAP compiled in 64bit modus, using Berkeley DB 4.3.27, but I don't think
this has anything to do with it.
What puzzled me was that the problem only occured with such one-level searches
in leaf entries, other alias dereferencing searches worked as they should. But
I don't know if I was just lucky those times..
>From my debugging it seemed as if old garbage on the search stack was reused
without being initialized first, which the patch fixes.
Note that I haven't looked too much into the search stack usage, nor do we have
any aliases in our database. So I'm not absolutely sure that the patch is the
correct fix. But at least our problems went away after applying it..
Oh, just a wild guess. Can this be related to #3609 or #3634?
diff -c drift/OpenLDAP/servers/slapd/back-bdb/search.c:184.108.40.206
*** drift/OpenLDAP/servers/slapd/back-bdb/search.c:220.127.116.11 Sat Jan 29 21:10:53
--- drift/OpenLDAP/servers/slapd/back-bdb/search.c Mon Feb 14 01:57:13 2005
*** 187,192 ****
--- 187,193 ----
BDB_IDL_ZERO( ids );
BDB_IDL_ZERO( visited );
BDB_IDL_ZERO( newsubs );
+ BDB_IDL_ZERO( subscop );
cursoro = 0;
ido = bdb_idl_first( oldsubs, &cursoro );