Issue 8756 - assertion in mdb_page_dirty() due to loose pages
Summary: assertion in mdb_page_dirty() due to loose pages
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-19 06:10 UTC by Hallvard Furuseth
Modified: 2018-12-19 17:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Hallvard Furuseth 2017-10-19 06:10:34 UTC
Full_Name: Hallvard B Furuseth
Version: mdb.master, bb8502f08800a44a6b91a94d6478aa7101c4cc77
OS: 
URL: 
Submission from: (NULL) (193.71.61.52)
Submitted by: hallvard


Described here with a fix, and with discussion in the thread:
http://www.openldap.org/lists/openldap-devel/201710/msg00019.html

"Inside freelist_save() the mt_loose_pages could be merged into the
mt_free_pgs.
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=libraries/liblmdb/mdb.c;h=1bf81ed4c87901991b7cac885b0d8cbc4dd23436;hb=bb8502f08800a44a6b91a94d6478aa7101c4cc77#l3444

But at this point all loose_pages also still present in the mt_u.dirty_list.
On the next loop inside freelist_save() a one more page could be
requested, and page_alloc() could return a page which is already in
the mt_u.dirty_list.
In this case mdb_mid2l_insert() will return -1."

We could catch and handle the error when WRITEMAP is not in use.

Another fix is for freelist_save() to quit messing with loose
pages and just reserve room for them, like it does for me_pghead.

In LMDB 1.0, we'll have more options.
Comment 1 Howard Chu 2018-06-22 15:32:18 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 OpenLDAP project 2018-12-19 17:17:49 UTC
fixed in mdb.master
fixed in mdb.re09 (0.9.23)
Comment 3 Quanah Gibson-Mount 2018-12-19 17:17:49 UTC
changed notes
changed state Test to Closed