Skip to main content.
home | support | download

Back to List Archive

Re: Segementation fault core dump (on merging)

From: Bernhard Weisshuhn <bkw(at)not-real.weisshuhn.de>
Date: Sat Sep 21 2002 - 22:48:31 GMT
Hi Bill and others,

On Fri, Sep 20, 2002 at 01:51:29PM -0700, Bill Moseley <moseley@hank.org> wrote:

> Anyway, that's been fixed and will be in 2.2.1 soon.
> 
> But there's still a problem...

I too don't seem to be able to merge anymore at all.

Summary:
--------
Merging two indexes containing a file wich has changed in one index gives a
segfault in function compress3 in line 111 of compress.c.
Tried with xml and -S prog and text using -S fs.

Problem does not happen when merging two identical indexes although program
output suggests that files are being replaced.

Problem reproducible on different systems with different OS-releases, glibc's
and kernels. Happens every time.

Config-file: none.
Source-files: trivial (see below)


System-Info:
------------
redhat Linux 7.2 (basically)
Homegrown Kernel 2.4.16 (tried both Athlon & Intel-SMP).
`gcc --version` : 2.96
`swish-e -V` : SWISH-E 2.2 (also tried current cvs)
glibc 2.2

reproduce:
----------
% echo "a" > test.txt
% ./swish-e -S fs -i test.txt -f indexa
% rm test.txt
% echo "b" > test.txt
% ./swish-e -S fs -i test.txt -f indexb
% ./swish-e -M indexa indexb indexmerged
--> segfault

gdb-session:
------------
% echo "a" > test.txt
% ./swish-e -S fs -i test.txt -f indexa
Indexing Data Source: "File-System"
Indexing "test.txt"
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 1 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: Complete
1 unique word indexed.
4 properties sorted.
1 file indexed.  2 total bytes.  1 total words.
Elapsed time: 00:00:00 CPU time: 00:00:00
Indexing done!
% rm test.txt; echo "b" > test.txt
% ./swish-e -S fs -i test.txt -f indexb
Indexing Data Source: "File-System"
Indexing "test.txt"
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 1 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: Complete
1 unique word indexed.
4 properties sorted.
1 file indexed.  2 total bytes.  1 total words.
Elapsed time: 00:00:00 CPU time: 00:00:00
Indexing done!
% gdb swish-e
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -M indexa indexb indexmerged
Starting program: /tmp/swish-2.2/src/swish-e -M indexa indexb indexmerged
Input index 'indexa' has 1 files and 1 words
Input index 'indexb' has 1 files and 1 words
Replaced file 'test.txt 2002-09-22 00:20:57' with 'test.txt 2002-09-22 00:21:14'
Getting words in index 'indexa':      1 words
Getting words in index 'indexb':      1 words
Processing words in index 'indexmerged':      2 words
Writing main index...
Sorting words ...
Sorting 2 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: ...
Program received signal SIGSEGV, Segmentation fault.
0x0805b9a1 in compress3 (num=2139062143,
    buffer=0x7f7f7f7f <Address 0x7f7f7f7f out of bounds>) at compress.c:111
111             _s[_i++] = _r & 127;
(gdb) bt
#0  0x0805b9a1 in compress3 (num=2139062143,
    buffer=0x7f7f7f7f <Address 0x7f7f7f7f out of bounds>) at compress.c:111
#1  0x7f7f7f7f in ?? ()
Cannot access memory at address 0x7f7f7f7f
(gdb) info locals
buffer = (unsigned char *) 0x8101cc7 ""
_i = 5664
_r = -1
_s = "}\177\177\177\177"
(gdb)



Hope this helps.
If you need more information or want me to try out something, just yell.

cheers,
bkw
Received on Sat Sep 21 22:52:13 2002