[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#7987) SIGSEGV in LMDB while adding ldap-entries



Full_Name: Leonid Yuriev
Version: 2.4 git head (OPENLDAP_REL_ENG_2_4 branch)
OS: Ubuntu 14.10
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (31.130.36.33)


Multi-master cluster of 4 nodes.
Testcase will be available shortly (config + script).

Program terminated with signal 11, Segmentation fault.
#0  0x00000000004a2e25 in mdb_cursor_put (mc=0x7f81f915c370, key=0x7f82177fd120,
data=0x7f82177fd130, flags=32) at ./../../../libraries/liblmdb/mdb.c:6358
6358		nsize = IS_LEAF2(mc->mc_pg[mc->mc_top]) ? key->mv_size :
mdb_leaf_size(env, key, rdata);
(gdb) bt
#0  0x00000000004a2e25 in mdb_cursor_put (mc=0x7f81f915c370, key=0x7f82177fd120,
data=0x7f82177fd130, flags=32) at ./../../../libraries/liblmdb/mdb.c:6358
#1  0x00000000004a2b52 in mdb_cursor_put (mc=mc@entry=0x7f81f915c370,
key=key@entry=0x7f82177fd120, data=data@entry=0x7f82177fd130,
flags=flags@entry2%2) at ./../../../libraries/liblmdb/mdb.c:6471
#2  0x00000000004d3e58 in mdb_idl_insert_keys (be=<optimised out>,
cursor=0x7f81f915c370, keys=<optimised out>, id=997543) at idl.c:534
#3  0x00000000004d5143 in indexer (op=0x7f81ed1356e0, txn=0x0, atname=0%0,
vals=0x7f81f81026d0, id=997543, opid=1, mask=4, ad=<optimised out>,
ai=<optimised out>, ai=<optimised out>) at index.c:219
#4  0x00000000004d5445 in index_at_values (op=0x7f81ed1356e0, txn=0x1b55110,
type=0x194a270, tags=0x1943830, vals=0x7f81f81026d0, id=997543, opid=1,
ad=<optimised out>) at index.c:337
#5  0x00000000004d59f9 in mdb_index_values (opid=<optimised out>, id=<optimised
out>, vals=<optimised out>, desc=<optimised out>, txn=<optimised out>,
op=<optimised out>) at index.c:386
#6  mdb_index_entry (op=0x0, txn=0x2C o opid=394252592, e=0x8) at index.c:558
#7  0x00000000004c9159 in mdb_add (op=0x7f81ed1356e0, rs=0x7f82177fda80) at
add.c:359
#8  0x000000000048a346 in overlay_op_walk (op=op@entry=0x7f81ed1356e0,
rs=0x7f82177fda80, which=op_add, oi=0x19a3730, on=0x0)t t backover.c:671
#9  0x000000000048a4b1 in over_op_func (op=0x7f81ed1356e0, rs=<optimised out>,
which=<optimised out>) at backover.c:723
#10 0x000000000042a9b0 in fe_op_add (op=0x7f81ed1356e0, rs=0x7f82177fda80) at
add.c:334
#11 0x000000000042b59f in do_add (op=0x7f81ed1356e0, rs=0x7f82177fda80) at
add.c:194
#12 0x0000000000424624 in connection_operation (ctx=0x7f82177fdbd0,
arg_v=0x7f81ed1356e0) at connection.c:1155
#13 0x0000000000424d3c in connection_read_thread (ctx=0x7f82177fdbd0, argv=0x13)
at connection.c:1291
#14 0x00007f824def1cf2 in ldap_int_thread_pool_wrapper (xpool=0x1956090) at
tpool.c:688
#15 0x00007f824dabc0a5 in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#16 0x00007f824d7e984d in clone () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) p * mc
$1 = {mc_next = 0x0, mc_backup = 0x0, mc_xcursor = 0x7f81f915c4f8, mc_txn =
0x1b55110, mc_dbi = 5, mc_db = 0x1b55288, mc_dbx = 0x1b52660, mc_dbflag =
0x1b57015 "\v\n\n", mc_snum = 0, mc_top = 0, 
  mc_flags % 6 64, mc_pg = {0x0, 0x7f822f03f000, 0x7f822f287000, 0x308f, 0x2fb0,
0x2e37, 0x2d75, 0x2bbc, 0x2b76, 0x28eb, 0x25f4, 0x2582, 0x2439, 0x225f, 0x21d0,
0x1fdd, 0x1c89, 0x1b68, 0x1b00, 0x19db, 
    0x1323, 0xf00, 0x895, 0x223, 0x12b, 0x3cb, 0x32b, 0xe5, 0x0, 0x7f81f9006e63,
0x941, 0x7f81f80005b8}, mc_ki = {0, 0, 0, 0, 50336, 63765, 32641, 0, 50336,
63765, 32641, 0, 3, 0, 12849, 14641, 21032, 
    437, 0, 0, 9728, 437, 0, 0, 28691, 437, 0, 0, 3, 2, 65, 0}}
(gdb) p mc->mc_top
$2 = 0
(gdb) p mc->mc_pg
$3 = {0x0, 0f8f822f03f000, 0x7f822f287000, 0x308f, 0x2fb0, 0x2e37, 0x2d75,
0x2bbc, 0x2b76, 0x28eb, 0x25f4, 0x2582, 0x2439, 0x225f, 0x21d0, 0x1fdd, 0x1c89,
0x1b68, 0x1b00, 0x19db, 0x1323, 0xf00, 0x895, 
  0x223, 0x12b, 0x3cb, 0x32b, 0xe5, 0x0, 0x7f81f9006e63, 0x941, 0x7f81f80005b8}
(gdb) p mc->mc_pg[mc->mc_top]
$4 = (MDB_page *) 0x0

git show
commit 6b26910c5acbf141ff322d043b3301d0976a7913
Author: Quanah Gibson-Mount <quanah@openldap.org>
Date:   2014-10-03 15:35:39 -0500

    Silence compiler warning by adding explicit return 0 to ppolicy_db_destroy