Skip to content

Wrap do_fast_fallback_getaddrinfo with rb_thread_prevent_fork #12366

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

Conversation

shioimm
Copy link
Contributor

@shioimm shioimm commented Dec 17, 2024

Referencing PR #10864,
wrap do_fast_fallback_getaddrinfo with rb_thread_prevent_fork to avoid fork safety issues.

do_fast_fallback_getaddrinfo internally uses getaddrinfo(3), leading to fork safety issues, as described in PR #10864. This change ensures that do_fast_fallback_getaddrinfo is guarded by rb_thread_prevent_fork,
preventing fork during its execution and avoiding related issues.

Referencing PR ruby#10864,
wrap `do_fast_fallback_getaddrinfo` with `rb_thread_prevent_fork`
to avoid fork safety issues.

`do_fast_fallback_getaddrinfo` internally uses getaddrinfo(3),
leading to fork safety issues, as described in PR ruby#10864.
This change ensures that `do_fast_fallback_getaddrinfo`
is guarded by `rb_thread_prevent_fork`,
preventing fork during its execution and avoiding related issues.
@shioimm shioimm force-pushed the do_fast_fallback_getaddrinfo-in-rb_thread_prevent_fork branch from 570336b to 781a0a7 Compare December 17, 2024 12:06
Copy link

launchable-app bot commented Dec 17, 2024

All Tests passed!

✖️no tests failed ✔️65476 tests passed(3 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

7 similar comments
Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

Copy link

All Tests passed!

✖️no tests failed ✔️64750 tests passed(2 flakes)

@shioimm shioimm marked this pull request as ready for review December 18, 2024 00:37
@shioimm shioimm changed the title Wrap getaddrinfo(3) with rb_thread_prevent_fork Wrap do_fast_fallback_getaddrinfo with rb_thread_prevent_fork Dec 18, 2024
@shioimm shioimm merged commit 498d6eb into ruby:master Dec 18, 2024
77 checks passed
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 this pull request may close these issues.

1 participant