Forum: Ferret Constant 0.11.4 Errors

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.
Mark (Guest)
on 2007-04-07 22:55
Folks,

Since upgrading to ferret 0.11.4 on Mac OS X Tiger, I've been running
into constant crashes when running my Rails tests. Here's an example of
the output.

-- snip --

  1) Error:
test_published_blog_can_be_ferreted(BlogTest):
Ferret::FileNotFoundError: File Not Found Error occured at
<except.c>:117 in xpop_context
Error occured in fs_store.c:329 - fs_open_input
        tried to open
"/Users/mark/Sites/www.site.com/config/../index/test/blog/_17_0.del" but
it doesn't exist: <No such file or directory>


    /opt/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:285:in
`delete'
    /opt/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:285:in
`<<'
    /opt/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:8:in
`synchrolock'
    /opt/local/lib/ruby/1.8/monitor.rb:238:in `synchronize'
    /opt/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:8:in
`synchrolock'
    /opt/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:267:in
`<<'
    /Users/mark/Sites/www.site.com/config/../vendor/plugins/acts_as_ferret/lib/local_index.rb:140:in
`<<'
    /Users/mark/Sites/www.site.com/config/../vendor/plugins/acts_as_ferret/lib/instance_methods.rb:73:in
`ferret_create'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:333:in
`send'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:333:in
`callback'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:330:in
`each'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:330:in
`callback'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:255:in
`create_without_timestamps'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/timestamp.rb:39:in
`create'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1789:in
`create_or_update_without_callbacks'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:242:in
`create_or_update'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1545:in
`save_without_validation'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/validations.rb:752:in
`save_without_transactions'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:129:in
`save'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/database_statements.rb:59:in
`transaction'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:95:in
`transaction'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:121:in
`transaction'
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/transactions.rb:129:in
`save'
    ./test/unit/blog_test.rb:277:in
`test_published_blog_can_be_ferreted'

-- end snip --

Anyone run into a similar problem or have some suggestions? Thanks in
advance.
David B. (Guest)
on 2007-04-09 10:24
(Received via mailing list)
On 4/8/07, Mark <removed_email_address@domain.invalid> wrote:
> Folks,
>
> Since upgrading to ferret 0.11.4 on Mac OS X Tiger, I've been running
> into constant crashes when running my Rails tests. Here's an example of
> the output.

Hi Mark,

Which version did you upgrade from. I can't recall any changes between
0.11.3 and 0.11.4 that could possibly have caused this. If you
upgraded from an earlier version it is possible that you may need to
rebuild your test index. Otherwise I can't think what the problem
might be.

Cheers,
Dave
Mark (Guest)
on 2007-04-10 02:34
Dave,

I was running 0.11.3. I upgraded to 0.11.4. After deleting the "index",
my tests automatically rebuilt the index as you would imagine. When
running the same tests using the 0.11.4 version, it consistently
produces the errors above. By uninstalling 0.11.4 and using 0.11.3,
everything works again.

Any other suggestions on what the issue might be?

David B. wrote:
> On 4/8/07, Mark <removed_email_address@domain.invalid> wrote:
>> Folks,
>>
>> Since upgrading to ferret 0.11.4 on Mac OS X Tiger, I've been running
>> into constant crashes when running my Rails tests. Here's an example of
>> the output.
>
> Hi Mark,
>
> Which version did you upgrade from. I can't recall any changes between
> 0.11.3 and 0.11.4 that could possibly have caused this. If you
> upgraded from an earlier version it is possible that you may need to
> rebuild your test index. Otherwise I can't think what the problem
> might be.
>
> Cheers,
> Dave
Levent A. (Guest)
on 2007-04-10 19:58
(Received via mailing list)
I'm experiencing the same thing exactly
Ryan K. (Guest)
on 2007-04-11 22:58
(Received via mailing list)
On 4/10/07, Levent A. <removed_email_address@domain.invalid> wrote:
> >
> > > Hi Mark,
> > >
> > > Which version did you upgrade from. I can't recall any changes between
> > > 0.11.3 and 0.11.4 that could possibly have caused this. If you
> > > upgraded from an earlier version it is possible that you may need to
> > > rebuild your test index. Otherwise I can't think what the problem
> > > might be.
> > >
> > > Cheers,
> > > Dave

I'm seeing similar errors now, too, while trying to upgrade and
reindex everything from 0.10.

-ryan
David B. (Guest)
on 2007-04-12 22:46
(Received via mailing list)
On 4/12/07, Ryan K. <removed_email_address@domain.invalid> wrote:
> > > everything works again.
> > >
> > > Any other suggestions on what the issue might be?
>
> I'm seeing similar errors now, too, while trying to upgrade and
> reindex everything from 0.10.

Hey guys,

Any chance one of you could distill this problem to a simple script. I
don't seem to be able to replicate the problem here on my brother's
mac.

Cheers,
Dave
Ryan K. (Guest)
on 2007-04-13 02:18
(Received via mailing list)
On 4/12/07, David B. <removed_email_address@domain.invalid> wrote:
> > > > produces the errors above. By uninstalling 0.11.4 and using 0.11.3,
> don't seem to be able to replicate the problem here on my brother's
> mac.

I don't have a script to replicate this, but I've narrowed the problem
down to an issue with concurrency.

Currently I'm running AAF's rebuild_index  (against ferret_server) on
a model and when I try to save an item in that model from another
process, I get this error.

I was under the impression that ferret takes care of these concurrency
problems, but maybe AAF needs to do some mutual exclusion, too?

-ryan
David B. (Guest)
on 2007-04-13 02:22
(Received via mailing list)
On 4/13/07, Ryan K. <removed_email_address@domain.invalid> wrote:
>
> Currently I'm running AAF's rebuild_index  (against ferret_server) on
> a model and when I try to save an item in that model from another
> process, I get this error.
>
> I was under the impression that ferret takes care of these concurrency
> problems, but maybe AAF needs to do some mutual exclusion, too?

Sorry, I don't know enough about AAF and FerretServer to know why this
error would pop up in Ferret 0.11.4. Hopefully Jens or someone else
will be able to shed some light on this.
Mark (Guest)
on 2007-04-13 02:50
Ryan,

I'm doing the exact same thing, so that seems to be a likely area to
investigate in order to re-produce.

Ryan K. wrote:
> On 4/12/07, David B. <removed_email_address@domain.invalid> wrote:
>> > > > produces the errors above. By uninstalling 0.11.4 and using 0.11.3,
>> don't seem to be able to replicate the problem here on my brother's
>> mac.
>
> I don't have a script to replicate this, but I've narrowed the problem
> down to an issue with concurrency.
>
> Currently I'm running AAF's rebuild_index  (against ferret_server) on
> a model and when I try to save an item in that model from another
> process, I get this error.
>
> I was under the impression that ferret takes care of these concurrency
> problems, but maybe AAF needs to do some mutual exclusion, too?
>
> -ryan
Jens K. (Guest)
on 2007-04-13 11:13
(Received via mailing list)
On Thu, Apr 12, 2007 at 03:10:37PM -0700, Ryan K. wrote:
> > > > > running the same tests using the 0.11.4 version, it consistently
> > Any chance one of you could distill this problem to a simple script. I
> > don't seem to be able to replicate the problem here on my brother's
> > mac.
>
> I don't have a script to replicate this, but I've narrowed the problem
> down to an issue with concurrency.
>
> Currently I'm running AAF's rebuild_index  (against ferret_server) on
> a model and when I try to save an item in that model from another
> process, I get this error.

Yeah, that's a problem. As of now, rebuild_index is not safe for
concurrent operations on the same index. I plan to rework this so
rebuild_index will build the new index in another index directory,
leaving intact the original index dir where normal index operations like
add/update/delete work on.

However I dont know why the same problem would not show up with earlier
versions of ferret.

Jens



--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
El G. (Guest)
on 2007-04-16 21:41
Jens K. wrote:
> On Thu, Apr 12, 2007 at 03:10:37PM -0700, Ryan K. wrote:
>> > > > > running the same tests using the 0.11.4 version, it consistently
>> > Any chance one of you could distill this problem to a simple script. I
>> > don't seem to be able to replicate the problem here on my brother's
>> > mac.
>>
>> I don't have a script to replicate this, but I've narrowed the problem
>> down to an issue with concurrency.
>>
>> Currently I'm running AAF's rebuild_index  (against ferret_server) on
>> a model and when I try to save an item in that model from another
>> process, I get this error.
>
> Yeah, that's a problem. As of now, rebuild_index is not safe for
> concurrent operations on the same index. I plan to rework this so
> rebuild_index will build the new index in another index directory,
> leaving intact the original index dir where normal index operations like
> add/update/delete work on.
>
> However I dont know why the same problem would not show up with earlier
> versions of ferret.
>
> Jens
>


I'm seeing this as well with a brand new installation 0.11.4 using AAF.
Also, should I be actively running rebuild_index?  I must have missed
that somewhere if that's the case.  I've simply included the standard
acts_as_ferret :fields => [...] to my models and that's really it (which
seems to work fine).  So, this error is causing my app to throw internal
server errors.  What can I do about this?
Ryan K. (Guest)
on 2007-04-17 06:19
(Received via mailing list)
On 4/16/07, El Gato <removed_email_address@domain.invalid> wrote:
> >> Currently I'm running AAF's rebuild_index  (against ferret_server) on
> > versions of ferret.
> server errors.  What can I do about this?
Rebuild index won't work with Drb servers if you're try to write to
the index from another process besides the one running
'rebuild_index'.

For now, I'd suggest hacking AAF to not automatically rebuild indexes.
I just commented out line #23 of local_index.rb (which should read
"rebuild_index").

Then, to build/rebuild my index I'm running something like:

model = MyModel

0.step(model.count, 1000){|i| model.find(:all, :limit=>1000,
:offset=>i).each{|r| r.ferret_update}; }

This should allow concurrent writes, though it will be slower than the
existing rebuld_model.

-ryan
Kyle (Guest)
on 2007-04-21 00:11
I too am getting this error, I was not getting it before with 0.10.4.

AAF 0.4.0
Ferret 0.11.4

I have:
Stopped the webserver (lighttpd-1.4.15 (ssl)), removed all the indexes
by hand.

Rebuilt the indexes with './script/console production'
Person.rebuild_index.

Start the site and DRB back up, and bwam anytime it tries to write a new
person to the index, or a new photo I get the following errors.

Any solution to this? yet?

{{{
Ferret::FileNotFoundError (File Not Found Error occured at
<except.c>:117 in xpo     p_context
Error occured in fs_store.c:329 - fs_open_input
        tried to open
"/var/www/site/public/../config/../index/production/ph
oto/_3z1_5.del" but it doesn't exist: <No such file or directory>

):
    /usr/lib64/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:285:in
`dele     te'
    /usr/lib64/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:285:in
`<<'
    /usr/lib64/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:8:in
`synchr     olock'

}}}


Ryan K. wrote:
> On 4/16/07, El Gato <removed_email_address@domain.invalid> wrote:
>> >> Currently I'm running AAF's rebuild_index  (against ferret_server) on
>> > versions of ferret.
>> server errors.  What can I do about this?
> Rebuild index won't work with Drb servers if you're try to write to
> the index from another process besides the one running
> 'rebuild_index'.
>
> For now, I'd suggest hacking AAF to not automatically rebuild indexes.
> I just commented out line #23 of local_index.rb (which should read
> "rebuild_index").
>
> Then, to build/rebuild my index I'm running something like:
>
> model = MyModel
>
> 0.step(model.count, 1000){|i| model.find(:all, :limit=>1000,
> :offset=>i).each{|r| r.ferret_update}; }
>
> This should allow concurrent writes, though it will be slower than the
> existing rebuld_model.
>
> -ryan
Kyle (Guest)
on 2007-04-21 01:53
Update - Reverting back to 0.10.14 seems to fix this problem.

Kyle wrote:
> I too am getting this error, I was not getting it before with 0.10.4.
>
> AAF 0.4.0
> Ferret 0.11.4
>
> I have:
> Stopped the webserver (lighttpd-1.4.15 (ssl)), removed all the indexes
> by hand.
>
Joey G. (Guest)
on 2007-04-24 23:03
Just wanted to add that I had a similar error. Just updated from 11.3 to
11.4 and started getting the FileNotFound errors as stated above.

The only change to the application was an update from 11.3 to 11.4.

I have reverted back to 11.3 and it seems to be working again.
Jurie Horneman (Guest)
on 2007-05-09 23:47
Joey G. wrote:
> Just wanted to add that I had a similar error. Just updated from 11.3 to
> 11.4 and started getting the FileNotFound errors as stated above.
>
> The only change to the application was an update from 11.3 to 11.4.
>
> I have reverted back to 11.3 and it seems to be working again.

Had the same problem, solved it the same way.

One interesting thing perhaps: this problem only occurred when running
entire test suites, never when running individual tests (in TextMate).
Vince W. (Guest)
on 2007-05-10 04:49
Joey G. wrote:
> Just wanted to add that I had a similar error. Just updated from 11.3 to
> 11.4 and started getting the FileNotFound errors as stated above.
>
> The only change to the application was an update from 11.3 to 11.4.
>
> I have reverted back to 11.3 and it seems to be working again.



Hmm.. not wanting to make a mistake here so allow me to ask a silly
question.  Do I just sudo gem install ferret, pick the 0.11.3 version,
and then erase the 0.11.4 gem?
Robert H. (Guest)
on 2007-05-22 17:39
Vince W. wrote:
> Hmm.. not wanting to make a mistake here so allow me to ask a silly
> question.  Do I just sudo gem install ferret, pick the 0.11.3 version,
> and then erase the 0.11.4 gem?

$ sudo gem uninstall ferret

Select gem to uninstall:
 1. ferret-0.11.3
 2. ferret-0.11.4
 3. All versions
> 2
Successfully uninstalled ferret version 0.11.4
Remove executables and scripts for
'ferret-browser' in addition to the gem? [Yn]  n
Executables and scripts will remain installed.
j. weir (Guest)
on 2007-05-23 22:36
I am getting the same error using Ubuntu 6.10 and acts_as_ferret.

I can reindex just fine, but when I resave some records I get the
fs_store, File Not Found Error.

downgrading to 11.3 seems to be working.


>   1) Error:
> test_published_blog_can_be_ferreted(BlogTest):
> Ferret::FileNotFoundError: File Not Found Error occured at
> <except.c>:117 in xpop_context
> Error occured in fs_store.c:329 - fs_open_input
>         tried to open
> "/Users/mark/Sites/www.site.com/config/../index/test/blog/_17_0.del" but
> it doesn't exist: <No such file or directory>
>
Kyle (Guest)
on 2007-05-24 22:30
I actually still get this error in 0.11.3, I have to revert to 0.10.14
to get it remotely working.

Does anyone have any advice on what exactly the issue is? or how it can
be worked around. I would love to be as close to the recent devel as
possible =).


j. weir wrote:
> I am getting the same error using Ubuntu 6.10 and acts_as_ferret.
>
> I can reindex just fine, but when I resave some records I get the
> fs_store, File Not Found Error.
>
> downgrading to 11.3 seems to be working.
>
>
>>   1) Error:
>> test_published_blog_can_be_ferreted(BlogTest):
>> Ferret::FileNotFoundError: File Not Found Error occured at
>> <except.c>:117 in xpop_context
>> Error occured in fs_store.c:329 - fs_open_input
>>         tried to open
>> "/Users/mark/Sites/www.site.com/config/../index/test/blog/_17_0.del" but
>> it doesn't exist: <No such file or directory>
>>
This topic is locked and can not be replied to.