[Xapian-discuss] Exception: Couldn't read enough (EOF)

Olly Betts olly at survex.com
Thu Jan 31 16:28:09 GMT 2008


On Thu, Jan 31, 2008 at 08:39:42AM +0100, Andreas Marienborg wrote:
> When I try to issue $db->reopen(); I sometimes (not very often, but  
> often enough to care about it), I get the following exception in the  
> perl wrappings:
> 
> Exception: Couldn't read enough (EOF)
> 
> What can cause this?

A bug!

> Can it fail if something is commiting when I issue the call?

I think this is probably the case.  We write the new base file in place
so if you open or call reopen() on a database in the middle of this,
then it can probably fail like this.

This explanation could be wrong, as the low level routine which throws
that exception is called from a number of places, but it looks like
there's a potential issue here, even if you aren't hitting it.

Are you on a multicore/multiprocessor machine?  That might make this
more likely to manifest.

> I am currently running xapian 1.0.4 on amd64 machines, with a custom  
> Search::Xapian (patched to catch errors in Enquire.xs)
> 
> if I can provide anything else, just ask :)

I think I need to write a patch and get you to test it.  As a
workaround, catching the exception and simply retrying reopen() should
do the trick.

Cheers,
    Olly



More information about the Xapian-discuss mailing list