notmuch: Xapian exception during database creation

David Edmondson dme at dme.org
Fri Dec 29 15:00:47 GMT 2017


Running notmuch from git on Debian testing[1] with the mail and database
sitting on a ZFS filesystem, adding mail to a new database:

> agrajag-testing ~/s/notmuch % ./notmuch new
> Found 605510 total files (that's not much mail).
> add_file: A Xapian exception occurred36m 37s remaining).
> A Xapian exception occurred adding message: Unexpected end of posting list for 'G0000000000014364'.
> Processed 137296 total files in 1h 21m 17s (28 files/sec.).
> Added 135950 new messages to the database.
> Note: A fatal error was encountered: A Xapian exception occurred
> agrajag-testing ~/s/notmuch % 

This happens consistently at this point in the process - if I remove the
database and start again it will fail at the same place.

After the failure the database appears to be okay:

> agrajag-testing ~/s/notmuch % xapian-check ~/Maildir/.notmuch/xapian
> docdata:
> blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
> void B-tree checked okay
> docdata table structure checked OK
> 
> termlist:
> blocksize=8K items=0 firstunused=2 revision=1 levels=0 root=(faked)
> void B-tree checked okay
> termlist table structure checked OK
> 
> postlist:
> blocksize=8K items=2 firstunused=1 revision=1 levels=0 root=0
> B-tree checked okay
> postlist table structure checked OK
> 
> position:
> blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
> void B-tree checked okay
> position table structure checked OK
> 
> spelling:
> Lazily created, and not yet used.
> 
> synonym:
> Lazily created, and not yet used.
> 
> No errors found
> agrajag-testing ~/s/notmuch % 

If I don't remove the database and start the scan again, it will
eventually fail again:

> agrajag-testing ~/s/notmuch % ./notmuch new                         
> add_file: A Xapian exception occurred).
> A Xapian exception occurred adding message: Unexpected end of posting list for 'G0000000000014364'.
> Processed 137296 total files in 1h 22m 6s (27 files/sec.).
> Added 135950 new messages to the database.
> Note: A fatal error was encountered: A Xapian exception occurred
> agrajag-testing ~/s/notmuch % 

At which point the database *sometimes* appears to be corrupted, but
(sod's law), not while I was preparing this message.

Unfortunately I can't share the dataset, as it contains mail belonging
to my employer :-(

Any suggestions on how to go about debugging this?

Footnotes: 
[1]  Actually a Debian testing Docker container running on a Debian
stable host, but the same failure happens with the Debian
stable-backport version of notmuch running on Debian stable, just with
less useful error messages.

dme.
-- 
Tonight I think I'll walk alone, I'll find my soul as I go home.



More information about the Xapian-discuss mailing list