Assertion failure in log.c with in memory log files.
885300Oct 3 2011 — edited Oct 15 2011I'm trying to use a berkeley DB environment in an entirely in memory configuration as per the guide here
http://download.oracle.com/docs/cd/E17076_02/html/articles/inmemory/C/index.html
My test was to spawn 8 threads and have each insert 10,000 objects into an in memory database.
When running my test in Debug mode under MSVC++ I'm getting an assertion on line 1421 of log.c in __log_inmem_newfile.
This doesn't happen every time.
Here is the text of the line:
DB_ASSERT(dblp->env, !first || first == last ||
RINGBUF_LEN(lp, first->b_off, lp->b_off) ==
RINGBUF_LEN(lp, first->b_off, last->b_off) +
RINGBUF_LEN(lp, last->b_off, lp->b_off));
Here is an example of the values I'm seeing during one crash in my debugger from the parts of the expression:
lp->buffer_size == 1048576
first == 0x005bb1a8
last == 0x005bb428
lp->b_off == 125508
first->b_off == 917040
last->b_off == 911932
In release mode it seems to complete fine.
This problem happend with Berkeley DB Version 5.2.28 and I then upgraded to 5.2.36 and confirmed that it still happens.