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

Allow GRPC_ENABLE_FORK_SUPPORT environment variable to be set to 'false' #14056

Closed
sreecha opened this issue Jan 18, 2018 · 2 comments
Closed
Assignees

Comments

@sreecha
Copy link
Contributor

sreecha commented Jan 18, 2018

Currently we could only set the environment variable GRPC_ENABLE_FORK_SUPPORT to truthy values (see https://github.com/grpc/grpc/blob/v1.8.4/src/core/lib/support/fork.cc#L43)

There might be some scenarios where the user might want to explicitly disable fork support (see #13998 for example). To support such cases, we should allow the environment variable to also have falsey values

@sebbov
Copy link

sebbov commented Mar 6, 2018

What does GRPC_ENABLE_FORK_SUPPORT exactly do and what am I losing by disabling it as a work-around to googleapis/google-cloud-python#4992?

@srini100
Copy link
Contributor

srini100 commented Mar 6, 2018

@sebbov GRPC_ENABLE_FORK_SUPPORT was added to support usage where fork is not followed by exec. A pthread_atfork() handler was added to cleanup exiting threads before fork and manage the FDs after fork. This change introduced the deadlock bug which users can run into when doing fork/exec. As a quick workaround, GRPC_ENABLE_FORK_SUPPORT when set to false doesn't invoke this new logic. At this point this is tribal knowledge. A fix will be coming soon.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants