ITS#7970 LMDB: Critical Heisenbug

Inconsistent reading & SIGSEGV due to the race condition.
vl32b
leo@yuriev.ru 10 years ago committed by Howard Chu
parent 9a80a8a8e8
commit bd6d2e6f2c
  1. 5
      libraries/liblmdb/mdb.c

@ -2558,7 +2558,10 @@ mdb_txn_renew0(MDB_txn *txn)
return rc;
}
}
txn->mt_txnid = r->mr_txnid = ti->mti_txnid;
do /* LY: Retry on a race, ITS#7970. */
r->mr_txnid = ti->mti_txnid;
while(r->mr_txnid != ti->mti_txnid);
txn->mt_txnid = r->mr_txnid;
txn->mt_u.reader = r;
meta = env->me_metas[txn->mt_txnid & 1];
}

Loading…
Cancel
Save