Ticket #208 (closed defect: fixed)

Opened 19 months ago

Last modified 9 months ago

Ferret crashes with multi boolean query

Reported by: lsansonetti@… Owned by: dbalmain
Priority: major Milestone:
Component: component1 Version:
Keywords: 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

Changed 16 months ago by dbalmain

  • owner changed from somebody to dbalmain
  • status changed from new to assigned
  • description modified (diff)

Reformatted ticket to syntax highlight correctly.

Changed 16 months 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.

Changed 9 months ago by anonymous

江苏大洋冷却塔有限公司是集冷却塔研发、设计、制造、安装维修为一体的科研型经济实体。公司位于江南水乡溧阳市平陵西路288号,交通便捷,人文荟萃。

主产品"大正"牌冷却塔在2004年荣获"中国市场首选放心品牌","全国用户产品质量满意、售后服务满意示范单位"。连续五年被评为"重合同、守信用"企业,连续多年被企业信用等级评定委员会评定为"AAA"级,企业通过了中联认证中心"ISO9001:2000的质量管理体系认证"以及"ISO14001:1996环境管理体系认证"。被江苏市场产品质量监督调查办公室、江苏名牌企业促进会,江苏3.15维权投诉监督跟踪调查办公室授予"江苏市场公认名牌产品"、"质量·信誉"先进单位。在今后的发展中,本公司将一如既往,以严谨的质量保证模式来满足用户的需求。 江苏大洋冷却塔有限公司积几十年生产实践经验,形成了GNZF-500~4500型、HLT-500~4500型、NH-500~4500型、HH-500~4500型等多个品种的冷却塔产品,产品远销东南亚各国。在企业的发展过程中,公司员工牢固树立"凝聚、务实、诚信、进取"的总方针,建立了严密的新产品开发操作程序,严格的管理制度和严谨的质量保证体系。公司拥有一支素质良好的员工队伍,尤其在玻璃钢成型工艺,钢结构的防腐处理,塑料加工工艺等方面已形成了独特、稳定、可靠的工艺流程和加工方法。

Add/Change #208 (Ferret crashes with multi boolean query)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.