activerecord-hana-adapter icon indicating copy to clipboard operation
activerecord-hana-adapter copied to clipboard

Segmentation Fault on rake db:setup

Open Maxmel opened this issue 7 years ago • 0 comments

We're currently trying to migrate our application from MySQL to a SAP Hana DB Our setup: SLES 11 SP4 Rails 3.2.7 Ruby 1.9.3 activerecord-hana-adapter v0.1.3 ruby-odbc v0.99997 unixODBC 2.2.12-198.17

When I try to run bundle exec rake db:setup I get a Segmentation fault error when the adapter tries to clode the ODBC Statement stmt.drop! The SQL from the statement is SELECT schema_name FROM schemas Here's the error:

/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/database_statements.rb:44: [BUG] Segmentation fault
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0072 p:---- s:0269 b:0269 l:000268 d:000268 CFUNC  :drop
c:0071 p:0083 s:0266 b:0266 l:000242 d:000265 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0070 p:0005 s:0260 b:0260 l:000251 d:000259 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:2
c:0069 p:0031 s:0258 b:0258 l:000257 d:000257 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/skylight-0.10.6/lib/skylight/vendor/active_support/notifications/instrumenter.r
c:0068 p:0046 s:0252 b:0252 l:000251 d:000251 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:2
c:0067 p:0024 s:0243 b:0243 l:000242 d:000242 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0066 p:0024 s:0237 b:0237 l:000236 d:000236 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0065 p:0027 s:0231 b:0231 l:000230 d:000230 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/database_sta
c:0064 p:0013 s:0225 b:0225 l:000224 d:000224 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0063 p:0022 s:0222 b:0222 l:000221 d:000221 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0062 p:0087 s:0218 b:0218 l:000217 d:000217 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0061 p:---- s:0211 b:0211 l:000210 d:000210 FINISH
c:0060 p:---- s:0209 b:0209 l:000208 d:000208 CFUNC  :(
c:0059 p:0166 s:0202 b:0202 l:000201 d:000201 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_ada
c:0058 p:0045 s:0198 b:0198 l:000197 d:000197 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0057 p:0033 s:0195 b:0195 l:000194 d:000194 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0056 p:0044 s:0191 b:0191 l:000175 d:000190 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0055 p:---- s:0187 b:0187 l:000186 d:000186 FINISH
c:0054 p:---- s:0185 b:0185 l:000184 d:000184 CFUNC  :loop
c:0053 p:0016 s:0182 b:0182 l:000175 d:000181 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0052 p:0019 s:0179 b:0179 l:000178 d:000178 METHOD /home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211
c:0051 p:0011 s:0176 b:0176 l:000175 d:000175 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0050 p:0028 s:0173 b:0170 l:000164 d:000169 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0049 p:0019 s:0168 b:0168 l:000167 d:000167 METHOD /home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211
c:0048 p:0011 s:0165 b:0165 l:000164 d:000164 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0047 p:0033 s:0162 b:0162 l:000161 d:000161 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_p
c:0046 p:0018 s:0157 b:0157 l:000156 d:000156 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_s
c:0045 p:0011 s:0154 b:0154 l:000153 d:000153 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_s
c:0044 p:0137 s:0151 b:0151 l:002080 d:000150 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/tasks/hana_database.rake:13
c:0043 p:---- s:0148 b:0148 l:000147 d:000147 FINISH
c:0042 p:---- s:0146 b:0146 l:000145 d:000145 CFUNC  :call
c:0041 p:0043 s:0141 b:0141 l:000132 d:000140 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:240
c:0040 p:---- s:0138 b:0138 l:000137 d:000137 FINISH
c:0039 p:---- s:0136 b:0136 l:000135 d:000135 CFUNC  :each
c:0038 p:0181 s:0133 b:0133 l:000132 d:000132 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:235
c:0037 p:0116 s:0129 b:0129 l:000123 d:000128 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:179
c:0036 p:0019 s:0127 b:0127 l:000126 d:000126 METHOD /home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211
c:0035 p:0033 s:0124 b:0124 l:000123 d:000123 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172
c:0034 p:0040 s:0117 b:0117 l:000107 d:000116 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:201
c:0033 p:---- s:0113 b:0113 l:000112 d:000112 FINISH
c:0032 p:---- s:0111 b:0111 l:000110 d:000110 CFUNC  :each
c:0031 p:0055 s:0108 b:0108 l:000107 d:000107 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199
c:0030 p:0094 s:0103 b:0103 l:000097 d:000102 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:178
c:0029 p:0019 s:0101 b:0101 l:000100 d:000100 METHOD /home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211
c:0028 p:0033 s:0098 b:0098 l:000097 d:000097 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172
c:0027 p:0040 s:0091 b:0091 l:000081 d:000090 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:201
c:0026 p:---- s:0087 b:0087 l:000086 d:000086 FINISH
c:0025 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC  :each
c:0024 p:0055 s:0082 b:0082 l:000081 d:000081 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199
c:0023 p:0094 s:0077 b:0077 l:000071 d:000076 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:178
c:0022 p:0019 s:0075 b:0075 l:000074 d:000074 METHOD /home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211
c:0021 p:0033 s:0072 b:0072 l:000071 d:000071 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172
c:0020 p:0048 s:0065 b:0065 l:000064 d:000064 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:165
c:0020 p:0048 s:0065 b:0065 l:000064 d:000064 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:165                                                              [29/9101]
c:0019 p:0045 s:0060 b:0060 l:000059 d:000059 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:150
c:0018 p:0012 s:0053 b:0053 l:000038 d:000052 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:106
c:0017 p:---- s:0050 b:0050 l:000049 d:000049 FINISH
c:0016 p:---- s:0048 b:0048 l:000047 d:000047 CFUNC  :each
c:0015 p:0069 s:0045 b:0045 l:000038 d:000044 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:106
c:0014 p:0042 s:0043 b:0043 l:000042 d:000042 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:115
c:0013 p:0011 s:0039 b:0039 l:000038 d:000038 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:100
c:0012 p:0029 s:0036 b:0036 l:000ca8 d:000978 BLOCK  /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:78
c:0011 p:0007 s:0034 b:0034 l:0001b0 d:0001b0 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:176
c:0010 p:0011 s:0030 b:0030 l:000ca8 d:000ca8 METHOD /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:75
c:0009 p:0060 s:0027 b:0027 l:001988 d:001988 TOP    /home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/bin/rake:33
c:0008 p:---- s:0025 b:0025 l:000024 d:000024 FINISH
c:0007 p:---- s:0023 b:0023 l:000022 d:000022 CFUNC  :load
c:0006 p:0172 s:0019 b:0019 l:000e38 d:001e88 EVAL   /home/user/.rvm/gems/ruby-1.9.3-p327/bin/rake:22
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 FINISH
c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC  :eval
c:0003 p:0160 s:0007 b:0007 l:000e38 d:001eb0 EVAL   /home/user/.rvm/gems/ruby-1.9.3-p327/bin/ruby_executable_hooks:15
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000e38 d:000e38 TOP

-- Ruby level backtrace information ----------------------------------------
/home/user/.rvm/gems/ruby-1.9.3-p327/bin/ruby_executable_hooks:15:in `<main>'
/home/user/.rvm/gems/ruby-1.9.3-p327/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-1.9.3-p327/bin/rake:22:in `<main>'
/home/user/.rvm/gems/ruby-1.9.3-p327/bin/rake:22:in `load'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/tasks/hana_database.rake:13:in `block (2 levels) in <top (required)>'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/home/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana_adapter.rb:30:in `hana_connection'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana_adapter.rb:30:in `('
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana_adapter.rb:57:in `initialize'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana_adapter.rb:84:in `setup_schema'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/schema_statements.rb:268:in `schemas'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/database_statements.rb:11:in `select_rows'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/database_statements.rb:37:in `exec_query'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/skylight-0.10.6/lib/skylight/vendor/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/user/.rvm/gems/ruby-1.9.3-p327/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/database_statements.rb:44:in `block in exec_query'
/home/user/.rvm/gems/ruby-1.9.3-p327/bundler/gems/activerecord-hana-adapter-4021f5d1e3ef/lib/active_record/connection_adapters/hana/database_statements.rb:44:in `drop'

-- C level backtrace information -------------------------------------------
Segmentation fault

Any idea what might be causing this and how to fix it?

Maxmel avatar Jan 24 '17 22:01 Maxmel