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

[Ruby] replace strdup with gpr_strdup #34177

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

alto-ruby
Copy link
Contributor

@alto-ruby alto-ruby commented Aug 27, 2023

grpc 1.57.0 crashes win ruby and alpine due to no strdup in musl libc.
This diff replace strdup with grp_strdup

Thread 1 "ruby" received signal SIGSEGV, Segmentation fault.
0x00000000000a4596 in ?? ()
(gdb) bt
#0  0x00000000000a4596 in ?? ()
#1  0x00007ffff14e298c in grpc_rb_channel_create_in_process_add_args_hash_cb (key=<optimized out>, val=<optimized out>, args_obj=<optimized out>) at rb_channel_args.c:84
#2  0x00007ffff7c2b9ea in hash_ar_foreach_iter (error=0, argp=140737488344784, value=<optimized out>, key=<optimized out>) at hash.c:1341

fixes #34044
closes #27995

@alto-ruby alto-ruby marked this pull request as ready for review August 27, 2023 23:27
@alto-ruby alto-ruby requested a review from apolcyn August 27, 2023 23:28
@alto-ruby alto-ruby changed the title [Ruby[ replace strdup to gpr_strdup [Ruby] replace strdup to gpr_strdup Aug 27, 2023
@alto-ruby alto-ruby changed the title [Ruby] replace strdup to gpr_strdup [Ruby] replace strdup with gpr_strdup Aug 27, 2023
@taltcher
Copy link

We have also encountered the same issue on our end (running on Ruby alpine image) do have have an estimation of when this fix could be merged?

Copy link
Contributor

@apolcyn apolcyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@apolcyn apolcyn added release notes: no Indicates if PR should not be in release notes release notes: yes Indicates if PR needs to be in release notes and removed release notes: no Indicates if PR should not be in release notes labels Sep 19, 2023
@apolcyn apolcyn merged commit dfa040f into grpc:master Sep 19, 2023
66 of 68 checks passed
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 19, 2023
@womblep
Copy link

womblep commented Sep 20, 2023

Fantastic!
Do you know when the next gem will come out?

@taltcher
Copy link

taltcher commented Oct 1, 2023

@apolcyn - Do you know approximately when will we have an updated Ruby gem version with the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported Specifies if the PR has been imported to the internal repository lang/ruby release notes: yes Indicates if PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segementation fault with 1.57.0 "Segmentation fault" on alpine linux
5 participants