Segmentation Faults

Hi,

I am using Ferret 0.9.4 and my index appears to be corrupt as any
attempt to read or write it causes a segmentation fault. I had been
using it with minimal problems for the past few months.

Is there a way to fix this without rebuilding the entire index? Since
I am on a shared host ferret takes too much memory to rebuild these
roughly 8500 records in one go and in the past I have had to rebuild
them in batches.

Also, is there a way to trap when ferret segfaults using rescue? I
have had to disable searching for the time being on my site until I
get this worked out since every search will segfault and kill my fcgi.

I am actually considering switching to Mysql full text search just for
stability reasons, but if there was a good technique for combating
these segfaults I would rather stick with Ferret.

NOTE: I did try running with ferret 0.10.13 but I was getting a bunch
of segfaults just rebuilding my indexes.

Thanks,
Tom D.

http://atomgiant.com
http://gifthat.com

Hi!

On Thu, Nov 23, 2006 at 06:57:01PM -0500, Tom D. wrote:

Hi,

I am using Ferret 0.9.4 and my index appears to be corrupt as any
attempt to read or write it causes a segmentation fault. I had been
using it with minimal problems for the past few months.

Is there a way to fix this without rebuilding the entire index? Since
I am on a shared host ferret takes too much memory to rebuild these
roughly 8500 records in one go and in the past I have had to rebuild
them in batches.

I don’t know of a way to fix the index without rebuilding it.

Also, is there a way to trap when ferret segfaults using rescue? I
have had to disable searching for the time being on my site until I
get this worked out since every search will segfault and kill my fcgi.

Imho a seg fault is far too low level to be caught on the ruby side.

I am actually considering switching to Mysql full text search just for
stability reasons, but if there was a good technique for combating
these segfaults I would rather stick with Ferret.

NOTE: I did try running with ferret 0.10.13 but I was getting a bunch
of segfaults just rebuilding my indexes.

that’s strange, maybe we should try to find the problem in this area.
Ferret’s API changed in sometimes subtle ways from 0.9 to 0.10, and
segfaults often happen when using the API in a wrong way (i.e.
unexpected argument types and things like that).

cheers,
Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Hi Jens,

When I tried switching to 0.10.13 I did have to rewrite portions to
work with the new API and I had it working using a small number of
documents. It was only when I tried to do the entire import of my
existing records that it would routinely seg fault.

Also, one other odd thing I noticed is on both 0.9.4 and 0.10.13 I
will always get a segfault if I try to rebuild the index using the
script/runner.

Due to the lack of being able to handle seg faults from the Rails code
I may have no choice but to switch to mysql full text for the time
being just for stability. Otherwise, all it takes is a seg fault to
bring my whole application down. And in this case, since it corrupted
the index my app will permanently seg fault until I rebuild it.

Thanks for your help.

Tom D.

http://atomgiant.com
http://gifthat.com