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

Andreas Marienborg andreas at startsiden.no
Thu Jan 31 16:39:54 GMT 2008


On 31. jan.. 2008, at 17.28, Olly Betts wrote:

> 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.
>

yes, 4-way system, but single proc writing (indexer-daemon)


>> 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.
>

I can try, but I might have a hard time reproducing it in anything but  
prod, which is a bit hard to test.


- andreas




More information about the Xapian-discuss mailing list