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

Backport EventEngine Forkables #30605

Merged
merged 11 commits into from
Aug 17, 2022
Merged

Conversation

drfloob
Copy link
Member

@drfloob drfloob commented Aug 16, 2022

This fixes fork-related process hangs due to threads not being properly shutdown.

A (currently) pthread_atfork-based fork support mechanism, allowing EventEngines - or any other object that wants to implement the Forkable interface - respond to forks.
* Ensure iomgr does not track Forkable threads

New uses of grpc_core::Thread should not be tracked by iomgr. It would
be nice to enforce this, but that can come later. This should unblock
python releases.

* tell parent & child that forking is complete
@drfloob drfloob added the release notes: no Indicates if PR should not be in release notes label Aug 16, 2022
@drfloob drfloob requested a review from ctiller August 16, 2022 23:06
@drfloob drfloob added 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 Aug 16, 2022
src/core/lib/event_engine/forkable.cc Outdated Show resolved Hide resolved
src/core/lib/event_engine/forkable.cc Outdated Show resolved Hide resolved
src/core/lib/event_engine/forkable.cc Outdated Show resolved Hide resolved
@drfloob drfloob merged commit a8065cb into grpc:v1.48.x Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants