Skip to main content.
home | support | download

Back to List Archive

Merge Problems on embedded system

From: Dave Watson <dave(at)>
Date: Mon Jan 16 2006 - 17:40:37 GMT
Hi SWISH-E'ers ...

I am having some problems getting the Merge Function working on an
embedded system I am working on .. I have got swish-e working on this
system and I find it great, however, I was trying to get the merge
function working and ran into some problems .. I tried to debug the
offending section of code, to see if I could find out what the problem
may be hopefully it was something I was doing wrong .. In looking at the
code it appeared that I was not doing anything incorrect and it may be
that I am missing something somewhere's along the line .. I ran into
some difficulty in putting together what was actually going on with the
code (probably because this is the first time I have looked at it ..) 

I captured part of one of the debug session where the error is shown:   

(gdb) r -M xaa.swish.ind xab.swish.ind nsg.out
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /usr/local/swish-e/bin/swish-e -M xaa.swish.ind
xab.swish.ind nsg.out
Input index 'xaa.swish.ind' has 1000 files and 7671 words
Input index 'xab.swish.ind' has 1000 files and 8093 words
Getting words in index 'xaa.swish.ind':   7671 words
Getting words in index 'xab.swish.ind':   8093 words
Processing words in index 'nsg.out':      0 words

>>**** I think this is a problem but I'm not sure ??? 

Warning: Failed to uncompress Property. zlib uncompress returned: -3.
uncompressed size: 220 buf_len: 120 saved_bytes: 100

>> Does the missing/error from zlib property cause a problem with the
filenum's setup ??

>>*** I have looked at the code in/at merge at this line and the 
variable for 

cur_index->merge_file_num_map - seems valid
filenum - seems to be incorrect, very large number 

and the index at 

static void write_word_pos( IndexFILE *indexf, SWISH *sw_output, int
*file_num_map, int filenum, ENTRY *e, int metaID, unsigned int posdata )
    int         new_file;
    int         new_meta;

    printf("\nindex %s '%s' Struct: %d Pos: %d",
    indexf->line, e->word, GET_STRUCTURE(posdata),
GET_POSITION(posdata) );

*** line 1075    if ( !(new_file = file_num_map[ filenum ]) ) <<***
invalid filenum value/location

seem to be pointing at incorrect values and I get a SIGSEG .. and it 
Program received signal SIGSEGV, Segmentation fault.
merge_indexes (sw_input=0x80c1000, sw_output=0x8238000) at merge.c:1075
1075    in merge.c

I have attached the two index files that I was using to get this
problem .. 

Current version of code:

Which is a about as uptodate as I can get ..

As far as I can tell all the libraries seem to be resolved correctly and
the index/search functions are working correctly, just the merge
functions are not working correctly .. which I can sort of get around ..
but it would be more effective if I could get it working ..

Any help you can offer as to what/where the problem may be would be

Thanks for you help


Dave W.

Dave Watson
NorthSeas AMT
e-mail archiving without software
155 Terence Matthews Cres., Unit 1
Ottawa, ON K2M 2A8
Phone: 613-591-1045 x32
Toll Free: 1-888-591-1045

Due to deletion of content types excluded from this list by policy,
this multipart message was reduced to a single part, and from there
to a plain text message.
Received on Mon Jan 16 09:40:38 2006