To avoid data races and use-after-free on shutdown in Python 3.13.
It seems to have worked before due to unintended guarantees of the
Python interpreter that are gone with the new version.
Uses `threading.Event` and `threading.Lock` to coordinate between the main thread handling signals and the `flush_stdout_loop` thread. The `_quit_on_signal` handler now signals the flush thread to exit, and waits for the flush thread to complete its current sleep cycle before calling `sys.exit()`. This prevents a use-after-free that shows up as a data race.
Ref b/474047558
PiperOrigin-RevId: 859182150
CC @fuqianggao
Closes#41416
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41416 from markdroth:xds_fuzzer_seeds 130eb99741d712b160632c03f27d0c9bfd6e97cf
PiperOrigin-RevId: 858751551
I added this in anticipation of wanting to use it, but that hasn't transpired... and we're seeing flaky tests. Removing for now.
Closes#40933
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40933 from ctiller:tdigest-- ba911bfe96cba57e0bfc97e13f0132c68dd67e64
PiperOrigin-RevId: 858731635
Adding PH2 experiment to the client_interceptors_end2end_test suite.
Also adding the Channel Arg wherever we missed it in the earlier PR : https://github.com/grpc/grpc/pull/41399/files
PiperOrigin-RevId: 856102643
This includes two major changes:
1. An additional credentials option `sni_override` with the type `optional<string>`. If `nullopt`, it has no effect, and if set to the empty string it disables sending SNI entirely. Otherwise, the specified string will be sent.
2. The implementation of [gRFC A101](https://github.com/grpc/proposal/blob/master/A101-SNI-setting-and-SNI-SAN-validation.md) using that new option. This includes options to set SNI and to validate SAN values against the set SNI value.
Closes#41051
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41051 from murgatroid99:xds_sni_support 6a1f8667dedc19947532720495b2932889236a12
PiperOrigin-RevId: 855765736
This test is especially painfully slow in case of asan. However, we cannot disable a test or a single EXPECT just for asan. So the assert needs to be removed. It is creating too much noise.
Having time dependent tests is never a good idea.
PiperOrigin-RevId: 855129723
This change introduces a new experiment `call_tracer_send_initial_metadata_is_an_annotation`. When enabled, the `CallTracer::RecordSendInitialMetadata` method will now record a `SendInitialMetadataAnnotation` and call a new `MutateSendInitialMetadata` method on the underlying `CallTracerInterface`.
The `CallTracerInterface` and its implementations (including XorMetrics, OpenCensus, OpenTelemetry, and test fakes) have been updated to include the new `MutateSendInitialMetadata` virtual method. The existing `RecordSendInitialMetadata` implementations are modified to check the experiment flag and delegate to `MutateSendInitialMetadata` if the experiment is active.
A new `SendInitialMetadataAnnotation` class is added, which inherits from `CallTracerAnnotationInterface::Annotation`. This annotation type is used to capture the state of the initial metadata for immutable tracing purposes.
Additionally, `ForEachKeyValue` methods are added to `MetadataInfo` and `HttpAnnotation` to facilitate iterating over metadata key-value pairs for annotation recording. The experiment configuration files are updated to include the new experiment.
PiperOrigin-RevId: 854227812
Bypassing 1 test in end2end_test because we want earlier validation of the flakes.
Fixing the bug may take about 2-4 working days. We need to check for the stability of the suite and so we need these to run on Kokoro.
Disabled retries in async_end2end_test , but not enabled the suite because of some timeout failure.
Also, refactored the code to add a new function ApplyCommonChannelArguments
PiperOrigin-RevId: 854186178
streaming_throughput_test is edited to disabled retry interceptor. streaming_throughput_test has NOT been enabled. Have to debug a flake.
PiperOrigin-RevId: 853963781
Adapted from PR #40420
The original author left team and the PR couldn't be merged due to CLA check.
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes#41355
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41355 from yuanweiz:workspace adb60674979a5d722f45e13e7c75291f22722f41
PiperOrigin-RevId: 853745450
[PH2][Trivial][BUILD] Adding a util file to cpp end2end folder
Adding some temporary helper functions for that.
Closes#41361
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41361 from tanvi-jagtap:2026_01_07_util_file 0702cb4958f80117f44c8bd796f58fa59ceba0c1
PiperOrigin-RevId: 853164713
The logic for the HTTP response code part is the same as #40907.
Also removed a few TODOs by moving from `GRPC_ERROR_CREATE` to `absl::XXError`.
Closes#41276
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41276 from rockspore:external_account_creds 9143e8450350bc9998fadfc3a8356bb35b7131cb
PiperOrigin-RevId: 852861049
When a `std::multimap` has multiple entries with the same key, calling `m.find(key)` returns an unspecified element.
Historically, this returns the first matching element. However, this is not guaranteed, and recent libc++ changes make this return an arbitrary element.
Using `m.equal_range(key)` is a replacement that will preserve the current behavior. The behavior of this is guaranteed to return a range of all matching elements in insertion order, and the beginning of the range is the same element as what's normally returned by `m.find(key)`.
Closes#41279
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41279 from rupprecht:multimap-find 70b116441d03eff80523e010b25336f5a75c70c2
PiperOrigin-RevId: 852844558
This change renames test suites containing EXPECT_DEATH assertions to include "DeathTest" in their name, following GoogleTest best practices for handling death tests.
PiperOrigin-RevId: 852840775
This is a prerequisite for queuing calls in the subchannel, which will be needed for A105 (https://github.com/grpc/proposal/pull/516).
Today, callers that need to start a call on a subchannel (primarily the client channel, but there are a couple of others) need to first ask the subchannel for the `ConnectedSubchannel` and then start the call on the `ConnectedSubchannel`. That works fine today, but when we add call queuing in the subchannel, this API would require us to acquire and release the subchannel's lock twice: once to get the `ConnectedSubchannel`, and again to add the call to the queue.
To avoid that, I have removed the `ConnectedSubchannel` from the subchannel's API and instead made it an internal implementation detail. Instead, the subchannel itself has methods for starting a call and doing pings.
This PR predominantly affects the v1 stack. There are essentially no changes to the v3 stack, since that code was already grabbing the `UnstartedCallDestination` out of the `ConnectedSubchannel` within a method on the subchannel.
This change is not completely trivial, but it should not cause any behavior changes, and it is sufficiently cross-cutting that I don't see an easy way to make it an experiment.
Closes#41009
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41009 from markdroth:subchannel_api_restructure ab6087d5b19f91a2a5e66871ddda5e6f74505d48
PiperOrigin-RevId: 852484250
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes#41348
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41348 from ananda1066:no_logging_test cad655f3b45ac1297d924ab972c56130d08eb92e
PiperOrigin-RevId: 852480919
[PH2][Tests] Enable cpp end2end tests that are working
Closes#41339
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41339 from tanvi-jagtap:2026_01_04_bulk_enable_cpp d501d8c35778de3adf59b7e68e876caa7ffd5b45
PiperOrigin-RevId: 852185367
1. Currently trying to read server to client message after trailing metadata has been pulled results in failure as the `server_to_client_pull_state` transitions to `kTerminated`. Ideally, if the trailing metadata was pushed with a non-cancelled status, first server to client message read should resolve to a `null` message signifying end of stream notification. Any subsequent server to client message reads would resolve to failure. If the trailing metadata was pushed with a cancelled status any server to client message reads would resolve to failure.
2. Add a check to enforce only cancelled metadata can be pushed in unstarted `CallState`.
3. Add waiters to `PollPullServerToClientMessageAvailable` to fix a corner case where that promise will never be polled.
PiperOrigin-RevId: 852094321
[PH2][Tests] Cpp end to end enabling multiple tests
Closes#41332
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41332 from tanvi-jagtap:2026_01_02_bulk_enable_passing_tests 4976d566fbb0942f1f03202b6f45c5c216846dba
PiperOrigin-RevId: 851511191
[PH2][Tests] Cpp end to end enabling few tests
Closes#41327
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41327 from tanvi-jagtap:2025_12_30_thread_stress_test 5dd5e21feb7425436bd479bf3ca0d62f0a6b63c5
PiperOrigin-RevId: 850655928
This reverts partial changes from https://github.com/grpc/grpc/pull/41240.
As we don't want to maintain a separate copy of BUILD targets for all of the xDS protos, because
(a) this will be a maintenance burden
(b) it could lead to ODR violations if another target depends on both copies of the xDS proto targets.
Closes#41302
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41302 from rishesh007:remove_parse_headers 42134419d292d0b18ca1c1d71e7c3d1611c5115e
PiperOrigin-RevId: 850383567
OpenSSL1.0.2 doesn't support TLS1.3, so the assumption on this test was wrong - it falls back to TLS1.2 behavior.
Closes#41241
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41241 from gtcooke94:portability_fix cee64677d3d016b49ae978ca0ed0691f8a7dfaf9
PiperOrigin-RevId: 845396113