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

Re: BadRSlotError: mdb_txn_begin: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot



Luke Kenneth Casson Leighton wrote:

hi all,

the infamous obscure error which people are seeing only very
infrequently is rearing its head at least 2 to 3 times per day in a
test lab where i work.  this is however a secure environment so i
cannot post core-dumps or any details of the application.

given the restrictions, what information is needed and what approach
is needed to debug and fix this?  luckily it's happening a lot so
there's the possibility of a regular iterative approach.

the operating system(s) have been ubuntu 12.04 and also 14.04, both
have resulted in this obscure bug.  bizarrely, this bug occurs in a
*single process*.  it's not even multi-processing.  however
metasync=False, sync=False, map_async=True, readahead=False and
writemap=True.

Use the Source, Luke.

MDB_BAD_RSLOT is returned only one place in mdb.c and the situation is very specific. It means you've tried to begin a new read txn on a thread that already has a read txn outstanding. The API docs are pretty clear that a thread may only have one txn at a time.

You need to track down whatever is creating read txns in your code and make sure they're being properly committed or aborted.

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