Commit Graph

53828 Commits

Author SHA1 Message Date
Mark D. Roth 69f625c27c
[xDS protos] update to get new fields for dualstack endpoints (#34491) 2023-09-27 09:06:36 -07:00
Arvind Bright f6a60253f6
[PSM Interop] update td bootstrap generator image for prod test (#34456)
This change is to update the TD bootstrap generator for prod tests. This
is part of the TD release process. The new image has already been merged
to staging and tested locally in google3.

cc: @sergiitk PTAL.
2023-09-27 08:47:54 -07:00
Eugene Ostroukhov 0f47441d5c
[build] Update Ubuntu docker images to 22 (#34473) 2023-09-26 15:41:50 -07:00
Richard Belleville 3bdd972c4a
[Release] Bump master version to 1.60 (gjallarhorn) (#34488)
<!--

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.

-->
2023-09-26 13:10:20 -07:00
apolcyn 74048f118b
[ruby] disable ruby fork tests (#34443)
We see flakes on CI due to https://github.com/grpc/grpc/issues/34442, so
let's disable these tests until that's fixed.
2023-09-26 10:35:35 -07:00
Craig Tiller c461ba022b
[context] Add a placeholder context for some internal work (#34480) 2023-09-26 09:25:38 -07:00
Eugene Ostroukhov 16e26b1091
[test] Fix venv version installed on Fedora 26 (#34477) 2023-09-26 09:10:35 -07:00
Sergii Tkachenko 3f9417a775
[PSM Interop] SSA: Remove failfast=True (#34478)
Was never needed in the first place.
2023-09-25 17:42:24 -07:00
Richard Belleville bc4d81d0d7
Bump core version 202309251628 (#34476) 2023-09-25 17:18:17 -07:00
Denver Coneybeare df4c0c6325
[exec-ctx] Remove ScopedTimeCache from ExecCtx on iOS (#34416)
Fix a crash on older iOS versions due to problematic thread-local
variable initialization.

See https://github.com/firebase/firebase-ios-sdk/issues/11509

Basically, there appears to be a bug in Xcode where it generates
assembly for thread-local variable initialization that is susceptible to
a crash. For example, on arm64 the generated assembly relies on
registers like x8 and x10 being preserved by the thread-local variable
initialization routine; however, in some cases this thread-local
variable initialization calls functions like
`ImageLoaderMachOCompressed::doBindFastLazySymbol` which clobber these
registers, leaving their values indeterminate when the caller resumes.
When those indeterminate values are later used as memory addresses they
are invalid and result in a crash.

This PR works around this bug by removing the `ScopedTimeCache` member
variable from the `ExecCtx` class on iOS. This is a reasonable
workaround because `ScopedTimeCache` is only a slight optimization for
data centers that entirely doesn't matter for mobile.

See https://github.com/dconeybe/TlsCrashIos12 for a demo of this crash.

Googlers see b/300501963 for full details.
2023-09-25 14:39:22 -07:00
Gina Yeh fe70af228b
[interop] Add v1.58.2 release of grpc-go to interop matrix (#34449) 2023-09-25 14:05:52 -07:00
Eugene Ostroukhov a5b215024c
[test] Update images to Fedora 36 (#34469) 2023-09-25 13:45:40 -07:00
Craig Tiller 5a28bcb574
[promises] Re-enable CI for promise-based-client-call (#34466)
We disabled this a little while ago for lack of CI bandwidth, but #34404
ought to have freed up enough capacity that we can keep running this.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-25 13:27:34 -07:00
Alisha Nanda 11c8b53f18
[memory] Re-align caches for transport, stream, and tcp (#34397)
Cache realignment saves 64 bytes per transport, 40 bytes per stream, 8
bytes per tcp endpoint, and 24 bytes per transport op.
2023-09-25 13:18:19 -07:00
Esun Kim 9ee3562d84
[Test] Changed the script to use gcc8 (#34467)
Changed missing piece of https://github.com/grpc/grpc/pull/34444
2023-09-25 12:53:42 -07:00
AJ Heller 15a8aebc6d
[experiment] Remove work_stealing experiment configuration (#34468)
Cleanup after https://github.com/grpc/grpc/pull/34315
2023-09-25 11:00:34 -07:00
Craig Tiller 59d886cb5c
[fuzzing] Expose random number generator to some fuzzers (#34415)
Expand our fuzzing capabilities by allowing fuzzers to choose the bits
that go into random number distribution generators.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-25 10:17:58 -07:00
AJ Heller 7fc1b33371
[EventEngine] Fix dual-stack socket logic around fd:0 (#34464) 2023-09-25 10:02:58 -07:00
Jan Tattermusch 4c0e8086e5
[bazelified tests] Unbreak RBE bazelified tests after #34444 (#34463)
Unbreak what was broken by
https://github.com/grpc/grpc/pull/34444#issuecomment-1733830982.
2023-09-25 16:22:46 +00:00
Richard Belleville 98704e7e4d
[Interop] Re-add SSA env var flip until safe to remove (#34460) 2023-09-24 16:18:21 -07:00
Richard Belleville 49e6aa68bb
[CSM] Add CSM Example client and server images (#34447)
Joint effort with @yashykt and @sanjaypujare

---------

Co-authored-by: Yash Tibrewal <yashkt@google.com>
Co-authored-by: Sanjay Pujare <sanjaypujare@users.noreply.github.com>
2023-09-24 12:07:17 -07:00
Xuan Wang 7421096960
[Python 3.12] Increase test timeout (#34454)
Passed manual run:
https://fusion2.corp.google.com/invocations/0e337438-8573-4b54-ba1c-242b1ad58586
<!--

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.

-->
2023-09-23 13:36:14 -07:00
Sergii Tkachenko 8d3914f774
[PSM Interop] Use newer bootstrap in CSM tests (#34457) 2023-09-22 20:19:58 -07:00
Yash Tibrewal a0e3794f4b
[OTel C++] Method attribute filtering (#34350)
Implements method attribute filtering as defined by the gRFC
https://github.com/grpc/proposal/pull/380
2023-09-22 23:48:01 +00:00
Yash Tibrewal b9b208d6da
[CSM] Remove enable/disable metrics API (#34453)
There's an ongoing discussion on whether we should have API to disable
default metrics. Removing this API till we have a decision on that.

I'm keeping the internal API for enabling/disabling metrics on the OTel
plugin for now, just not exposing it publicly.
2023-09-22 16:45:53 -07:00
Sergii Tkachenko c76730114a
[PSM Interop] Rename GAMMA tests to CSM tests (#34452)
Notes:
- GAMMA tests are now a subset of a wider CSM scope
- Some "gamma" files to ensure graceful renames
- Should be safe to merge as is
2023-09-22 16:25:10 -07:00
Hannah Shi cb24606117
Revert "[ObjC] Remove grpc core podspec module map" (#34439)
Reverts grpc/grpc#34361

Not sure why CI didn't capture it and why my previous test works, but
looks like it broke at least src/objective-c/examples/SwiftSample build.
Will see how CI goes in this PR.
2023-09-22 14:05:18 -07:00
Yash Tibrewal 06b55bdaa4
[RegisteredMethod] Set information on initial metadata about whether method is registered or not (#34432)
Summary - 
On the server-side, we are changing the point at which we decide whether
a method is registered or not from the surface to the transport at the
point where we are done receiving initial metadata and before we invoke
the recv_initial_metadata_ready closures from the filters. The main
motivation for this is to allow filters to check whether the incoming
method is a registered or not. The exact use-case is for observability
where we only want to record the method if it is registered. We store
the information about the registered method in the initial metadata.

On the client-side, we also set information about whether the method is
registered or not in the outgoing initial metadata.

Since we are effectively changing the lookup point of the registered
method, there are slight concerns of this being a potentially breaking
change, so we are guarding this with an experiment to be safe.

Changes - 
* Transport API changes -
* Along with `accept_stream_fn`, a new callback
`registered_method_matcher_cb` will be sent down as a transport op on
the server side. When initial metadata is received on the server side,
this callback is invoked. This happens before invoking the
`recv_initial_metadata_ready` closure.
* Metadata changes -
* We add a new non-serializable metadata trait `GrpcRegisteredMethod()`.
On the client-side, the value is a uintptr_t with a value of 1 if the
call has a registered/known method, or 0, if it's not known. On the
server side, the value is a (ChannelRegisteredMethod*). This metadata
information can be used throughout the stack to check whether a call is
registered or not.
* Server Changes -
* When a new transport connection is accepted, the server sets
`registered_method_matcher_cb` along with `accept_stream_fn`. This
function checks whether the method is registered or not and sets the
RegisteredMethod matcher in the metadata for use later.
* Client Changes -
* Set the metadata on call creation on whether the method is registered
or not.
2023-09-22 13:13:16 -07:00
Eugene Ostroukhov 2f78fffa37
[xds ssa] Remove environment variable protection for stateful affinity (#34435) 2023-09-22 13:06:51 -07:00
Esun Kim 05f14d002d
[Test] Changed gcc-7 to gcc-8 (#34444)
Bumping gcc 7 to 8 to workaround the ongoing gcc segfault problem when
building Protobuf C++. Currently Foundational C++ requires gcc 7 so this
is a temporary measure to make the test green. We need to either make a
decision to change the minimum version of gcc in the Foundational C++ or
find a way to support gcc 7 without gcc segfault soon.
2023-09-22 12:14:48 -07:00
Craig Tiller fa78ab988b
[per-cpu] Review feedback for PR #34421 (#34446)
Cleanup changes made in #34421 per review feedback (that change was
merged ahead to unblock some other work)
2023-09-22 12:08:34 -07:00
Yash Tibrewal ddc682c6c1
[CSM] Plumbing fixes (#34440)
Changes -
* CsmObservability doesn't need `SetTargetSelector`. Removed it.
* Added missing plumbing of `ServiceMeshLabelsInjector` in
`CsmObservability` to actually do the metadata exchange.

<!--

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.

-->
2023-09-22 12:03:30 -07:00
Yash Tibrewal d491fc5993
[OTel C++] OTel plugin improvements (#34441)
Changes -
* Use `grpc-c++` as the meter name and the proper version string when
creating the meter for OTel
* setting metric description and unit. (Pointed out by @DNVindhya )
2023-09-22 11:40:03 -07:00
Esun Kim c6b4952d74
[Test] Fix build error (#34445)
<!--

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.

-->
2023-09-22 11:37:04 -07:00
Craig Tiller 1dabdfbe6f
[per-cpu] Change up the cpu caching mechanism (#34421)
Lets us sever the dependency between stats & exec ctx (finally).

More work likely needs to go into the *mechanism* used here (I'm not a
fan of the per thread index), but that's also something we can address
later.
2023-09-22 11:23:11 -07:00
Xuan Wang ffdb58dd5f
[Python 3.12] Support Python 3.12 (#34398)
Support Python 3.12.

### Testing
* Passed all Distribution Tests.
* Also tested locally by installing 3.12 artifact.


<!--

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.

-->
2023-09-22 09:57:29 -07:00
Mark D. Roth 7f555bd9a1
[TLS creds] fix cancel_check_peer() to actually work (#34434)
The `cancel_check_peer()` method is [always called with a non-OK
status](866fc41067/src/core/lib/security/transport/security_handshaker.cc (L560)),
since it's used only in cancellation cases. However, the implementation
of this method for TLS creds was bailing out if the status was non-OK,
meaning that `cancel_check_peer()` was never actually cancelling the
verification request. This bug seems to have been introduced back in
#25631, when the method was initially implemented.

I don't think we actually have any async verifier implementations today,
so this isn't actually causing a problem. I discovered this bug as part
of #34426, which was triggering the core e2e `no_logging` test to fail.
That test is designed to ensure that we don't generate any logs while
processing individual RPCs, since that would be bad for performance and
would flood logfiles. My PR caused a connection attempt to be cancelled
during the test, which triggered the error log that I am removing in
this PR.

Note that with this PR, the TLS creds `cancel_check_peer()` methods are
not actually doing anything with the status. Ideally, they should be
passing the status through to the verifier's `Cancel()` method, but we
apparently didn't add a parameter for that, which means that although
cancellation will work now, it will not properly pass through the right
error message. At some point, we should fix this and add tests covering
cancellation of async verifier requests to prove that the error message
is propagated correctly.
2023-09-22 09:51:40 -07:00
Jan Tattermusch 60f25c289b
[bazelified tests] Bazelify tests from "linux/grpc_bazel_build" and make the original test job a noop. (#34429)
Bazelify tests from "linux/grpc_bazel_build" kokoro job by creating 3
bazelified tests - "build with strict warning", "build with no_xds=True"
and "build with no_xds=True negative test".

- also make the original "linux/grpc_bazel_build" kokoro job a no-op
(since bazelified tests now provide the same coverage).
2023-09-22 08:25:42 -07:00
apolcyn c48250dc1a
[test scripts] fix GRPC_VERBOSITY setting for run_tests jobs on CI (#34433)
The deleted code here was overriding the
[intended](866fc41067/tools/run_tests/run_tests.py (L62))
default test env of `GRPC_VERBOSITY=DEBUG`.

I'm just deleting it because it looks like`GRPC_TRACE=api` is not having
any affect anyways, since it relies on `GRPC_VERBOSITY=DEBUG` which it
happens to be unsetting.
2023-09-22 10:30:22 +02:00
Hannah Shi e5d41f2a1f
[ObjC] cf event engine supports resolve recursively from on_resolve callback (#34385)
If the client calls LookupHostname again within the on_resolve callback,
it re-acquires the `request_mu_` before releasing it which results in
deadlock.

With this PR it extracts the request and releases the lock before
calling on_resolve callback so it won't deadlock any more.
2023-09-21 21:58:53 -07:00
Stan Hu b3467cdab4
[ruby] Fix linking errors on x86-darwin (#34134)
https://github.com/grpc/grpc/pull/33538 added `-weak_framework
CoreFoundation` in `DLDFLAGS` for only `arm64-darwin` builds, but the
issue reported in https://github.com/grpc/grpc/issues/33483 can also
happen on `x86-darwin` builds. This can happen if:

1. The Ruby interpreter is compiled without
`-Wl,-undefined,dynamic_lookup`.
2. This happens if the Ruby interpreter is built with XCode 14.0 to 14.2
(https://bugs.ruby-lang.org/issues/19005).

Simplify the logic and always include `-weak_framework CoreFoundation`
for macOS builds.
2023-09-21 21:23:11 -07:00
Hannah Shi d636507ba9
[ObjC] Remove grpc core podspec module map (#34361)
Not really needed, this should help the firestore upgrade issue

Tested with 
https://github.com/wu-hui/ReproGrpcCyclic
2023-09-21 21:11:25 -07:00
Hannah Shi 22aff69c82
[ObjC] require osx version > 10.12 for cf event engine (#34061)
fixes #34049
2023-09-21 21:11:01 -07:00
Yash Tibrewal 1091cc3211
[CSM] Update labels (#34412)
Changes - 
* Remove `csm.remote_workload_pod_name` and
`csm.remote_workload_container_name`.
* Add `csm.remote_workload_name`, the value for which is sent through
MetadataExchange, from the `CSM_WORKLOAD_NAME` env var. (Note that this
is not added in local labels.)
* Add a local `csm.canonical_service` (@markdroth, please verify the key
that we want here) that is read from `CSM_CANONICAL_SERVICE_NAME` env
var, and we continue to send it over via MetadataExchange
2023-09-21 16:02:03 -07:00
Jan Tattermusch 866fc41067
[bazelified tests] Make bazelified C basictests build only (#34428)
- make C-core basictests use `--build_only` when running as bazelified
tests. This is because the volume of C core tests is expected to grow
very significantly after https://github.com/grpc/grpc/pull/34419 and
currently the non-bazelified counterpart of the tests (the presubmit
grpc_basictests_c_cpp_build_only job) is also "build only".
- make the linux presubmit job `grpc_basictests_c_cpp_build_only` a
noop, since the bazelified tests already give the same coverage on
presubmit.
2023-09-21 21:02:05 +02:00
Gregory Cooke aa17285f8e
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2. (#34408)
Revert the reversion of the SSL_CTX_new change (#34355 reverted #34180 )
with a fix.

There was an issue with using `strcpy` on a `new[] string` in the
constructor of `ssl_credentials`. An ASAN test caught this in some CI
down the line - `ERROR: AddressSanitizer: alloc-dealloc-mismatch
(operator new [] vs free)`

That `strcpy` call was changed to `grp_strdup` which duplicates a string
in a way that can be freed by `gpr_free` and should resolve the ASAN
failure.
2023-09-21 10:07:18 -07:00
Yash Tibrewal 112fffcdb4
[OTel] Minor test cleanup (#34353)
<!--

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.

-->
2023-09-21 09:23:47 -07:00
Esun Kim 6c11f4f181
[Testing] Added windows/grpc_distribtests_cpp_dll (#34425)
Added a separate distribtests for gRPC C++ DLL build on Windows. This
DLL build is a community support so it should be independently run from
the existing Windows distribtests. Actual DLL test will be added.
2023-09-20 16:58:58 -07:00
Craig Tiller 9b4e2c06e5
[pings] Trace abuse counters (#34414)
We're seeing some reports of the ping abuse policy not working like it
ought... add some tracing here to debug.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-20 15:21:04 -07:00
Eugene Ostroukhov 98ac00d7d2
[interop test] Fix the test (#34424) 2023-09-20 11:53:08 -07:00