Package: libxapian30
Version: 1.4.3-2+deb9u1
Severity: important
Tags: patch upstream
Control: fixed -1 1.4.7-1

The glass backend (the default disk-based backend in Xapian 1.4.x) has a
bug with long-lived cursors on a table in a WritableDatabase which can
get into an invalid state, typically leading to a DatabaseCorruptError
being thrown with the message:

    Db block overwritten - are there multiple writers?

But in fact the on-disk database is not corrupted - it's just that
the cursor in memory has got into an inconsistent state.  It looks
like we'll always detect the inconsistency before it can cause on-disk
corruption but it's hard to be completely certain.

The bug is in code to rebuild the cursor when the underlying table
changes in ways which require that, which is a fairly rare occurrence
to start with, and only triggers when a block in the cursor has been
released, reallocated, and we tried to load it in the cursor at the
same level - the cursor wrongly assumes it has the current version
of the block.

The usage patterns of notmuch can trigger this bug (at least two
different notmuch users have hit it, and both reported 1.4.7 fixed
their problems).  It's also been encountered by at least one other
person in their own code (they provided a cut-down reproducer that
helped pin it down).

This bug was fixed in upstream 1.4.7 which was released and packaged
for Debian 3.5 weeks ago - no issues have been reported with the fix.

https://git.xapian.org/?p=xapian;a=commitdiff;h=70266397a517e213977f49c5b7c2c91389c88879

I'm intending to propose fixing this in stretch.

Cheers,
    Olly

Reply via email to