Issue 8237 - Crash with MDB_MAXKEYSIZE=1500
Summary: Crash with MDB_MAXKEYSIZE=1500
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: 2015-09-06 12:58 UTC by Hallvard Furuseth
Modified: 2015-11-30 18:27 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 2015-09-06 12:58:07 UTC
Full_Name: Hallvard B Furuseth
Version: LMDB 0.9.10-0.9.15
OS: Linux x86_64
URL: 
Submission from: (NULL) (81.191.45.5)
Submitted by: hallvard


Assertion 'NUMKEYS(mp) > 1' failed in mdb_page_search_root():

#define MDB_MAXKEYSIZE 1500
#include "mdb.c"
#include "midl.c"

int main(void)
{
    MDB_dbi dbi;
    MDB_env *env;
    MDB_txn *txn;
    int i, rc =DMDB_SUCCESS;
    mdb_env_create(&env);
    mdb_env_open(env, "./testdb", MDB_WRITEMAP, 0664);
    mdb_txn_begin(env, NULL, 0, &txn);
    mdb_dbi_open(txn, NULL, 0, &dbi);
    for (i = 0; i < 6 && !rc; i++) {
        static char buf[1600] = "340215";
       DB_v_val key = {1500, buf+i}, data = {500, buf};
        mdb_put(txn, dbi, &key, &data, 0);
    }
    mdb_txn_abort(txn);
    mdb_env_close(env);
    return rc;
}

Broken by 34459e05856619e8 "ITS#7589 another mdb_page_split fix".
Comment 1 Hallvard Furuseth 2015-09-06 13:04:00 UTC
I wrote:
> Assertion 'NUMKEYS(mp) > 1' failed in mdb_page_search_root():

The paste got munged.  Test program at
<ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-150906.c>.

Comment 2 Howard Chu 2015-10-25 08:38:38 UTC
h.b.furuseth@usit.uio.no wrote:
> I wrote:
>> Assertion 'NUMKEYS(mp) > 1' failed in mdb_page_search_root():
>
> The paste got munged.  Test program at
> <ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-150906.c>.

Fixed.

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

Comment 3 OpenLDAP project 2015-10-25 08:39:29 UTC
fixed in mdb.master,MDB.re/0.9
Comment 4 Howard Chu 2015-10-25 08:39:29 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 5 Quanah Gibson-Mount 2015-11-30 18:27:54 UTC
changed state Test to Closed