[Date Prev][Date Next]
Re: (ITS#8336) assert(NUMKEYS(mp) > 1) in mdb_page_search_root()
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8336) assert(NUMKEYS(mp) > 1) in mdb_page_search_root()
- From: email@example.com
- Date: Tue, 08 Dec 2015 18:03:37 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
> Full_Name: Hallvard B Furuseth
> Version: LMDB 0.9.17
> OS: Linux x86_64
> Submission from: (NULL) (18.104.22.168)
> Submitted by: hallvard
> $ mtest_rand -c0 -i10000 -p0x100 -r562822527.3 -w
> // Options for replay: [-v] -c0 -i10000 -p0x100 -r562822527.3 -w
> ../mdb.c:5276: Assertion 'NUMKEYS(mp) > 1' failed in mdb_page_search_root()
> Aborte%2(core dumped)
> Broken by 4b01cb3 "ITS#8221 don't merge branch pages needlessly"
> according to git bisect.
The assert occurs during txn_commit while updating the freeDB. During
rebalance, a branch page in the freeDB has been reduced to only 1 key. This
page is operated on by another (recursive) rebalance. During page_touch, a new
page is needed, which calls page_alloc, which needs to acquire a free page
from the freeDB. The resulting search trips this assert because it walks down
thru the branch page that is currently being rebalanced.
We could simply remove the assert; if we let things progress then eventually
the rebalance will succeed and the branch page will be correct. We could also
conditionalize the assert so that it ignores the freeDB. Or we can just ignore
the problem entirely, because it only occurs on tiny 256 byte pages.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/