|
crash on repeated search: msg#00036lang.ruby.ferret.general
I have found another crash in ferret; this one just uses a regular search. It's similar to an issue reported by Matt Schnitz a while ago, but unlike his, mine does not go away if I turn off omit_norms. It does go away if I turn on the garbage collector more often, but I'm not sure that's a stable workaround under the circumstances. This one isn't a segfault, but more complicated versions have been. This bug manifests as a error in the garbage collector: $ ruby rw_ferret_test.rb .......rw_ferret_test.rb:20: [BUG] rb_gc_mark(): unknown data type 0x28(0x402ba3a4) non object ruby 1.8.2 (2005-04-11) [i386-linux] Aborted Here's the code: require 'rubygems' require 'ferret' include Ferret def phrase(num) "a_fairly_long_phrase%05d"%num end LOOPS=(ARGV[1]||40).to_i _fields = Index::FieldInfos.new _fields.add_field :phrase, :term_vector => :no, :store => :no, :index => :untokenized $phrases=I.new(:field_infos=>_fields) phrase(0).upto(phrase(LOOPS)){|phrase| $phrases << {:phrase=> phrase} } @phrases=Ferret::Search::Searcher.new $phrases.reader count=0 loop{ @phrases.search( Search::TermQuery.new(:phrase, "a_fairly_long_phrase%05d"%rand(LOOPS+1)) ) if ((count+=1)%1000).zero? #1309 print '.' STDOUT.flush # GC.start #enable this to workaround end } $phrases.close |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Search Multiple Models: 00036, Jens Kraemer |
|---|---|
| Next by Date: | Re: Stem Analyzer: 00036, Andreas Korth |
| Previous by Thread: | Search Multiple Modelsi: 00036, Mark |
| Next by Thread: | Re: crash on repeated search: 00036, Andreas Korth |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |