OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Software Bugs/8336
Full headers

From: h.b.furuseth@usit.uio.no
Subject: assert(NUMKEYS(mp) > 1) in mdb_page_search_root()
Compose comment
Download message
State:
0 replies:
1 followups: 1

Major security issue: yes  no

Notes:

Notification:


Date: Tue, 08 Dec 2015 15:22:57 +0000
From: h.b.furuseth@usit.uio.no
To: openldap-its@OpenLDAP.org
Subject: assert(NUMKEYS(mp) > 1) in mdb_page_search_root()
Full_Name: Hallvard B Furuseth
Version: LMDB 0.9.17
OS: Linux x86_64
URL: 
Submission from: (NULL) (129.240.203.186)
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.

Followup 1

Download message
Subject: Re: (ITS#8336) assert(NUMKEYS(mp) > 1) in mdb_page_search_root()
To: h.b.furuseth@usit.uio.no, openldap-its@OpenLDAP.org
From: Howard Chu <hyc@symas.com>
Date: Tue, 8 Dec 2015 18:03:17 +0000
h.b.furuseth@usit.uio.no wrote:
> Full_Name: Hallvard B Furuseth
> Version: LMDB 0.9.17
> OS: Linux x86_64
> URL:
> Submission from: (NULL) (129.240.203.186)
> 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/


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org