[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LMDB: issue with mdb_cursor_del
- To: timur.kristof@gmail.com, openldap-devel@openldap.org
- Subject: Re: LMDB: issue with mdb_cursor_del
- From: Howard Chu <hyc@symas.com>
- Date: Mon, 16 Oct 2017 11:51:08 +0100
- In-reply-to: <WM!6792c78afef18c1854e94e0a10cf3008b6580c69be5346e0f130cde6864c6423c43df31f7af634f227b1dd65acdaf163!@mailstronghold-1.zmailcloud.com>
- References: <1508140841.7618.10.camel@gmail.com> <WM!6792c78afef18c1854e94e0a10cf3008b6580c69be5346e0f130cde6864c6423c43df31f7af634f227b1dd65acdaf163!@mailstronghold-1.zmailcloud.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 SeaMonkey/2.53a1
timur.kristof@gmail.com wrote:
Hi,
I have an app that uses LMDB, and I've experienced an interesting
issue: when trying to delete a certain item with mdb_cursor_del, it
crashed with the following backtrace: https://pastebin.com/7p9wtkj9
It appears that it couldn't mark a page as dirty.
Here is the relevant assertion from mdb_page_dirty:
rc = insert(txn->mt_u.dirty_list, &mid);
mdb_tassert(txn, rc == 0); // assertion failed
What might I be doing wrong in my application that triggers this sort
of error?
Take a look at the value of rc, then look in midl.c. Most likely the dirty
list is too big, which means you're trying to do too much in a single transaction.
Also interesting:
The database was about 60MB, and I now compacted it using mdb_copy -c.
Now it is only ~6MB, and running the app with the compacted database,
the above error also disappeared.
I'm not sure why the compacting fixed the problem, could somebody offer
an insight about this?
Thank you guys in advance for your answers!
Best regards,
Timur
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/