1 Jul 2009 03:52
Re: Search working again
Olly Betts <olly <at> survex.com>
2009-07-01 01:52:41 GMT
2009-07-01 01:52:41 GMT
On 2009-06-30, Steinar Bang <sb <at> dod.no> wrote:
>>>>>> Olly Betts <olly <at> survex.com>:
>
>> The main trouble I'm having tracking it down is that it doesn't seem
>> to reproduce under the malloc debugging tools I've tried so far...
>
> Ah, I didn't read that far before responding. I'm guessing this means
> valgrind...?
Yes, valgrind is generally the first thing I'd try, but it has its own malloc
implementation and that changes what's happening. If the rogue writes are
still happening, they're not happening in a way valgrind can detect.
It's also too slow to run the whole rebuild under.
> You say "tools", plural. What other tools have you tried?
I tried the debug mode of glibc's malloc and running that under gdb to find
the first problem it found, which was a call to free(). Checking the code
which lead to that point, all looks fine, so I think the heap has been
corrupted before then.
I was wondering what to try next - suggestions welcome. Electric Fence was
what I was going to try next - I've never used it before, but it seems to use
mprotect to isolate heap allocations which seems promising. The process
doesn't make a lot of allocations, so extra memory overhead shouldn't be an
issue.
Cheers,
Olly
(Continue reading)
Sven





RSS Feed