[Xapian-discuss] Memory leak

Olly Betts olly at survex.com
Sat Jan 29 14:03:31 GMT 2011


On Mon, Jan 24, 2011 at 09:50:34PM +0100, double wrote:
> There is a memory leak in Xapian 1.2.4.
> We use a persistant connection in FastCGI processes. As soon
> as we catch this exception, "dmalloc" recognizes memory leaks:
>     The revision being read has been discarded - you should
>     call Xapian::Database::reopen() and retry the operation
> Down below the output of "dmalloc".

Hmm, I think there's just one leak which drags all the others with it,
but it's hard to tell from that output.

Does this patch fix the problem for you?

http://oligarchy.co.uk/xapian/patches/matcher-pl-leak-fix.patch

> This happens only on the production system. On my local maschine,
> "valgrind" reports "all blocks freed".

It's quite sensitive to the precise situation - we need to successfully
open the postlists, but fail to read a subsequent chunk of one because
it is overwritten.  I've failed to create a testcase for it so far...

Cheers,
    Olly



More information about the Xapian-discuss mailing list