Skip to main content.
home | support | download

Back to List Archive

Re: swish-e core dump while indexing XML documents

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Mar 22 2004 - 18:51:01 GMT
On Mon, Mar 22, 2004 at 10:24:40AM -0800, Bill Schell wrote:


> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 6498)]
> 0x4024ef2d in _int_malloc () from /lib/libc.so.6
> (gdb) where
> #0  0x4024ef2d in _int_malloc () from /lib/libc.so.6
> #1  0x4024e78c in calloc () from /lib/libc.so.6
> #2  0x401ade76 in zcalloc () from /usr/lib/libz.so.1
> #3  0x401aa5b7 in deflateInit2_ () from /usr/lib/libz.so.1
> #4  0x401aa40a in deflateInit_ () from /usr/lib/libz.so.1
> #5  0x401a8b0d in compress2 () from /usr/lib/libz.so.1
> #6  0x080614bf in compress_property (prop=0x82d2a98, sw=0x80c3f78, 
> buf_len=0xbffff364,
>     uncompressed_len=0xbffff368) at docprop_write.c:163

When I see a segfault in malloc I wonder if there isn't memory
corruption happening someplace else.

[...]

> #7  0x0806139d in WritePropertiesToDisk (sw=0x80c3f78, fi=0xbffff3b0)
>     at docprop_write.c:100
> #8  0x08055c2c in do_index_file (sw=0x80c3f78, fprop=0x82228a8) at index.c:994
> #9  0x080505ce in printfile (sw=0x80c3f78, filename=0x82228a8 
> "???r\bh(\"\b???\r\b")
>     at fs.c:601

That's and odd file name.  Maybe that's a result of the memory
corruption.

Thanks for this great debugging session:

> #6  0x080614bf in compress_property (prop=0x82d2a98, sw=0x80c3f78, 
> buf_len=0xbffff364,
>     uncompressed_len=0xbffff368) at docprop_write.c:163
> 163         zlib_status = compress2( (Bytef *)PropBuf, &dest_size, 
> prop->propValue, prop->propLen, sw->PropCompressionLevel);
> (gdb) p *prop
> $1 = {propLen = 200, propValue = "Q"}

So these numbers look ok.

> (gdb) p *buf_len
> $3 = 15
> (gdb) p *uncompressed_len
> $4 = 0
> (gdb)

Is it possible to trim down your source files to (hopefully) just a few
files that cause the segfault and make them available?  Looks like
something is overrunning some memory.

You might set a break point for printfile and watch the file names.
Might be able to work back from there and see when that gets corrupted.
Assuming you don't have a file named ???r\bh(\"\b???\r\b.

-- 
Bill Moseley
moseley@hank.org
Received on Mon Mar 22 10:51:02 2004