On 4/14/07, Manoel Lemos <[EMAIL PROTECTED]> wrote:
> There is serious memory leak bug in ferret. I'm having this error on
> TextDrive Container (aka. Joyent Accelerators) OpenSolaris with Ferret
> 0.11.4
>
> It happens while searching for some terms with accented or special
> characters.
> This makes ferret to allocate lots of memory (usually reaching 3+ GB)
> and failing if another query like this is executed.
>
> Any ideas on that, could this be locale or any other system settings?
>
> Any suggestions on how to debug that?
>
> Look the console session bellow where the error is reproduced even in a
> very simple index:
>
> >> require 'ferret'
> >> include Ferret
> >> index = Index::Index.new()
> >> index << "My document"
> >> index.search_each("bonĂ´") { |id,score| puts score }
> /opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:749:in
> `parse': failed to allocate memory (NoMemoryError)
>         from
> /opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:749:in
> `do_process_query'
>         from
> /opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:382:in
> `search_each'
>         from /opt/csw/lib/ruby/1.8/monitor.rb:229:in `synchronize'
>         from
> /opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:380:in
> `search_each'
>         from (irb):10:in `irb_binding'
>         from /opt/csw/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
>         from /opt/csw/lib/ruby/1.8/irb/workspace.rb:52
> [92140-AA:~/web/labs/blogblogs/trunk] pocscom$

Hi Manoel,

I really think this has something to do with OpenSolaris. Just to
narrow the problem down further, could you try this;


    require 'rubygems'
    require 'ferret'

    tokenizer =
Ferret::Analysis::StandardAnalyzer.new().token_stream(:field,
"bon\303\264")
    while token = tokenizer.next
      puts token
    end

I suspect this will cause the same problem. If it does, I'll try
writing a simple C program to test your locale library.

Cheers,
Dave
-- 
Dave Balmain
http://www.davebalmain.com/
_______________________________________________
Ferret-talk mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to