oggataの日記 このページをアンテナに追加 RSSフィード Twitter

2018-10-09 rails-segmentation-fault-using-mongoid このエントリーを含むブックマーク このエントリーのブックマークコメント

tail -f log/puma.stderr.log

していたらpumaのlogで下記落ちていた.


(解決策)

It seems like a bug in MRI 2.4. Follow these threads here and here

Thanks! Updating to 2.4.1 solved the problem in my case. – dusan Nov 16 '17 at 13:59

https://stackoverflow.com/questions/46120738/rails-segmentation-fault-using-mongoid

https://jira.mongodb.org/browse/RUBY-1202

https://jira.mongodb.org/browse/RUBY-1231

https://jira.mongodb.org/browse/RUBY-1194


=== puma startup: 2018-10-09 12:30:30 +0900 ===

/home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/2.4.0/forwardable.rb:228: [BUG] Segmentation fault at 0x00000000000038

ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

    • Control frame information -----------------------------------------------

c:0091 p:0045 s:0621 e:000618 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/2.4.0/forwardable.rb:228

c:0090 p:0038 s:0612 E:000b48 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection.rb:209 [FINISH]

c:0089 p:---- s:0607 e:000606 CFUNC :each

c:0088 p:0029 s:0603 E:000b18 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection.rb:206

c:0087 p:0010 s:0596 E:000bf8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection.rb:176

c:0086 p:0010 s:0591 E:000ca8 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection.rb:108

c:0085 p:0101 s:0587 E:000fc0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/monitoring/publishable.rb:47

c:0084 p:0050 s:0573 E:000c70 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection.rb:107

c:0083 p:0055 s:0567 E:001080 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/operation/executable.rb:37

c:0082 p:0016 s:0561 E:0010f8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server/connection_pool.rb:107

c:0081 p:0014 s:0556 E:0011a8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/server.rb:247

c:0080 p:0010 s:0551 E:0021f8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/operation/executable.rb:35

c:0079 p:0028 s:0546 E:001268 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/collection/view/iterable.rb:81

c:0078 p:0027 s:0541 E:001380 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/collection/view/iterable.rb:41

c:0077 p:0023 s:0536 E:001430 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/retryable.rb:43

c:0076 p:0015 s:0530 E:001340 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongo-2.4.3/lib/mongo/collection/view/iterable.rb:39

c:0075 p:0033 s:0526 E:001520 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.2.1/lib/mongoid/query_cache.rb:222

c:0074 p:0020 s:0520 E:0012d8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.2.1/lib/mongoid/contextual/mongo.rb:132

c:0073 p:0022 s:0515 E:001620 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.2.1/lib/mongoid/contextual.rb:20 [FINISH]

c:0072 p:---- s:0507 E:002320 CFUNC :group_by

c:0071 p:0027 s:0503 E:0022c0 METHOD /home/ubuntu/orquest-server/app/models/comment.rb:21

c:0070 p:0028 s:0495 E:0016d8 METHOD /home/ubuntu/orquest-server/app/controllers/theaters_controller.rb:225

c:0069 p:0014 s:0490 E:001750 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.

c:0068 p:0014 s:0484 E:000d80 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186

c:0067 p:0035 s:0478 E:000df8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30

c:0066 p:0012 s:0473 E:000e60 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20

c:0065 p:0134 s:0470 E:0003d8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131

c:0064 p:0011 s:0460 E:000708 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19

c:0063 p:0012 s:0455 E:000f60 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20

c:0062 p:0014 s:0449 E:001020 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32

c:0061 p:0014 s:0444 E:001100 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166

c:0060 p:0028 s:0441 E:0011c0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.r

c:0059 p:0033 s:0433 E:0010d0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166

c:0058 p:0112 s:0427 E:000fe0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30

c:0057 p:0154 s:0421 E:0012d0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252

c:0056 p:0075 s:0413 E:001358 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124

c:0055 p:0065 s:0406 E:0013d0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30

c:0054 p:0028 s:0400 E:001458 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189

c:0053 p:0050 s:0393 E:0014d8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253

c:0052 p:0015 s:0386 E:001560 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49

c:0051 p:0051 s:0378 E:0015f0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31

c:0050 p:0155 s:0370 E:0016d8 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50 [FINISH]

c:0049 p:---- s:0358 e:000357 CFUNC :each

c:0048 p:0014 s:0354 E:001668 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33

c:0047 p:0049 s:0349 E:001790 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834

c:0046 p:0208 s:0343 E:001810 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/omniauth-1.8.1/lib/omniauth/strategy.rb:190

c:0045 p:0013 s:0337 E:001888 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/omniauth-1.8.1/lib/omniauth/strategy.rb:168

c:0044 p:0013 s:0332 E:0018f8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/omniauth-1.8.1/lib/omniauth/builder.rb:63

c:0043 p:0012 s:0327 E:0019a0 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:36 [FINISH]

c:0042 p:---- s:0324 e:000323 CFUNC :catch

c:0041 p:0073 s:0319 E:001970 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:35

c:0040 p:0012 s:0313 E:000328 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/etag.rb:25

c:0039 p:0058 s:0302 E:0003b8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:25

c:0038 p:0012 s:0293 E:000440 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12

c:0037 p:0037 s:0285 E:0004b8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jpmobile-5.1.0/lib/jpmobile/rack/mobile_carrier.rb:11

c:0036 p:0038 s:0280 E:000558 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232

c:0035 p:0010 s:0269 E:0005c8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226

c:0034 p:0030 s:0264 E:000660 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613

c:0033 p:0014 s:0254 E:000710 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26

c:0032 p:0037 s:0251 E:0007d8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97

c:0031 p:0016 s:0242 E:0006e8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24

c:0030 p:0024 s:0235 E:0008b0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12

c:0029 p:0030 s:0227 E:000958 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb

c:0028 p:0012 s:0216 E:0009d0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/web-console-3.5.1/lib/web_console/middleware.rb:135

c:0027 p:0027 s:0210 E:000ac0 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/web-console-3.5.1/lib/web_console/middleware.rb:20 [FINISH]

c:0026 p:---- s:0199 e:000198 CFUNC :catch

c:0025 p:0011 s:0194 E:000a58 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/web-console-3.5.1/lib/web_console/middleware.rb:18

c:0024 p:0030 s:0187 E:000b88 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:

c:0023 p:0051 s:0180 E:0007e0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36

c:0022 p:0012 s:0172 E:000c70 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:24

c:0021 p:0007 s:0169 E:000d50 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69

c:0020 p:0019 s:0166 E:000e00 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:26

c:0019 p:0016 s:0160 E:000d18 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69

c:0018 p:0049 s:0155 E:000c40 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:24

c:0017 p:0049 s:0149 E:000ef8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13

c:0016 p:0061 s:0144 E:001a60 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79

c:0015 p:0025 s:0138 E:001ae8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/request_store-1.4.0/lib/request_store/middleware.rb:19

c:0014 p:0047 s:0131 E:001b60 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25

c:0013 p:0105 s:0125 E:001be0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22

c:0012 p:0026 s:0119 E:001c80 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/runtime.rb:22

c:0011 p:0039 s:0109 E:001d08 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_m

c:0010 p:0024 s:0102 E:001d90 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12

c:0009 p:0103 s:0094 E:001e20 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125

c:0008 p:0012 s:0086 E:001ed0 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111

c:0007 p:0026 s:0074 E:001f50 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522

c:0006 p:0032 s:0068 E:000f68 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/configuration.rb:225

c:0005 p:0275 s:0063 E:0020a8 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:605

c:0004 p:0040 s:0038 E:002150 METHOD /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:437

c:0003 p:0084 s:0026 E:0021f8 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:301 [FINISH]

c:0002 p:0160 s:0016 E:001f10 BLOCK /home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120 [FINISH]

c:0001 p:---- s:0003 e:000002 (none) [FINISH]

    • Ruby level backtrace information ----------------------------------------

/home/ubuntu/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'