[Xapian-discuss] Threaded test (in C++) to reproduce our database problems
Olly Betts
olly@survex.com
Thu, 17 Jun 2004 14:48:36 +0100
On Thu, Jun 17, 2004 at 02:29:29PM +0100, Olly Betts wrote:
> A quick poke in /usr/include suggests the only likely issue might be
> errno which uses a per-thread version if _LIBC_REENTRANT is defined (but
> nothing seems to define that).
Looking more closely, it also uses it if _LIBC is *NOT* defined. And it
isn't by default. Checking preprocessed output confirms this.
> And it might also explain the whole problem. If EINTR is overwritten
> by some other error value at the wrong moment, reading or writing a
> block might incorrectly be thought to have failed. CVS HEAD changes
> the quartz backend to stop it doing a full close and reopen of all
> the btree tables on flush(), which probably makes it a lot less likely
> to encounter this situation.
This explanation seems to fit so well, except that it appears errno *is*
per-thread.
> So try configuring 0.8.0 with:
>
> ./configure CPPFLAGS=-D_LIBC_REENTRANT
>
> I'll give this a whirl too.
Doesn't make a difference - 0.8.0 still fails. Which is what I would
expect since _LIBC isn't defined...
Hmm.
Cheers,
Olly