Modify ↓
Ticket #208 (closed defect: fixed)
Ferret crashes with multi boolean query
| Reported by: | lsansonetti@… | Owned by: | dbalmain |
|---|---|---|---|
| Priority: | major | Milestone: | milestone1 |
| Component: | component1 | Version: | 2.0 |
| Keywords: | qxPqfZBCTwfCHyX | Cc: |
Description (last modified by dbalmain) (diff)
I have a full reproducible Ferret crash. My environment is Mac OS X 10.4, and I reproduce the crash with various versions of Ruby (1.8.4 and 1.8.6).
$ cat /tmp/foo.rb
#!/usr/bin/ruby require 'rubygems' require 'ferret' index = Ferret::Index::Index.new() index << {:id => 1, :title => "foo", :content => "Do you want to quit?"} index.search_each('content:"Do|you|want|to|stop"') do |id, score, title| end
$ ruby /tmp/foo.rb /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:384: [BUG] Bus Error ruby 1.8.6 (2007-03-13) [universal-darwin9.0] Abort trap $ gdb --args !! [...] Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x0000000c 0x005d92c0 in bq_rewrite (self=0x390360, ir=0x38f000) at q_boolean.c:1363 1363 Query *rq = clause->query->rewrite(clause->query, ir); (gdb) bt #0 0x005d92c0 in bq_rewrite (self=0x390360, ir=0x38f000) at q_boolean.c:1363 #1 0x005fa75e in isea_rewrite (self=0x38fdc0, original=0x390360) at search.c:1155 #2 0x005f9941 in q_weight (self=0x390360, searcher=0x38fdc0) at search.c:355 #3 0x005f9c10 in isea_search (self=0x38fdc0, query=0x0, first_doc=0, num_docs=0, filter=0x0, sort=0x0, filter_func=0, load_fields=0) at search.c:1110 #4 0x005f432f in frt_sea_search_internal (query=0x390360, roptions=5273020, sea=0x38fdc0) at r_search.c:2531 #5 0x005f43bb in frt_sea_search_each (argc=0, argv=0x0, self=0) at r_search.c:2628
Attachments
Change History
comment:1 Changed 3 years ago by dbalmain
- Owner changed from somebody to dbalmain
- Status changed from new to assigned
- Description modified (diff)
comment:2 Changed 3 years ago by dbalmain
- Status changed from assigned to closed
- Resolution set to fixed
Fixed. Problem was caused by removing stopwords from a multi term query so that leaving the resulting boolean query with null clauses. I've actually changed the code to use the more efficient MultiTermQuery?, although the speed difference will be negligible.
Note: See
TracTickets for help on using
tickets.

Reformatted ticket to syntax highlight correctly.