georgiev/rubyfb — Issue #9: Segmentation fault
Author: vitamino
Created: 2012-02-14 12:00:01+00:00
State: open

Hi,
often (not always, 80% of the time) when I try to access a table with 25000+ records I get this Segmentation fault.

```
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:924: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]

-- control frame ----------
c:0054 p:---- s:0229 b:0229 l:000228 d:000228 CFUNC :===
c:0053 p:0055 s:0225 b:0224 l:0025d0 d:000223 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:924
c:0052 p:---- s:0219 b:0219 l:000218 d:000218 FINISH
c:0051 p:---- s:0217 b:0217 l:000216 d:000216 CFUNC :each
c:0050 p:0018 s:0214 b:0214 l:0025d0 d:000213 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:921
c:0049 p:---- s:0210 b:0210 l:000209 d:000209 FINISH
c:0048 p:---- s:0208 b:0208 l:000207 d:000207 CFUNC :exec_and_close
c:0047 p:0223 s:0203 b:0203 l:000168 d:000202 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:528
c:0046 p:0005 s:0199 b:0199 l:000189 d:000198 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:2
c:0045 p:0032 s:0197 b:0197 l:000196 d:000196 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activesupport-3.2.1/lib/active_support/notifications/instrumenter.rb:20
c:0044 p:0046 s:0190 b:0190 l:000189 d:000189 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:2
c:0043 p:0017 s:0181 b:0181 l:000180 d:000180 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:845
c:0042 p:0019 s:0175 b:0175 l:000174 d:000174 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:1095
c:0041 p:0025 s:0169 b:0169 l:000168 d:000168 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:511
c:0040 p:0036 s:0162 b:0162 l:0025d0 d:0025d0 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:919
c:0039 p:0024 s:0154 b:0154 l:000153 d:000153 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:888
c:0038 p:0031 s:0143 b:0143 l:000142 d:000142 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/database_sta
c:0037 p:0058 s:0137 b:0137 l:000136 d:000136 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/query_cache.
c:0036 p:0040 s:0130 b:0130 l:000119 d:000129 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:38
c:0035 p:0190 s:0128 b:0128 l:000127 d:000127 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/explain.rb:40
c:0034 p:0015 s:0120 b:0120 l:000119 d:000119 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:37
c:0033 p:0110 s:0115 b:0115 l:000114 d:000114 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:170
c:0032 p:0009 s:0109 b:0109 l:000098 d:000108 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:159
c:0031 p:0115 s:0107 b:0107 l:000106 d:000106 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/explain.rb:33
c:0030 p:0011 s:0099 b:0099 l:000098 d:000098 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:158
c:0029 p:0046 s:0096 b:0096 l:000095 d:000095 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation/finder_methods.rb:159
c:0028 p:0023 s:0092 b:0092 l:000091 d:000091 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:5
c:0027 p:0053 s:0087 b:0087 l:001ae8 d:000086 BLOCK /Users/xx/xxxxxxx/workspace/xxxxxxx/xxxxxxx/lib/tasks/setup.rake:12
c:0026 p:---- s:0084 b:0084 l:000083 d:000083 FINISH
c:0025 p:---- s:0082 b:0082 l:000081 d:000081 CFUNC :call
c:0024 p:0043 s:0077 b:0077 l:000068 d:000076 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:205
c:0023 p:---- s:0074 b:0074 l:000073 d:000073 FINISH
c:0022 p:---- s:0072 b:0072 l:000071 d:000071 CFUNC :each
c:0021 p:0173 s:0069 b:0069 l:000068 d:000068 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:200
c:0020 p:0111 s:0065 b:0065 l:000059 d:000064 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:158
c:0019 p:0019 s:0063 b:0063 l:000062 d:000062 METHOD /Users/xx/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201
c:0018 p:0033 s:0060 b:0060 l:000059 d:000059 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:151
c:0017 p:0048 s:0053 b:0053 l:000052 d:000052 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:144
c:0016 p:0045 s:0048 b:0048 l:000047 d:000047 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:116
c:0015 p:0012 s:0041 b:0041 l:000026 d:000040 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:94
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :each
c:0012 p:0069 s:0033 b:0033 l:000026 d:000032 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:94
c:0011 p:0009 s:0031 b:0031 l:000030 d:000030 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:133
c:0010 p:0011 s:0027 b:0027 l:000026 d:000026 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:88
c:0009 p:0029 s:0024 b:0024 l:000017 d:000023 BLOCK /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:66
c:0008 p:0009 s:0022 b:0022 l:000021 d:000021 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:133
c:0007 p:0011 s:0018 b:0018 l:000017 d:000017 METHOD /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:63
c:0006 p:0060 s:0015 b:0015 l:000014 d:000014 TOP /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/bin/rake:33
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load
c:0003 p:0127 s:0007 b:0007 l:0014f8 d:0015e0 EVAL /Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/bin/rake:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014f8 d:0014f8 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/bin/rake:19:in `

'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/bin/rake:19:in `load'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/xx/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/xx/xxxxxxx/workspace/xxxxxxx/xxxxxxx/lib/tasks/setup.rake:12:in `block (2 levels) in '
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:5:in `all'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation/finder_methods.rb:159:in `all'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:158:in `to_a'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/explain.rb:33:in `logging_query_plan'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:159:in `block in to_a'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/relation.rb:170:in `exec_queries'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:37:in `find_by_sql'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/explain.rb:40:in `logging_query_plan'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/querying.rb:38:in `block in find_by_sql'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:16:in `select_all'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:888:in `select'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:919:in `select_raw'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:511:in `exec_query'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:1095:in `log'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:845:in `log'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activesupport-3.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:528:in `block in exec_query'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:528:in `exec_and_close'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:921:in `block in select_raw'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:921:in `each'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:924:in `block (2 levels) in select_raw'
/Users/xx/.rvm/gems/ruby-1.9.2-p290@xxxxxxx/gems/rubyfb-0.6.2/lib/active_record/connection_adapters/rubyfb_adapter.rb:924:in `==='

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap
```

System:

```
Firebird Server 2.5 64bit (OSX)
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
Rails 3.2.1
```