Forum: Ferret ferret 0.11.3 - File Not Found

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28c237c0c414b644082bfcde4e42b309?d=identicon&s=25 John Leach (Guest)
on 2007-03-06 13:28
(Received via mailing list)
Hi,

I noticed a 0.11.3 release and gave it a whirl.  I've so far not been
able to reproduce any segfaults with my ferret_killer[1] script, though
I do get some errors.

when the searching process is running and I start the indexing process,
I immediately get:

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:692:in
`latest?': File Not Found Error occured at <except.c>:93 in xraise
(FileNotFoundError)
Error occured in index.c:825 - sis_find_segments_file
        couldn't find segments file

        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:692:in
`ensure_reader_open'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:713:in
`ensure_searcher_open'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:735:in
`do_search'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:334:in
`search'
        from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:333:in
`search'
        from ferret_killer1.rb:39:in `ferret_search'
        from ferret_killer1.rb:59

when the indexing process is running and I start the searching process,
I immediately get one of the following:

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in
`<<': Interrupt
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in
`synchrolock'
        from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in
`synchrolock'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:267:in
`<<'
        from ferret_killer1.rb:50

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in
`delete': File Not Found Error occured at <except.c>:117 in xpop_context
(FileNotFoundError)
Error occured in fs_store.c:329 - fs_open_input
        tried to open "my_ferret_index//_1og.cfs" but it doesn't exist:
<No such file or directory>

        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:285:in
`<<'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in
`synchrolock'
        from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:8:in
`synchrolock'
        from
/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:267:in
`<<'
        from ferret_killer1.rb:50

Hope this is useful,

John.

[1] http://johnleach.co.uk/downloads/ruby/ferret/ferre...
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2007-03-07 00:06
(Received via mailing list)
On 3/6/07, John Leach <john@johnleach.co.uk> wrote:
> Hi,
>
> I noticed a 0.11.3 release and gave it a whirl.  I've so far not been
> able to reproduce any segfaults with my ferret_killer[1] script, though
> I do get some errors.
> <snip>Errors</snip>

Hi John,

I should have told you about this already. It is actually a problem in
the ferret_killer script. You have :create set to true so both
processes will delete the index and create a new one. Obviously this
is not a good thing if one processes is writing to the index and
another comes along and deletes all the files. To prevent this from
happening, remove line 31;

    :create => true)

After that, everything should work as expected.

Cheers,
Dave
28c237c0c414b644082bfcde4e42b309?d=identicon&s=25 John Leach (Guest)
on 2007-03-07 03:17
(Received via mailing list)
On Wed, 2007-03-07 at 09:52 +1100, David Balmain wrote:
> Hi John,
>
> I should have told you about this already. It is actually a problem in
> the ferret_killer script. You have :create set to true so both
> processes will delete the index and create a new one.

lol, silly me.  Ta Dave.

Though I've just discovered that the rails app that I extracted this
from is still segfaulting the searching process :/

/usr/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:738: [BUG]
Segmentation fault

I'll try and write another test to reproduce.

Thanks,

John.
This topic is locked and can not be replied to.