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

Seg fault after upgrading to pg v1.5.2 #530

Closed
stanhu opened this issue Apr 27, 2023 · 3 comments · Fixed by #531
Closed

Seg fault after upgrading to pg v1.5.2 #530

stanhu opened this issue Apr 27, 2023 · 3 comments · Fixed by #531

Comments

@stanhu
Copy link

stanhu commented Apr 27, 2023

After upgrading to pg v1.5.2, our CI hit a seg fault with Ruby 3.0.6. It looks like the garbage collector is marking an invalid memory address. Is it possible this is related to the write barrier work in #518?

-- C level backtrace information -------------------------------------------
/usr/local/lib/libruby.so.3.0(rb_print_backtrace+0x11) [0x7fdd293a65ae] vm_dump.c:758
/usr/local/lib/libruby.so.3.0(rb_vm_bugreport) vm_dump.c:998
/usr/local/lib/libruby.so.3.0(rb_bug_for_fatal_signal+0xf8) [0x7fdd291a6b38] error.c:787
/usr/local/lib/libruby.so.3.0(sigsegv+0x55) [0x7fdd292f9655] signal.c:963
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fdd290a1140]
/usr/local/lib/libruby.so.3.0(RVALUE_MARKED+0x1c) [0x7fdd291cd02e] gc.c:1388
/usr/local/lib/libruby.so.3.0(gc_mark_set) gc.c:5947
/usr/local/lib/libruby.so.3.0(gc_mark_ptr) gc.c:6061
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgresult_gc_mark+0x1d) [0x7fdd1fb60aad] pg_result.c:116
/usr/local/lib/libruby.so.3.0(is_mark_stack_empty+0x0) [0x7fdd291cfea9] gc.c:6433
/usr/local/lib/libruby.so.3.0(pop_mark_stack) gc.c:5427
/usr/local/lib/libruby.so.3.0(gc_mark_stacked_objects) gc.c:6427
/usr/local/lib/libruby.so.3.0(gc_mark_stacked_objects_all) gc.c:6473
/usr/local/lib/libruby.so.3.0(gc_marks_rest) gc.c:7414
/usr/local/lib/libruby.so.3.0(gc_marks+0x1a0) [0x7fdd291d0a38] gc.c:7470
/usr/local/lib/libruby.so.3.0(gc_start) gc.c:8319
/usr/local/lib/libruby.so.3.0(heap_prepare+0x30) [0x7fdd291d3798] gc.c:2046
/usr/local/lib/libruby.so.3.0(heap_next_freepage) gc.c:2204
/usr/local/lib/libruby.so.3.0(ractor_cache_slots) gc.c:2223
/usr/local/lib/libruby.so.3.0(newobj_slowpath) gc.c:2269
/usr/local/lib/libruby.so.3.0(newobj_slowpath_wb_protected) gc.c:2288
/usr/local/lib/libruby.so.3.0(newobj_of0+0xa) [0x7fdd291d3d92] gc.c:2327
/usr/local/lib/libruby.so.3.0(newobj_of) gc.c:2337
/usr/local/lib/libruby.so.3.0(rb_data_typed_object_wrap) gc.c:2516
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_tmbo_build_type_map_for_result2+0x80) [0x7fdd1fb6cae0] pg_type_map_by_oid.c:72
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_tmbo_fit_to_result+0x9b) [0x7fdd1fb6cd2b] pg_type_map_by_oid.c:149
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(rb_obj_write+0x0) [0x7fdd1fb60ba8] pg_result.c:225
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_new_result2) pg_result.c:226
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgresult_approx_size+0x0) [0x7fdd1fb62295] pg_result.c:241
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_new_result) pg_result.c:252
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgconn_async_get_last_result+0x129) [0x7fdd1fb574e9] pg_connection.c:3126
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgconn_async_exec+0x35) [0x7fdd1fb58695] pg_connection.c:3260

We've applied ruby/ruby#7663 to avoid a different seg fault in Nokogiri, so the line numbers will only match if you've used that.

Full details:

/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:19: [BUG] Segmentation fault at 0x0000000000008000
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0131 p:---- s:0682 e:000681 CFUNC :exec
c:0130 p:0009 s:0677 e:000676 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database
c:0129 p:0003 s:0674 e:000673 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies/interlock.rb:48
c:0128 p:0023 s:0671 e:000670 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/share_lock.rb:187
c:0127 p:0008 s:0661 e:000660 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies/interlock.rb:47
c:0126 p:0019 s:0657 e:000656 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database
c:0125 p:0003 s:0654 e:000653 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb
c:0124 p:0003 s:0651 e:000650 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_moni [FINISH]
c:0123 p:---- s:0648 e:000647 CFUNC :handle_interrupt
c:0122 p:0026 s:0643 e:000642 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_moni [FINISH]
c:0121 p:---- s:0640 e:000639 CFUNC :handle_interrupt
c:0120 p:0021 s:0635 e:000634 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_moni
c:0119 p:0007 s:0631 e:000630 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb
c:0118 p:0022 s:0627 e:000626 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/notifications/instrumenter.rb:24
c:0117 p:0034 s:0619 e:000618 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb
c:0116 p:0021 s:0610 e:000609 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database
c:0115 p:0028 s:0604 e:000603 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql_adapter.
c:0114 p:0011 s:0599 e:000598 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/schema_sta
c:0113 p:0018 s:0594 e:000589 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:112 [FINISH]
c:0112 p:---- s:0587 e:000586 CFUNC :fetch
c:0111 p:0008 s:0582 e:000581 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:111
c:0110 p:0009 s:0577 e:000576 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/schema_cache_with_renamed_table.rb:25
c:0109 p:0015 s:0572 e:000568 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:120 [FINISH]
c:0108 p:---- s:0566 e:000565 CFUNC :fetch
c:0107 p:0008 s:0561 e:000560 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:119
c:0106 p:0009 s:0556 e:000555 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/schema_cache_with_renamed_table.rb:29
c:0105 p:0058 s:0551 e:000550 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:553
c:0104 p:0004 s:0546 e:000545 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/attributes.rb:250
c:0103 p:0020 s:0542 e:000541 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:539 [FINISH]
c:0102 p:---- s:0539 e:000538 CFUNC :synchronize
c:0101 p:0013 s:0535 e:000534 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:536
c:0100 p:0003 s:0531 e:000530 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:402
c:0099 p:0041 s:0527 e:000526 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:428
c:0098 p:0007 s:0521 e:000520 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/type_caster/map.rb:16
c:0097 p:0007 s:0516 e:000515 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/arel/table.rb:108
c:0096 p:0007 s:0511 e:000510 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/table_metadata.rb:18
c:0095 p:0032 s:0506 e:000505 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:63
c:0094 p:0019 s:0498 e:000497 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:58
c:0093 p:0275 s:0491 e:000490 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:131 [FINISH]
c:0092 p:---- s:0479 e:000478 IFUNC
c:0091 p:---- s:0476 e:000475 CFUNC :each
c:0090 p:---- s:0473 e:000472 CFUNC :flat_map
c:0089 p:0014 s:0469 e:000468 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:84
c:0088 p:0016 s:0463 e:000462 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:29
c:0087 p:0203 s:0457 e:000456 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:1093
c:0086 p:0011 s:0449 e:000446 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:645
c:0085 p:0049 s:0441 e:000440 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:640
c:0084 p:0010 s:0436 e:000435 BLOCK /builds/gitlab-org/gitlab/lib/gitlab/database/background_migration/batched_migration.rb:37 [FINISH]
c:0083 p:---- s:0427 e:000426 CFUNC :instance_exec
c:0082 p:0012 s:0418 e:000417 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:411
c:0081 p:0023 s:0415 e:000414 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:804
c:0080 p:0010 s:0409 e:000408 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:411
c:0079 p:0013 s:0403 e:000402 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/scoping/named.rb:176 [FINISH]
c:0078 p:0082 s:0398 e:000397 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/migrations/batched_background_migration_helpers.rb:188
c:0077 p:0018 s:0390 e:000389 METHOD /builds/gitlab-org/gitlab/db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb:27 [FINISH]
c:0076 p:---- s:0386 e:000385 CFUNC :public_send
c:0075 p:0037 s:0381 e:000380 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:870
c:0074 p:0018 s:0375 e:000374 BLOCK /builds/gitlab-org/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33
c:0073 p:0014 s:0372 e:000371 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/query_analyzer.rb:37
c:0072 p:0043 s:0366 e:000365 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30
c:0071 p:0009 s:0360 e:000359 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:851
c:0070 p:0045 s:0357 e:000356 METHOD /usr/local/lib/ruby/3.0.0/benchmark.rb:293
c:0069 p:0013 s:0348 e:000347 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:850
c:0068 p:0037 s:0344 e:000343 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/connection
c:0067 p:0069 s:0338 e:000337 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:849
c:0066 p:0017 s:0332 e:000331 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1037
c:0065 p:0008 s:0324 e:000323 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1329
c:0064 p:0023 s:0321 e:000320 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1382
c:0063 p:0072 s:0316 e:000315 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36
c:0062 p:0109 s:0310 e:000309 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1328 [FINISH]
c:0061 p:---- s:0303 e:000302 IFUNC
c:0060 p:---- s:0300 e:000299 CFUNC :each
c:0059 p:0034 s:0296 e:000295 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1302
c:0058 p:0004 s:0291 e:000290 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1251
c:0057 p:0032 s:0288 e:000287 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1401
c:0056 p:0031 s:0283 e:000282 BLOCK /builds/gitlab-org/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:15
c:0055 p:0005 s:0279 e:000278 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1416
c:0054 p:0037 s:0275 e:000274 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/connection
c:0053 p:0043 s:0269 e:000268 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1416
c:0052 p:0004 s:0264 e:000263 METHOD /builds/gitlab-org/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:12
c:0051 p:0009 s:0260 e:000259 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1397
c:0050 p:0009 s:0255 e:000254 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1251
c:0049 p:0044 s:0251 e:000250 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1096
c:0048 p:0009 s:0245 e:000244 BLOCK /builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:135
c:0047 p:0020 s:0242 e:000241 METHOD /builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:155
c:0046 p:0004 s:0238 e:000237 METHOD /builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:134
c:0045 p:0005 s:0234 e:000233 BLOCK /builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:33
c:0044 p:0013 s:0231 e:000230 METHOD /builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:50
c:0043 p:0004 s:0226 e:000225 METHOD /builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:33
c:0042 p:0004 s:0222 e:000221 BLOCK /builds/gitlab-org/gitlab/spec/support/migration.rb:16 [FINISH]
c:0041 p:---- s:0219 e:000218 CFUNC :instance_exec
c:0040 p:0010 s:0214 e:000213 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:365
c:0039 p:0007 s:0209 e:000208 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:529 [FINISH]
c:0038 p:---- s:0205 e:000204 CFUNC :each
c:0037 p:0012 s:0201 e:000200 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:528
c:0036 p:0048 s:0194 e:000193 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:480
c:0035 p:0012 s:0187 e:000186 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:553
c:0034 p:0008 s:0184 e:000183 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb:208 [FINISH]
c:0033 p:---- s:0181 e:000180 CFUNC :instance_exec
c:0032 p:0008 s:0177 e:000176 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb:204
c:0031 p:0032 s:0171 e:000170 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:552
c:0030 p:0075 s:0166 e:000165 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:606
c:0029 p:0008 s:0157 e:000156 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121 [FINISH]
c:0028 p:---- s:0153 e:000152 CFUNC :map
c:0027 p:0030 s:0149 e:000148 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121
c:0026 p:0033 s:0146 e:000145 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2070
c:0025 p:0007 s:0142 e:000141 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:116
c:0024 p:0009 s:0138 e:000137 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb:74
c:0023 p:0019 s:0133 e:000132 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:115
c:0022 p:0042 s:0126 E:001db0 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:89
c:0021 p:0065 s:0120 E:001ed0 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71
c:0020 p:0020 s:0112 E:001dd8 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45
c:0019 p:0025 s:0107 E:0022a0 TOP /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec:4 [FINISH]
c:0018 p:---- s:0104 e:000103 CFUNC :load
c:0017 p:0124 s:0099 E:001e40 TOP /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/bin/rspec:25 [FINISH]
c:0016 p:---- s:0094 e:000093 CFUNC :load
c:0015 p:0107 s:0089 E:001e70 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58
c:0014 p:0071 s:0083 E:001ec8 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:23
c:0013 p:0055 s:0078 E:001ef8 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:492
c:0012 p:0054 s:0073 E:000b60 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27
c:0011 p:0040 s:0065 E:0014e8 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127
c:0010 p:0239 s:0058 E:000318 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392
c:0009 p:0008 s:0045 E:001f58 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34
c:0008 p:0066 s:0040 E:000d28 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485
c:0007 p:0036 s:0033 E:001fe8 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28
c:0006 p:0109 s:0028 E:000c28 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/exe/bundle:45
c:0005 p:0014 s:0022 E:002078 METHOD /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117
c:0004 p:0227 s:0017 E:0026e8 TOP /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/exe/bundle:33 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0127 s:0008 E:001890 EVAL /usr/local/bin/bundle:25 [FINISH]
c:0001 p:0000 s:0003 E:001be0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/bundle:25:in <main>' /usr/local/bin/bundle:25:in load'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/exe/bundle:33:in <top (required)>' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/friendly_errors.rb:117:in with_friendly_errors'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/exe/bundle:45:in block in <top (required)>' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:28:in start'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:34:in dispatch'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli.rb:492:in exec'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:23:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in kernel_load'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/bundler-2.4.12/lib/bundler/cli/exec.rb:58:in load' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/bin/rspec:25:in <top (required)>'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/bin/rspec:25:in load' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/exe/rspec:4:in <top (required)>'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45:in invoke' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71:in run'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:89:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:115:in run_specs'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb:74:in report' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:116:in block in run_specs'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2070:in with_suite_hooks' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in block (2 levels) in run_specs'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in map' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in block (3 levels) in run_specs'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:606:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:552:in run_before_context_hooks'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb:204:in isolate_for_context_hook' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb:204:in instance_exec'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb:208:in block in isolate_for_context_hook' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:553:in block in run_before_context_hooks'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:480:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:528:in run_owned_hooks_for'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:528:in each' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:529:in block in run_owned_hooks_for'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:365:in run' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:365:in instance_exec'
/builds/gitlab-org/gitlab/spec/support/migration.rb:16:in block (2 levels) in <top (required)>' /builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:33:in schema_migrate_down!'
/builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:50:in with_db_config' /builds/gitlab-org/gitlab/ee/spec/support/helpers/ee/migrations_helpers.rb:33:in block in schema_migrate_down!'
/builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:134:in schema_migrate_down!' /builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:155:in disable_migrations_output'
/builds/gitlab-org/gitlab/spec/support/helpers/migrations_helpers.rb:135:in block in schema_migrate_down!' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1096:in down'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1251:in migrate' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1397:in with_advisory_lock'
/builds/gitlab-org/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:12:in with_advisory_lock_connection' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1416:in with_advisory_lock_connection'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in with_connection' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1416:in block in with_advisory_lock_connection'
/builds/gitlab-org/gitlab/lib/gitlab/database/migrations/pg_backend_pid.rb:15:in block in with_advisory_lock_connection' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1401:in block in with_advisory_lock'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1251:in block in migrate' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1302:in migrate_without_lock'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1302:in each' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1328:in execute_migration_in_transaction'
/builds/gitlab-org/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in ddl_transaction' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1382:in ddl_transaction'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1329:in block in execute_migration_in_transaction' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:1037:in migrate'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:849:in migrate' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in with_connection'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:850:in block in migrate' /usr/local/lib/ruby/3.0.0/benchmark.rb:293:in measure'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:851:in block (2 levels) in migrate' /builds/gitlab-org/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30:in exec_migration'
/builds/gitlab-org/gitlab/lib/gitlab/database/query_analyzer.rb:37:in within' /builds/gitlab-org/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33:in block in exec_migration'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:870:in exec_migration' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/migration.rb:870:in public_send'
/builds/gitlab-org/gitlab/db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb:27:in down' /builds/gitlab-org/gitlab/lib/gitlab/database/migrations/batched_background_migration_helpers.rb:188:in delete_batched_background_migration'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/scoping/named.rb:176:in block in scope' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:411:in _exec_scope'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:804:in _scoping' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:411:in block in _exec_scope'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation.rb:411:in instance_exec' /builds/gitlab-org/gitlab/lib/gitlab/database/background_migration/batched_migration.rb:37:in block in class:BatchedMigration'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:640:in where' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:645:in where!'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/query_methods.rb:1093:in build_where_clause' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:29:in build_from_hash'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:84:in expand_from_hash' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:84:in flat_map'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:84:in each' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:131:in block in expand_from_hash'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:58:in []' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/relation/predicate_builder.rb:63:in build'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/table_metadata.rb:18:in type' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/arel/table.rb:108:in type_for_attribute'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/type_caster/map.rb:16:in type_for_attribute' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:428:in type_for_attribute'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:402:in attribute_types' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:536:in load_schema'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:536:in synchronize' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:539:in block in load_schema'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/attributes.rb:250:in load_schema!' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/model_schema.rb:553:in load_schema!'
/builds/gitlab-org/gitlab/lib/gitlab/database/schema_cache_with_renamed_table.rb:29:in columns_hash' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:119:in columns_hash'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:119:in fetch' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:120:in block in columns_hash'
/builds/gitlab-org/gitlab/lib/gitlab/database/schema_cache_with_renamed_table.rb:25:in columns' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:111:in columns'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:111:in fetch' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/schema_cache.rb:112:in block in columns'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:116:in columns' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in column_definitions'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:17:in query' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:687:in log'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/notifications/instrumenter.rb:24:in instrument' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:695:in block in log'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:696:in block (2 levels) in log'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:18:in block in query' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads'
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in block (2 levels) in query' /builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/activerecord-6.1.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in exec'

-- Machine register context ------------------------------------------------
RIP: 0x00007fdd291cd02e RBP: 0x00007ffc511aa3d0 RSP: 0x00007ffc511aa3c0
RAX: 0x0000000000008000 RBX: 0x00007fdd2846b008 RCX: 0x00007fdcf2c2e710
RDX: 0x00000000000029b8 RDI: 0x00007fdd2846b000 RSI: 0xcccccccccccccccd
R8: 0x00007fdd21fd0628 R9: 0x00007fdd2846b000 R10: 0x00007fdcf046a800
R11: 0x00007fdd29082b00 R12: 0x000000000000a9b8 R13: 0x00007fdd2846b000
R14: 0x00007fdcdf59c608 R15: 0x00007fdd2846b030 EFL: 0x0000000000010206

-- C level backtrace information -------------------------------------------
/usr/local/lib/libruby.so.3.0(rb_print_backtrace+0x11) [0x7fdd293a65ae] vm_dump.c:758
/usr/local/lib/libruby.so.3.0(rb_vm_bugreport) vm_dump.c:998
/usr/local/lib/libruby.so.3.0(rb_bug_for_fatal_signal+0xf8) [0x7fdd291a6b38] error.c:787
/usr/local/lib/libruby.so.3.0(sigsegv+0x55) [0x7fdd292f9655] signal.c:963
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fdd290a1140]
/usr/local/lib/libruby.so.3.0(RVALUE_MARKED+0x1c) [0x7fdd291cd02e] gc.c:1388
/usr/local/lib/libruby.so.3.0(gc_mark_set) gc.c:5947
/usr/local/lib/libruby.so.3.0(gc_mark_ptr) gc.c:6061
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgresult_gc_mark+0x1d) [0x7fdd1fb60aad] pg_result.c:116
/usr/local/lib/libruby.so.3.0(is_mark_stack_empty+0x0) [0x7fdd291cfea9] gc.c:6433
/usr/local/lib/libruby.so.3.0(pop_mark_stack) gc.c:5427
/usr/local/lib/libruby.so.3.0(gc_mark_stacked_objects) gc.c:6427
/usr/local/lib/libruby.so.3.0(gc_mark_stacked_objects_all) gc.c:6473
/usr/local/lib/libruby.so.3.0(gc_marks_rest) gc.c:7414
/usr/local/lib/libruby.so.3.0(gc_marks+0x1a0) [0x7fdd291d0a38] gc.c:7470
/usr/local/lib/libruby.so.3.0(gc_start) gc.c:8319
/usr/local/lib/libruby.so.3.0(heap_prepare+0x30) [0x7fdd291d3798] gc.c:2046
/usr/local/lib/libruby.so.3.0(heap_next_freepage) gc.c:2204
/usr/local/lib/libruby.so.3.0(ractor_cache_slots) gc.c:2223
/usr/local/lib/libruby.so.3.0(newobj_slowpath) gc.c:2269
/usr/local/lib/libruby.so.3.0(newobj_slowpath_wb_protected) gc.c:2288
/usr/local/lib/libruby.so.3.0(newobj_of0+0xa) [0x7fdd291d3d92] gc.c:2327
/usr/local/lib/libruby.so.3.0(newobj_of) gc.c:2337
/usr/local/lib/libruby.so.3.0(rb_data_typed_object_wrap) gc.c:2516
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_tmbo_build_type_map_for_result2+0x80) [0x7fdd1fb6cae0] pg_type_map_by_oid.c:72
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_tmbo_fit_to_result+0x9b) [0x7fdd1fb6cd2b] pg_type_map_by_oid.c:149
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(rb_obj_write+0x0) [0x7fdd1fb60ba8] pg_result.c:225
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_new_result2) pg_result.c:226
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgresult_approx_size+0x0) [0x7fdd1fb62295] pg_result.c:241
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pg_new_result) pg_result.c:252
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgconn_async_get_last_result+0x129) [0x7fdd1fb574e9] pg_connection.c:3126
/builds/gitlab-org/gitlab/vendor/ruby/3.0.0/gems/pg-1.5.2/lib/pg_ext.so(pgconn_async_exec+0x35) [0x7fdd1fb58695] pg_connection.c:3260
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(rb_thread_s_handle_interrupt+0x168) [0x7fdd293442b8] thread.c:2277
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(rb_thread_s_handle_interrupt+0x168) [0x7fdd293442b8] thread.c:2277
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(rb_hash_fetch_m+0x308) [0x7fdd291d96b8] hash.c:2140
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(rb_hash_fetch_m+0x308) [0x7fdd291d96b8] hash.c:2140
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_ensure+0x12a) [0x7fdd291af6da] eval.c:1162
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(flat_map_i+0x15) [0x7fdd29191995] enum.c:625
/usr/local/lib/libruby.so.3.0(rb_vm_pop_frame+0x0) [0x7fdd29385fce] vm_insnhelper.c:3734
/usr/local/lib/libruby.so.3.0(vm_yield_with_cfunc) vm_insnhelper.c:3735
/usr/local/lib/libruby.so.3.0(invoke_block_from_c_bh+0xe) [0x7fdd2939dae3] vm.c:1358
/usr/local/lib/libruby.so.3.0(vm_yield) vm.c:1398
/usr/local/lib/libruby.so.3.0(rb_yield_0) vm_eval.c:1331
/usr/local/lib/libruby.so.3.0(rb_yield) vm_eval.c:1347
/usr/local/lib/libruby.so.3.0(each_pair_i+0x11) [0x7fdd291d6241] hash.c:3106
/usr/local/lib/libruby.so.3.0(hash_ar_foreach_iter+0x7) [0x7fdd291d84fb] hash.c:1355
/usr/local/lib/libruby.so.3.0(ar_foreach_check) hash.c:981
/usr/local/lib/libruby.so.3.0(hash_foreach_call) hash.c:1503
/usr/local/lib/libruby.so.3.0(rb_ensure+0x12a) [0x7fdd291af6da] eval.c:1162
/usr/local/lib/libruby.so.3.0(rb_hash_foreach+0x53) [0x7fdd291dc5f0] hash.c:1527
/usr/local/lib/libruby.so.3.0(rb_hash_foreach) hash.c:1517
/usr/local/lib/libruby.so.3.0(rb_hash_each_pair+0x30) [0x7fdd291dd180] hash.c:3155
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd293932a7] vm_eval.c:135
/usr/local/lib/libruby.so.3.0(vm_call0_cfunc_with_frame) vm_eval.c:137
/usr/local/lib/libruby.so.3.0(vm_call0_cfunc) vm_eval.c:149
/usr/local/lib/libruby.so.3.0(vm_call0_body) vm_eval.c:180
/usr/local/lib/libruby.so.3.0(rb_call0+0x1df) [0x7fdd29395b8f] vm_eval.c:72
/usr/local/lib/libruby.so.3.0(iterate_method+0x4d) [0x7fdd29396b4d] vm_eval.c:832
/usr/local/lib/libruby.so.3.0(rb_iterate0+0x107) [0x7fdd293828b7] vm_eval.c:1515
/usr/local/lib/libruby.so.3.0(rb_block_call+0x54) [0x7fdd29382b04] vm_eval.c:1580
/usr/local/lib/libruby.so.3.0(enum_flat_map+0x37) [0x7fdd29193887] enum.c:662
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(yield_under+0x401) [0x7fdd2939f781] vm.c:1263
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(invoke_bmethod+0x149) [0x7fdd29391529] vm.c:1293
/usr/local/lib/libruby.so.3.0(vm_call_bmethod+0xd8) [0x7fdd2939b5c8] vm_insnhelper.c:2987
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_call0+0x1df) [0x7fdd29395b8f] vm_eval.c:72
/usr/local/lib/libruby.so.3.0(send_internal+0xf9) [0x7fdd29396359] vm_eval.c:1245
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_vm_call0+0xc7) [0x7fdd29393ae7] vm_eval.c:57
/usr/local/lib/libruby.so.3.0(rb_method_call_with_block_kw+0x88) [0x7fdd29298218] proc.c:2416
/usr/local/lib/libruby.so.3.0(rb_vm_pop_frame+0x0) [0x7fdd29385fce] vm_insnhelper.c:3734
/usr/local/lib/libruby.so.3.0(vm_yield_with_cfunc) vm_insnhelper.c:3735
/usr/local/lib/libruby.so.3.0(invoke_block_from_c_bh+0xe) [0x7fdd2939dae3] vm.c:1358
/usr/local/lib/libruby.so.3.0(vm_yield) vm.c:1398
/usr/local/lib/libruby.so.3.0(rb_yield_0) vm_eval.c:1331
/usr/local/lib/libruby.so.3.0(rb_yield) vm_eval.c:1347
/usr/local/lib/libruby.so.3.0(RB_FL_TEST_RAW+0x0) [0x7fdd29111814] array.c:2523
/usr/local/lib/libruby.so.3.0(RB_FL_ANY_RAW) ./include/ruby/internal/fl_type.h:258
/usr/local/lib/libruby.so.3.0(rb_array_len) ./include/ruby/internal/core/rarray.h:135
/usr/local/lib/libruby.so.3.0(rb_ary_each) array.c:2522
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(yield_under+0x401) [0x7fdd2939f781] vm.c:1263
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(RB_FL_TEST_RAW+0x0) [0x7fdd29111814] array.c:2523
/usr/local/lib/libruby.so.3.0(RB_FL_ANY_RAW) ./include/ruby/internal/fl_type.h:258
/usr/local/lib/libruby.so.3.0(rb_array_len) ./include/ruby/internal/core/rarray.h:135
/usr/local/lib/libruby.so.3.0(rb_ary_each) array.c:2522
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(yield_under+0x401) [0x7fdd2939f781] vm.c:1263
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_yield+0x253) [0x7fdd2939d9e3] vm.c:1263
/usr/local/lib/libruby.so.3.0(rb_ary_collect+0x5c) [0x7fdd2911856c] array.c:3635
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x109) [0x7fdd2938aaf9] insns.def:770
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(raise_load_if_failed+0x0) [0x7fdd2920b099] load.c:638
/usr/local/lib/libruby.so.3.0(rb_load_internal) load.c:698
/usr/local/lib/libruby.so.3.0(rb_f_load) load.c:770
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(raise_load_if_failed+0x0) [0x7fdd2920b099] load.c:638
/usr/local/lib/libruby.so.3.0(rb_load_internal) load.c:698
/usr/local/lib/libruby.so.3.0(rb_f_load) load.c:770
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0xa47) [0x7fdd293909a7] vm.c:2171
/usr/local/lib/libruby.so.3.0(raise_load_if_failed+0x0) [0x7fdd2920b099] load.c:638
/usr/local/lib/libruby.so.3.0(rb_load_internal) load.c:698
/usr/local/lib/libruby.so.3.0(rb_f_load) load.c:770
/usr/local/lib/libruby.so.3.0(vm_cfp_consistent_p+0x0) [0x7fdd2937c7af] vm_insnhelper.c:2928
/usr/local/lib/libruby.so.3.0(vm_call_cfunc_with_frame) vm_insnhelper.c:2930
/usr/local/lib/libruby.so.3.0(vm_sendish+0x385) [0x7fdd29387a55] vm_insnhelper.c:4529
/usr/local/lib/libruby.so.3.0(vm_exec_core+0x94) [0x7fdd2938aa84] insns.def:789
/usr/local/lib/libruby.so.3.0(rb_vm_exec+0x175) [0x7fdd293900d5] vm.c:2162
/usr/local/lib/libruby.so.3.0(rb_ec_exec_node+0xca) [0x7fdd291abb4a] eval.c:317
/usr/local/lib/libruby.so.3.0(ruby_run_node+0x59) [0x7fdd291b1bc9] eval.c:375
/usr/local/bin/ruby(main+0x5b) [0x556e999a810b] ./main.c:50

@stanhu
Copy link
Author

stanhu commented Apr 27, 2023

The seg fault seems to be pointing at typemap in t_pg_result:

rb_gc_mark_movable( this->typemap );

I see RB_OBJ_WRITE is used here:

ruby-pg/ext/pg_result.c

Lines 226 to 230 in 2b87db5

RB_OBJ_WRITE(self, &this->typemap, typemap);
this->p_typemap = RTYPEDDATA_DATA( this->typemap );
this->flags = p_conn->flags;
} else {
RB_OBJ_WRITE(self, &this->typemap, pg_typemap_all_strings);

I wonder if typemap is being assigned somewhere else.

@stanhu
Copy link
Author

stanhu commented Apr 27, 2023

Is RB_OBJ_WRITE needed here?

this->typemap.default_typemap = pg_typemap_all_strings;

Or any of these locations?

% git grep "default_typemap ="
ext/pg_type_map_by_column.c:            p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_by_mri_type.c:  this->typemap.default_typemap = pg_typemap_all_strings;
ext/pg_type_map_by_oid.c:       p_colmap->typemap.default_typemap = pg_typemap_all_strings;
ext/pg_type_map_by_oid.c:                       p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_by_oid.c:               p_new_typemap->typemap.default_typemap = sub_typemap;
ext/pg_type_map_in_ruby.c:      p_new_typemap->default_typemap = sub_typemap;

larskanis added a commit to larskanis/ruby-pg that referenced this issue Apr 27, 2023
Initialize connection and typemap prior to any object allocations, to make sure valid objects are marked.

Fixes ged#530
@larskanis
Copy link
Collaborator

While writing the code for commit 5061020 , I wondered if the VALUEs have to be valid before possible creation and assigning type maps. Now I know, they have to!

I opened #531 to fix this. I'll review the other write barrier commits for similar cases now.

larskanis added a commit to larskanis/ruby-pg that referenced this issue Apr 27, 2023
Initialize connection and typemap prior to any object allocations, to make sure valid objects are marked.

This regression was introduced in commit 5061020 while introducing write barriers.
However it is not necessary to use RB_OBJ_WRITE when the "old" object (1st argument) is not yet created or immediately after it was created.
The initial assignment can and must be done before processing the typemap as it was before the above commit.

Fixes ged#530
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

Successfully merging a pull request may close this issue.

2 participants