Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Urgent] Seg fault using Ruby google-protobuf v3.17.3 #8842

Closed
nishihara-tm opened this issue Jul 29, 2021 · 4 comments
Closed

[Urgent] Seg fault using Ruby google-protobuf v3.17.3 #8842

nishihara-tm opened this issue Jul 29, 2021 · 4 comments

Comments

@nishihara-tm
Copy link

nishihara-tm commented Jul 29, 2021

What version of protobuf and what language are you using?
protobuf: 3.17.3
Language: Ruby

What operating system (Linux, Windows, ...) and version?

What runtime / compiler are you using (e.g., python version or gcc version)
gcc (Debian 8.3.0-6) 8.3.0

What did you do?
Steps to reproduce the behavior:
Still trying to reproduce error

What did you expect to see
No segmentation fault

What did you see instead?
Segmentation fault

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

/usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/resources/account_budget_pb.rb:15: [BUG] Segmentation fault at 0x0000000000000010 | /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/resources/account_budget_pb.rb:15: [BUG] Segmentation fault at 0x0000000000000010
-- | --
  | 2021-07-29T02:32:13.214+09:00 | ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
  | 2021-07-29T02:32:13.214+09:00 | -- Control frame information -----------------------------------------------
  | 2021-07-29T02:32:13.214+09:00 | c:0076 p:---- s:0443 e:000442 CFUNC :add_message
  | 2021-07-29T02:32:13.214+09:00 | c:0075 p:0007 s:0438 E:001c10 BLOCK /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/resources/account_budget_pb.rb:15 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0074 p:---- s:0435 e:000434 CFUNC :instance_eval
  | 2021-07-29T02:32:13.214+09:00 | c:0073 p:---- s:0432 e:000431 CFUNC :add_file
  | 2021-07-29T02:32:13.214+09:00 | c:0072 p:0009 s:0426 E:0017f0 BLOCK /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/resources/account_budget_pb.rb:14 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0071 p:---- s:0423 e:000422 CFUNC :instance_eval
  | 2021-07-29T02:32:13.214+09:00 | c:0070 p:---- s:0420 e:000419 CFUNC :build
  | 2021-07-29T02:32:13.214+09:00 | c:0069 p:0070 s:0416 E:001520 TOP /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/resources/account_budget_pb.rb:13 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0068 p:---- s:0413 e:000412 CFUNC :require
  | 2021-07-29T02:32:13.214+09:00 | c:0067 p:0012 s:0408 e:000407 BLOCK /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22
  | 2021-07-29T02:32:13.214+09:00 | c:0066 p:0070 s:0405 e:000404 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92
  | 2021-07-29T02:32:13.214+09:00 | c:0065 p:0025 s:0393 e:000392 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21
  | 2021-07-29T02:32:13.214+09:00 | c:0064 p:0055 s:0387 e:000386 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30
  | 2021-07-29T02:32:13.214+09:00 | c:0063 p:0055 s:0380 e:000379 METHOD /usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34
  | 2021-07-29T02:32:13.214+09:00 | c:0062 p:0035 s:0374 e:000373 TOP /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/services/google_ads_service_pb.rb:10 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0061 p:---- s:0371 e:000370 CFUNC :require
  | 2021-07-29T02:32:13.214+09:00 | c:0060 p:0012 s:0366 e:000365 BLOCK /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22
  | 2021-07-29T02:32:13.214+09:00 | c:0059 p:0070 s:0363 e:000362 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92
  | 2021-07-29T02:32:13.214+09:00 | c:0058 p:0025 s:0351 e:000350 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21
  | 2021-07-29T02:32:13.214+09:00 | c:0057 p:0055 s:0345 e:000344 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30
  | 2021-07-29T02:32:13.214+09:00 | c:0056 p:0055 s:0338 e:000337 METHOD /usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34
  | 2021-07-29T02:32:13.214+09:00 | c:0055 p:0005 s:0332 e:000331 TOP /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/services/google_ads_service/client.rb:20 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0054 p:---- s:0329 e:000328 CFUNC :require
  | 2021-07-29T02:32:13.214+09:00 | c:0053 p:0012 s:0324 e:000323 BLOCK /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22
  | 2021-07-29T02:32:13.214+09:00 | c:0052 p:0070 s:0321 e:000320 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92
  | 2021-07-29T02:32:13.214+09:00 | c:0051 p:0025 s:0309 e:000308 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21
  | 2021-07-29T02:32:13.214+09:00 | c:0050 p:0055 s:0303 e:000302 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30
  | 2021-07-29T02:32:13.214+09:00 | c:0049 p:0055 s:0296 e:000295 METHOD /usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34
  | 2021-07-29T02:32:13.214+09:00 | c:0048 p:0041 s:0290 e:000289 TOP /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/v7/services/google_ads_service.rb:27 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0047 p:---- s:0286 e:000285 CFUNC :require
  | 2021-07-29T02:32:13.214+09:00 | c:0046 p:0012 s:0281 e:000280 BLOCK /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22
  | 2021-07-29T02:32:13.214+09:00 | c:0045 p:0070 s:0278 e:000277 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92
  | 2021-07-29T02:32:13.214+09:00 | c:0044 p:0025 s:0266 e:000265 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21
  | 2021-07-29T02:32:13.214+09:00 | c:0043 p:0055 s:0260 e:000259 METHOD /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30
  | 2021-07-29T02:32:13.214+09:00 | c:0042 p:0055 s:0253 e:000252 METHOD /usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34
  | 2021-07-29T02:32:13.214+09:00 | c:0041 p:0005 s:0247 e:000246 METHOD /usr/local/bundle/gems/google-ads-googleads-11.0.0/lib/google/ads/google_ads/factories/v7/services.rb:467
  | 2021-07-29T02:32:13.214+09:00 | c:0040 p:0040 s:0241 e:000240 METHOD /usr/local/lib/ruby/2.7.0/delegate.rb:83
  | 2021-07-29T02:32:13.214+09:00 | c:0039 p:0052 s:0232 e:000231 METHOD /usr/src/app/services/google_ads/client_service.rb:42 [FINISH]
  | 2021-07-29T02:32:13.214+09:00 | c:0038 p:---- s:0226 e:000225 CFUNC :new
  | 2021-07-29T02:32:13.214+09:00 | c:0037 p:0025 s:0220 e:000219 METHOD /usr/src/app/services/google_daily_crawler_service.rb:70
  | 2021-07-29T02:32:13.215+09:00 | c:0036 p:0003 s:0216 e:000215 METHOD /usr/src/app/services/google_daily_crawler_service.rb:76
  | 2021-07-29T02:32:13.215+09:00 | c:0035 p:0003 s:0210 e:000209 METHOD /usr/src/app/services/google_daily_crawler_service.rb:28
  | 2021-07-29T02:32:13.215+09:00 | c:0034 p:0173 s:0202 e:000201 METHOD /usr/src/lib/tasks/auto_stop_promotions.thor:149
  | 2021-07-29T02:32:13.215+09:00 | c:0033 p:0032 s:0193 e:000192 BLOCK /usr/src/lib/tasks/auto_stop_promotions.thor:136 [FINISH]
  | 2021-07-29T02:32:13.215+09:00コピーc:0032 p:---- s:0185 e:000184 CFUNC  :each | c:0032 p:---- s:0185 e:000184 CFUNC :each
  | 2021-07-29T02:32:13.215+09:00 | c:0031 p:0006 s:0181 e:000180 BLOCK /usr/src/lib/tasks/auto_stop_promotions.thor:133 [FINISH]
  | 2021-07-29T02:32:13.215+09:00 | c:0030 p:---- s:0177 e:000176 CFUNC :each
  | 2021-07-29T02:32:13.215+09:00 | c:0029 p:0034 s:0173 e:000172 METHOD /usr/src/lib/tasks/auto_stop_promotions.thor:132
  | 2021-07-29T02:32:13.215+09:00 | c:0028 p:0015 s:0166 e:000165 BLOCK /usr/src/lib/tasks/auto_stop_promotions.thor:26
  | 2021-07-29T02:32:13.215+09:00 | c:0027 p:0003 s:0163 e:000162 BLOCK /usr/src/Thorfile:207
  | 2021-07-29T02:32:13.215+09:00 | c:0026 p:0003 s:0160 e:000159 BLOCK /usr/src/Thorfile:237
  | 2021-07-29T02:32:13.215+09:00 | c:0025 p:0028 s:0157 e:000156 METHOD /usr/local/lib/ruby/2.7.0/benchmark.rb:308
  | 2021-07-29T02:32:13.215+09:00 | c:0024 p:0012 s:0152 e:000151 METHOD /usr/src/Thorfile:236
  | 2021-07-29T02:32:13.215+09:00 | c:0023 p:0007 s:0146 e:000145 BLOCK /usr/src/Thorfile:206
  | 2021-07-29T02:32:13.215+09:00 | c:0022 p:0033 s:0143 e:000142 METHOD /usr/src/Thorfile:229
  | 2021-07-29T02:32:13.215+09:00 | c:0021 p:0037 s:0136 e:000135 METHOD /usr/src/Thorfile:205
  | 2021-07-29T02:32:13.216+09:00 | c:0020 p:0040 s:0131 e:000130 BLOCK /usr/src/lib/tasks/auto_stop_promotions.thor:25
  | 2021-07-29T02:32:13.216+09:00 | c:0019 p:0003 s:0123 e:000122 BLOCK /usr/src/app/services/datadog/duration_service.rb:12
  | 2021-07-29T02:32:13.216+09:00 | c:0018 p:0028 s:0120 e:000119 METHOD /usr/local/lib/ruby/2.7.0/benchmark.rb:308
  | 2021-07-29T02:32:13.216+09:00 | c:0017 p:0012 s:0115 e:000114 METHOD /usr/src/app/services/datadog/duration_service.rb:11
  | 2021-07-29T02:32:13.216+09:00 | c:0016 p:0006 s:0110 e:000109 METHOD /usr/src/lib/tasks/auto_stop_promotions.thor:18
  | 2021-07-29T02:32:13.216+09:00 | c:0015 p:0054 s:0106 e:000105 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:27
  | 2021-07-29T02:32:13.216+09:00 | c:0014 p:0040 s:0098 e:000097 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/invocation.rb:126
  | 2021-07-29T02:32:13.216+09:00 | c:0013 p:0014 s:0091 e:000090 METHOD /usr/src/Thorfile:88
  | 2021-07-29T02:32:13.216+09:00コピーc:0012 p:0235 s:0085 e:000084 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387 | c:0012 p:0235 s:0085 e:000084 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387
  | 2021-07-29T02:32:13.216+09:00 | c:0011 p:0062 s:0072 e:000071 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/base.rb:466
  | 2021-07-29T02:32:13.216+09:00 | c:0010 p:0072 s:0065 e:000064 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/runner.rb:42
  | 2021-07-29T02:32:13.216+09:00 | c:0009 p:0080 s:0057 e:000056 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:29
  | 2021-07-29T02:32:13.217+09:00 | c:0008 p:0034 s:0049 e:000048 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:128
  | 2021-07-29T02:32:13.217+09:00 | c:0007 p:0040 s:0043 e:000042 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/invocation.rb:126
  | 2021-07-29T02:32:13.217+09:00 | c:0006 p:0235 s:0036 e:000035 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387
  | 2021-07-29T02:32:13.217+09:00 | c:0005 p:0062 s:0023 e:000022 METHOD /usr/local/bundle/gems/thor-0.20.3/lib/thor/base.rb:466
  | 2021-07-29T02:32:13.217+09:00 | c:0004 p:0025 s:0016 e:000015 TOP /usr/local/bundle/gems/thor-0.20.3/bin/thor:6 [FINISH]
  | 2021-07-29T02:32:13.217+09:00コピーc:0003 p:---- s:0013 e:000012 CFUNC  :load | c:0003 p:---- s:0013 e:000012 CFUNC :load
  | 2021-07-29T02:32:13.217+09:00 | c:0002 p:0112 s:0008 E:002060 EVAL /usr/local/bundle/bin/thor:23 [FINISH]
  | 2021-07-29T02:32:13.217+09:00 | c:0001 p:0000 s:0003 E:001160 (none) [FINISH]


2021-07-29T02:32:13.219+09:00 | -- C level backtrace information -------------------------------------------
  | 2021-07-29T02:32:13.397+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_bugreport+0x555) [0x7fd865d83ee5] vm_dump.c:755
  | 2021-07-29T02:32:13.397+09:00 | /usr/local/lib/libruby.so.2.7(rb_bug_for_fatal_signal+0xe7) [0x7fd865bc1df7] error.c:660
  | 2021-07-29T02:32:13.397+09:00 | /usr/local/lib/libruby.so.2.7(sigsegv+0x4b) [0x7fd865cef6bb] signal.c:946
  | 2021-07-29T02:32:13.397+09:00 | /lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fd8658ca730]
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(_upb_array_append_accessor2+0x5) [0x7fd86016c4e2] ruby-upb.h:1311
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(google_protobuf_DescriptorProto_add_oneof_decl) ruby-upb.h:2446
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(MessageBuilderContext_add_synthetic_oneofs) defs.c:2100
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(FileBuilderContext_add_message) defs.c:1481
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.398+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x24) [0x7fd865d6e480] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:782
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x16c) [0x7fd865d73edc] vm.c:1920
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(invoke_block_from_c_bh+0x2f0) [0x7fd865d7e4b0] vm.c:1044
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(yield_under+0x1c1) [0x7fd865d7e971] vm.c:1171
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(specific_eval+0x57) [0x7fd865d7ec47] vm_eval.c:1920
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_cfp_consistent_p+0x0) [0x7fd865d75a11] vm_eval.c:91
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_cfunc_with_frame) vm_eval.c:93
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_cfunc) vm_eval.c:105
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_body) vm_eval.c:140
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call0+0xbf) [0x7fd865d7608f] vm_eval.c:52
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call_kw+0x68) [0x7fd865d76328] vm_eval.c:268
  | 2021-07-29T02:32:13.399+09:00 | /usr/local/lib/libruby.so.2.7(rb_funcall_with_block+0x3d) [0x7fd865d772dd] vm_eval.c:718
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(Builder_add_file+0x9f) [0x7fd86016c1ef] defs.c:2380
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x24) [0x7fd865d6e480] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:782
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x16c) [0x7fd865d73edc] vm.c:1920
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(invoke_block_from_c_bh+0x2f0) [0x7fd865d7e4b0] vm.c:1044
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(yield_under+0x1c1) [0x7fd865d7e971] vm.c:1171
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(specific_eval+0x57) [0x7fd865d7ec47] vm_eval.c:1920
  | 2021-07-29T02:32:13.400+09:00 | /usr/local/lib/libruby.so.2.7(vm_cfp_consistent_p+0x0) [0x7fd865d75a11] vm_eval.c:91
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_cfunc_with_frame) vm_eval.c:93
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_cfunc) vm_eval.c:105
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_body) vm_eval.c:140
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call0+0xbf) [0x7fd865d7608f] vm_eval.c:52
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call_kw+0x68) [0x7fd865d76328] vm_eval.c:268
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(rb_funcall_with_block+0x3d) [0x7fd865d772dd] vm_eval.c:718
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(ruby_to_Builder+0x0) [0x7fd86016c0e3] defs.c:316
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(Builder_build) defs.c:2440
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/bundle/gems/google-protobuf-3.17.3/lib/google/protobuf_c.so(DescriptorPool_build) defs.c:317
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.401+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x24) [0x7fd865d6e480] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:782
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(load_iseq_eval+0x24) [0x7fd865c20641] load.c:585
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(require_internal) load.c:1015
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd865c20d63] load.c:1104
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.402+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(load_iseq_eval+0x24) [0x7fd865c20641] load.c:585
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(require_internal) load.c:1015
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd865c20d63] load.c:1104
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(load_iseq_eval+0x24) [0x7fd865c20641] load.c:585
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(require_internal) load.c:1015
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd865c20d63] load.c:1104
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.403+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(load_iseq_eval+0x24) [0x7fd865c20641] load.c:585
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(require_internal) load.c:1015
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd865c20d63] load.c:1104
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.404+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_call0_body+0x1b1) [0x7fd865d758e1] vm_eval.c:136
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call0+0xbf) [0x7fd865d7608f] vm_eval.c:52
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_call_kw+0x68) [0x7fd865d76328] vm_eval.c:268
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_funcallv_kw+0x77) [0x7fd865d77037] vm_eval.c:718
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_class_s_new+0x4c) [0x7fd865c6993c] object.c:2152
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.405+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(invoke_block_from_c_bh+0x2f0) [0x7fd865d7e4b0] vm.c:1044
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(rb_yield_values2+0x4f) [0x7fd865d7f26f] vm.c:1179
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(each_pair_i_fast+0x3b) [0x7fd865beb6fb] hash.c:3062
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(hash_ar_foreach_iter+0xf) [0x7fd865bee2f2] hash.c:1337
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(ar_foreach_check) hash.c:962
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(hash_foreach_call) hash.c:1485
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(rb_ensure+0xd4) [0x7fd865bc9ce4] eval.c:1129
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(rb_hash_foreach+0x54) [0x7fd865bf1f8f] hash.c:1509
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(rb_hash_foreach) hash.c:1499
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(rb_hash_each_pair+0x28) [0x7fd865bf2b18] hash.c:3093
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.406+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x24) [0x7fd865d6e480] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:782
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x16c) [0x7fd865d73edc] vm.c:1920
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(invoke_block+0xdd) [0x7fd865d7fcc3] vm.c:1044
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(invoke_iseq_block_from_c) vm.c:1116
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(invoke_block_from_c_bh) vm.c:1134
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(vm_yield) vm.c:1179
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_yield_0) vm_eval.c:1227
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_yield_1) vm_eval.c:1233
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_yield) vm_eval.c:1243
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_array_len+0x0) [0x7fd865b3329c] array.c:2135
  | 2021-07-29T02:32:13.407+09:00 | /usr/local/lib/libruby.so.2.7(rb_ary_each) array.c:2134
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x24) [0x7fd865d6e480] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:782
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x925) [0x7fd865d74695] vm.c:1929
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(raise_load_if_failed+0x0) [0x7fd865c1eec7] load.c:585
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(rb_load_internal) load.c:645
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(rb_f_load) load.c:701
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc_with_frame+0x4c) [0x7fd865d62ea9] vm_insnhelper.c:2514
  | 2021-07-29T02:32:13.408+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method_each_type+0xec) [0x7fd865d7ba5c] vm_insnhelper.c:2925
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd865d7c1f5] vm_insnhelper.c:3026
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(vm_sendish+0x22) [0x7fd865d6e3c2] vm_insnhelper.c:4023
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(vm_exec_core) insns.def:801
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(rb_vm_exec+0x16c) [0x7fd865d73edc] vm.c:1920
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/lib/libruby.so.2.7(rb_ec_exec_node+0xaa) [0x7fd865bc67ea] eval.c:278
  | 2021-07-29T02:32:13.409+09:00コピー/usr/local/lib/libruby.so.2.7(ruby_run_node+0x49) [0x7fd865bcba79] eval.c:336 | /usr/local/lib/libruby.so.2.7(ruby_run_node+0x49) [0x7fd865bcba79] eval.c:336
  | 2021-07-29T02:32:13.409+09:00 | /usr/local/bin/ruby(main+0x5b) [0x5557280aa10b] ./main.c:50
  | 2021-07-29T02:32:13.409+09:00


Anything else we should know about your project / environment

If you need more info, please let me know

@haberman
Copy link
Member

Thanks for the very useful report. It's especially helpful that the C stack trace has function/line info, how did you get that? Other reports don't have symbol information, since I believe the gem gets its symbols stripped during release (which I would like to fix, but I'm not sure how to get the Ruby toolchain not to do this).

It appears that this crash is in the DSL. This is a bit surprising as the DSL has not changed very much since #5866 in 2019. I took a look and could not find an obvious explanation for this crash.

Since getting a root cause could be difficult, I thought an easier fix would be to port the DSL from C to Ruby. I've wanted to do this for a while anyway, since there's no reason for the DSL to be implemented in C anymore. If the code is in Ruby, it can't cause SEGV bugs (there could still be SEGV bugs elsewhere in the library, but at the very least this will narrow down where the bug could be).

Do you have any way of trying out the fix on this branch? https://github.com/haberman/protobuf/tree/rubybuilder

@nishihara-tm
Copy link
Author

nishihara-tm commented Aug 4, 2021

@haberman
Thank you fro the quick fix for this!

Thanks for the very useful report. It's especially helpful that the C stack trace has function/line info, how did you get that?

The logs were printed by Cloudwatch Logs, and I didn't do any special setup, haha.

Do you have any way of trying out the fix on this branch? https://github.com/haberman/protobuf/tree/rubybuilder

Well, I will see if this fix works for us.
The problem is I still don't know how to reproduce this bug.
This bugs happened frequently but not always.
If you have any sample code to reproduce this, I would love to know. Thx.

@haberman
Copy link
Member

Unfortunately I don't have sample code to reproduce, since I don't have a root cause on the bug.

My fix for the bug is to migrate the crashing C code to Ruby, which shouldn't be capable of causing segfaults (unless there is a bug in C code elsewhere).

Have you been able to try the fix that was merged to master in #8850?

@haberman
Copy link
Member

I am going to close this as we believe it to be fixed in #8850

If you see this crash even with the fix (which should be released in the next protobuf release before too long), please comment again on the bug and we will re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants