Skip to content

Add new Python specific Bazel compiler option to include GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER build define in Bazel tests#39346

Merged
veblush merged 5 commits intogrpc:masterfrom
sreenithi:ping_timeout_issue
May 13, 2025
Merged

Add new Python specific Bazel compiler option to include GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER build define in Bazel tests#39346
veblush merged 5 commits intogrpc:masterfrom
sreenithi:ping_timeout_issue

Conversation

@sreenithi
Copy link
Copy Markdown
Contributor

@sreenithi sreenithi commented Apr 23, 2025

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_POLLER build flag (Reference: #33279).

However, it was found that the issue could not be reproduced when running via Bazel. This was because the GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER flag was not getting propagated upstream to the Core layer, unless specifically defined as a compiler option in tools/bazel.rc or passed via command-line.

Without this option, all the while the Python Bazel tests have been testing something different than those covered by the setup.py build.

This PR hence does the following to fix the inconsistency:

  • Update tools/bazel.rc with a python specific compiler option that is included only when the specific --config command-line flag is included when running via Bazel
  • Updates Python Bazel tests to include the new config flag

Copy link
Copy Markdown
Contributor

@gnossen gnossen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's separate this into three PRs:

  • The Python repro (will not be merged)
  • The C++ repro (will not be merged)
  • The addition of the python Bazel config (will be merged)

@sreenithi sreenithi changed the title [Draft] Reproduction cases for ping timeout issue in Python and C++ Add new Python specific Bazel compiler option to include GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER build define in Bazel tests Apr 24, 2025
@sreenithi sreenithi marked this pull request as ready for review April 24, 2025 04:58
@sreenithi
Copy link
Copy Markdown
Contributor Author

Let's separate this into three PRs:

  • The Python repro (will not be merged)
  • The C++ repro (will not be merged)
  • The addition of the python Bazel config (will be merged)

Done, updated this PR to only include the Bazel config changes that can be merged.

The C++ and Python repro codes have been separated into 2 Draft PRs:
C++ Repro Code - #39354
Python Repro Code - #39359

@veblush veblush merged commit 9fe4f18 into grpc:master May 13, 2025
60 of 63 checks passed
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.

4 participants