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

Re: (ITS#8258) LMDB cursor_del followed by MDB_NEXT can trigger assert crash



hyc@symas.com wrote:
> steven.lang@hgst.com wrote:
>> Full_Name: Steven Lang
>> Version: LMDB 0.9.16
>> OS: Ubuntu 14.04
>> URL: ftp://ftp.openldap.org/incoming/steven-lang-150929.c
>> Submission from: (NULL) (199.255.44.5)
>>
>>
>> While doing some testing using randomized key and data lengths and random puts
>> and deletes, I found a situation in which mdb_cursor_del(...) followed by
>> mdb_cursor_get(..., MDB_NEXT) causes an error:
>>
>> mdb.c:5726: Assertion 'IS_LEAF(mp)' failed in mdb_cursor_next()
>> Aborted

>> Attached is a program which fills a DB, then deletes keys until it asserts.
>
> Thanks for the report. Our alternate approach to solve #8221 was to check the
> page fill factor including the (usually omitted) key #0 size; we didn't go
> that way because it was slightly more processing. But given this bug, it seems
> that's the only way to go.
>
Fixed now in git, thanks.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/