[Draft] C++ repro example for Python's ping timeout issue#39354
Draft
sreenithi wants to merge 1 commit intogrpc:masterfrom
Draft
[Draft] C++ repro example for Python's ping timeout issue#39354sreenithi wants to merge 1 commit intogrpc:masterfrom
sreenithi wants to merge 1 commit intogrpc:masterfrom
Conversation
gnossen
approved these changes
Apr 23, 2025
Member
|
Eugene, as you're driving the Fork support effort, you control the timeline for this. Please manage it. |
Contributor
|
I will keep it here till I have some time between fork support reviews, will test it on top of my patch. |
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.
The root cause of the ping timeout issue in Python that was recently reported by Dataflow as well as in issue #38282 was because Python has explicitly disabled the use of EventEngine polling using the
GRPC_DO_NOT_INSTANTIATE_POSIX_POLLERbuild flag (Reference: #33279).Removing the flag solves this issue, however, considering that it originally was added because of lack of fork support when using EventEngine, the current work in progress to add fork support using EventEngine must be completed before removing this flag.
In addition, it was also found that the issue could not be reproduced when running via Bazel. This was because the
GRPC_DO_NOT_INSTANTIATE_POSIX_POLLERflag was not getting propagated upstream to the Core layer, unless specifically defined as a compiler option intools/bazel.rcor passed in via command lineThis PR hence includes the C++ server and client code to reproduce the ping timeout issue.
Steps to reproduce the ping timeout via Bazel in CPP:
export GRPC_TRACE=tcp,http,http2_keepalive,http2_ping,polling,polling_apiexport GRPC_VERBOSITY=debugbazel run //examples/cpp/ping_timeout_repro:greeter_server --copt=-DGRPC_DO_NOT_INSTANTIATE_POSIX_POLLERto start the CPP serverbazel run //examples/cpp/ping_timeout_repro:repro_greeter_client --copt=-DGRPC_DO_NOT_INSTANTIATE_POSIX_POLLERto start the CPP clientNOTE: The issue can only be reproduced when including the
--coptflag via command line. Running the example as described above with the specific debug trace logs should show log lines such as: