[Python] Align GRPC_ENABLE_FORK_SUPPORT env defaults in core and python#41455
Closed
sergiitk wants to merge 2 commits intogrpc:masterfrom
Closed
[Python] Align GRPC_ENABLE_FORK_SUPPORT env defaults in core and python#41455sergiitk wants to merge 2 commits intogrpc:masterfrom
sergiitk wants to merge 2 commits intogrpc:masterfrom
Conversation
Member
Author
|
Potentially solves #37710. |
setup.py
Outdated
| # | ||
| # Important! This must by in sync with the default value for the | ||
| # GRPC_ENABLE_FORK_SUPPORT env var parsed in fork_posix.pyx.pxi | ||
| ("GRPC_ENABLE_FORK_SUPPORT_DEFAULT", 0), |
Member
There was a problem hiding this comment.
The value should be "false". See
grpc/src/core/config/config_vars.cc
Lines 32 to 38 in abc7f59
Member
Author
There was a problem hiding this comment.
It did work (tested locally by reading the config_var value from the python layer), but I agree, using a bool makes more sense. Thanks.
murgatroid99
approved these changes
Jan 22, 2026
sergiitk
added a commit
to sergiitk/grpc
that referenced
this pull request
Feb 10, 2026
…on (grpc#41455) In the core, the default value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable is determined by the value of the `GRPC_ENABLE_FORK_SUPPORT_DEFAULT` macro, which is by default derived from the value of the `GRPC_ENABLE_FORK_SUPPORT` macro. Python sets `GRPC_ENABLE_FORK_SUPPORT`, so the feature is enabled there by default. However, Python also reads the value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable and sets its own default in `fork_posix.pyx.pxi`, and the feature is disabled there by default. The result is a mixed state that causes problems. This change fixes that by disabling the feature by default in both places. In the long run we want to enable it by default everywhere, but for now we don't have confidence in its stability. Closes grpc#41455 COPYBARA_INTEGRATE_REVIEW=grpc#41455 from sergiitk:fix/py/fork-defaults 73be72d PiperOrigin-RevId: 859928704
sergiitk
added a commit
that referenced
this pull request
Feb 10, 2026
…ts in core and python (#41588) Backport of #41455 to v1.78.x. --- In the core, the default value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable is determined by the value of the `GRPC_ENABLE_FORK_SUPPORT_DEFAULT` macro, which is by default derived from the value of the `GRPC_ENABLE_FORK_SUPPORT` macro. Python sets `GRPC_ENABLE_FORK_SUPPORT`, so the feature is enabled there by default. However, Python also reads the value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable and sets its own default in `fork_posix.pyx.pxi`, and the feature is disabled there by default. The result is a mixed state that causes problems. This change fixes that by disabling the feature by default in both places. In the long run we want to enable it by default everywhere, but for now we don't have confidence in its stability.
Closed
sergiitk
added a commit
to sergiitk/grpc
that referenced
this pull request
Mar 2, 2026
…and python (grpc#41455)" This reverts commit ee658b2.
copybara-service bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
…and python (#41455)" (#41769) - This reverts commit ee658b2. - This changed caused #41725 in v1.78.1, which was yanked as the result (ref b/487190834). - Tracking ticket for the follow-up investigation and fix: #41768. - Reopens #37710. Closes #41769 COPYBARA_INTEGRATE_REVIEW=#41769 from sergiitk:revert/fix/py/fork-defaults 01564d6 PiperOrigin-RevId: 877735128
sergiitk
added a commit
to sergiitk/grpc
that referenced
this pull request
Mar 9, 2026
…and python (grpc#41455)" (grpc#41769) - This reverts commit ee658b2. - This changed caused grpc#41725 in v1.78.1, which was yanked as the result (ref b/487190834). - Tracking ticket for the follow-up investigation and fix: grpc#41768. - Reopens grpc#37710. Closes grpc#41769 COPYBARA_INTEGRATE_REVIEW=grpc#41769 from sergiitk:revert/fix/py/fork-defaults 01564d6 PiperOrigin-RevId: 877735128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the core, the default value of the
GRPC_ENABLE_FORK_SUPPORTenvironment variable is determined by the value of theGRPC_ENABLE_FORK_SUPPORT_DEFAULTmacro, which is by default derived from the value of theGRPC_ENABLE_FORK_SUPPORTmacro. Python setsGRPC_ENABLE_FORK_SUPPORT, so the feature is enabled there by default. However, Python also reads the value of theGRPC_ENABLE_FORK_SUPPORTenvironment variable and sets its own default infork_posix.pyx.pxi, and the feature is disabled there by default. The result is a mixed state that causes problems.This change fixes that by disabling the feature by default in both places. In the long run we want to enable it by default everywhere, but for now we don't have confidence in its stability.