-
Notifications
You must be signed in to change notification settings - Fork 180
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
Comments
The seg fault seems to be pointing at Line 116 in 2b87db5
I see Lines 226 to 230 in 2b87db5
I wonder if |
Is ruby-pg/ext/pg_type_map_by_mri_type.c Line 158 in b81b942
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
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
casperisfine
pushed a commit
to Shopify/rails
that referenced
this issue
May 3, 2023
Ref: ged/ruby-pg#530 Fix segfault witnessed in https://buildkite.com/rails/rails/builds/96048#0187c9f9-fafa-4795-a52f-163071126d61
briu
pushed a commit
to briu/rails
that referenced
this issue
May 4, 2023
Ref: ged/ruby-pg#530 Fix segfault witnessed in https://buildkite.com/rails/rails/builds/96048#0187c9f9-fafa-4795-a52f-163071126d61
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
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:
The text was updated successfully, but these errors were encountered: