Re: Infinite loop in searchd
Kir Kolyshkin <[email protected]> Tue, 26 Aug 2003 18:30:51 +0359
| Newsgroups | gmane.comp.web.aspseek.devel |
|---|---|
| Message-ID | <[email protected]> |
As Daniel Stone has suggested, can you give it a try using gcc 3.3? Jens Thoms Toerring wrote: > Hi, > > I am currently trying to figure out why searchd hangs in an > infinite loop in the function search.cpp:AndResults when > searching for more than just a single word. > > According to what I see in the debugger the 'same' variable never > in this function gets set and the 'else' part of the loop, that > gets entered when 'same' isn't set never gets me out of the loop. > I followed Daniel Stone's suggestion which basically is to force > 'same' to 1, thus taking the other branch. This works, at least > as far as getting me out of the infinite loop, but it also breaks > the search: If I am looking for two words to be in the same > document, aspssek shows me results for all pages that contain the > first word, but doesn't bother about the second one (well, I guess > that should tell me something about the purpose of tge 'same' > variable ;-) So, obviously, this isn't really working. > > The same problems happens with phrase searches, but this time the > inifinite loop is in CPhrase::GetResultForSite() (which has very > similart code to AndResults()). And forcing 'same' to 1 here > helps in getting out of the loop but also breaks the search. > > All this happens with > > Linux ub3744 2.4.19-4GB #1 Fri Sep 13 13:14:56 UTC 2002 i686 unknown > > and > > jens@ub3744:~> g++ --v > Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs > Configured with: ../configure --enable-threads=posix --prefix=/usr > --with-local-prefix=/usr/local --infodir=/usr/share/info > --mandir=/usr/share/man --libdir=/usr/lib > --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj > --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib > --enable-shared --enable-__cxa_atexit i486-suse-linux > Thread model: posix > gcc version 3.2 > > Unfortunately, even after looking at the functions for two hours it's > still a complete mystery to me how it is supposed to work. Especially > lines like > > ( WORD * & ) *purl += ( ( WORD * ) ( *purl ) )[ 3 ] + 4; > > are beyond me... > Regards, Jens -- == kir_at_asplinux.ru = 7551596_at_ICQ = 6722750_at_sms.beemail.ru == I am signature virus. Copy me to your ~/.signature to help me spread.