Seg fault in google-protobuf (v3.19.x)
We recently updated to google-protobuf 3.19.1. I saw this seg fault in CI today: https://gitlab.com/gitlab-org/gitlab/-/jobs/1973073251
/builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362: [BUG] Segmentation fault at 0x0000000000000089
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0048 p:---- s:0264 e:000263 CFUNC :lookup
c:0047 p:1416 s:0259 e:000258 CLASS /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362
c:0046 p:0049 s:0256 e:000255 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:318 [FINISH]
c:0045 p:---- s:0253 e:000252 CFUNC :require
c:0044 p:0007 s:0248 e:000247 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
c:0043 p:0068 s:0245 e:000244 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299
c:0042 p:0010 s:0238 e:000237 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
c:0041 p:0011 s:0232 e:000231 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_services_pb.rb:5 [FINISH]
c:0040 p:---- s:0229 e:000228 CFUNC :require
c:0039 p:0007 s:0224 e:000223 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
c:0038 p:0068 s:0221 e:000220 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299
c:0037 p:0010 s:0214 e:000213 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
c:0036 p:0109 s:0208 e:000207 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly.rb:32 [FINISH]
c:0035 p:---- s:0205 e:000204 CFUNC :require
c:0034 p:0032 s:0200 e:000199 BLOCK /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:74 [FINISH]
c:0033 p:---- s:0195 e:000194 CFUNC :each
c:0032 p:0042 s:0191 e:000190 BLOCK /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69 [FINISH]
c:0031 p:---- s:0184 e:000183 CFUNC :each
c:0030 p:0026 s:0180 e:000179 METHOD /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58
c:0029 p:0013 s:0175 e:000174 METHOD /usr/local/lib/ruby/2.7.0/bundler.rb:174
c:0028 p:0016 s:0170 e:000169 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:53
c:0027 p:0006 s:0167 e:000166 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:74
c:0026 p:0015 s:0162 e:000161 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:33
c:0025 p:0021 s:0156 e:000155 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler.rb:15
c:0024 p:0062 s:0150 e:000149 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:52 [FINISH]
c:0023 p:0054 s:0145 e:000144 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27
c:0022 p:0040 s:0137 e:000136 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127
c:0021 p:0235 s:0130 e:000129 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392
c:0020 p:0062 s:0117 e:000116 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485
c:0019 p:0144 s:0110 e:000109 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:93 [FINISH]
c:0018 p:---- s:0106 e:000105 CFUNC :load
c:0017 p:0112 s:0101 e:000100 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/derailed:23 [FINISH]
c:0016 p:---- s:0096 e:000095 CFUNC :load
c:0015 p:0107 s:0091 e:000090 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63
c:0014 p:0071 s:0083 e:000082 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:28
c:0013 p:0024 s:0078 e:000077 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:476
c:0012 p:0054 s:0073 e:000072 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27
c:0011 p:0040 s:0065 e:000064 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127
c:0010 p:0239 s:0058 e:000057 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399
c:0009 p:0008 s:0045 e:000044 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30
c:0008 p:0066 s:0040 e:000039 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476
c:0007 p:0008 s:0033 e:000032 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24
c:0006 p:0109 s:0028 e:000027 BLOCK /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46
c:0005 p:0002 s:0022 e:000021 METHOD /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123
c:0004 p:0111 s:0017 E:001058 TOP /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0112 s:0008 E:002460 EVAL /usr/local/bin/bundle:23 [FINISH]
c:0001 p:0000 s:0003 E:0023a0 (none) [FINISH]
Line 362 corresponds to the CreateBundleResponse
:
CreateRepositoryFromURLRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateRepositoryFromURLRequest").msgclass
CreateRepositoryFromURLResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateRepositoryFromURLResponse").msgclass
CreateBundleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateBundleRequest").msgclass
CreateBundleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateBundleResponse").msgclass
CreateBundleFromRefListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateBundleFromRefListRequest").msgclass
CreateBundleFromRefListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CreateBundleFromRefListResponse").msgclass