Commit Graph

53349 Commits

Author SHA1 Message Date
apolcyn b32d94de05
[ruby fork support] skip new fork tests since they're flaky at introduction (#33664)
These tests have been flaky since they were added in
https://github.com/grpc/grpc/pull/33430
2023-07-12 12:02:11 -07:00
AJ Heller 2788b56867
[iomgr][EventEngine] Improve server handling of file descriptor exhaustion (#33656) 2023-07-12 12:01:27 -07:00
Richard Belleville eb7b72ea5b
[PSM Interop] Loosen affinity test assertions (#33648)
As part of the dualstack backend designs, subchannels will be created
lazily. Therefore, instead of asserting that there is 1 READY subchannel
and `n - 1` IDLE subchannels, we just assert that there is 1 READY
subchannel.
2023-07-12 11:26:01 -07:00
Craig Tiller 7223a9e5fe
[fuzzing] Increase deadline (#33663)
Fix b/290886936
2023-07-12 10:31:39 -07:00
Craig Tiller 86d7c8125e
[fuzzing] Increase deadline (#33658)
Resolves b/290812157
2023-07-11 15:41:37 -07:00
Craig Tiller 8845e290db
[filter-test] Enhancements for better testing (#33652)
- Support call finalizers in filter test.
- Add an accessor to the filter implementation from the channel, so that
it can be interrogated by tests.
- Matcher to ensure that some metadata is *not* in a metadata batch

(functionality needed to support the additional testing we talked about
this morning)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 15:27:27 -07:00
Craig Tiller b7077f4bbf
[hpack] Rollforward huffman read optimization (#33657)
Rollforward in first commit, fixes in subsequent.
2023-07-11 15:26:54 -07:00
Vignesh Babu fa95c4c439
[interop] Add absl dependency to interop server (#33647)
<!--

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-07-11 15:02:17 -07:00
Craig Tiller 57c697d8ae
Revert "[hpack] Huffman read optimization" (#33655)
Reverts grpc/grpc#33269
2023-07-11 12:58:49 -07:00
Craig Tiller 20dfe78d95
[promises] Change physical layout of retry filter (#33479)
In preparation for implementing the promise based version, separate out
the legacy call data from the filter.

There are two commits here, each representing one phase of this code
movement:
66676d398c moves `class RetryFilter` into
the header and the vtable name into that class, as this will be shared
code between the implementations
4c84f115ad then moves `class
RetryFilter::CallData` into `class RetryFilterLegacyCallData`, and moves
*that* into its own file

Doing so makes me less confused as to what I'm editing going forward.

No functionality should be affected.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 10:23:36 -07:00
Craig Tiller 4ce51fe45d
[hpack] Huffman read optimization (#33269)
In real services most of our time ends up in the `Read1()` function,
which populates one byte into the bit buffer.
Change this to read in as many as possible bytes at a time into that
buffer.

Additionally, generate all possible (to some depth) parser geometries,
and add a benchmark for them. Run that benchmark and select the best
geometry for decoding base64 strings (since this is the main use-case).

(gives about a 30% speed boost parsing base64 then huffman encoded
random binary strings)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 08:41:15 -07:00
Craig Tiller 69b919ffe4
[logging] Handle trailers-only responses (#33640)
Try again to get a trailers only signal through to the logging filter.

(this needs a change for non-chttp2 transports... I think we wait until
we have actual users using binary logging on non http2 transports to do
that work)
2023-07-10 21:21:26 -07:00
Romain Geissler @ Amadeus 899bf72004
[C++] Fix two compilation warnings in grpcpp/support/proto_buffer_reader.h. (#33635)
Detected with gcc 13:
```
In file included from /data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/impl/proto_utils.h:31,
                 from ./include/generated/gacms.object.grpc.pb.h:18,
                 from ./include/generated/gacms.object.grpc.pb.cc:6:
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h: In member function 'virtual bool grpc::ProtoBufferReader::ReadCord(absl::lts_20230125::Cord*, int)': /data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h:157:24: error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Werror=sign-compare]
  157 |       if (slice_length <= count) {
      |           ~~~~~~~~~~~~~^~~~~~~~
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h: In lambda function:
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h:191:35: warning: unused parameter 'view' [-Wunused-parameter]
  191 |         [slice](absl::string_view view) { grpc_slice_unref(slice); });
      |                 ~~~~~~~~~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
```
2023-07-10 17:42:23 -07:00
apolcyn fe11ec9bcb
[ruby] experimental client side fork support (#33430)
Adds experimental fork support to gRPC/Ruby

Works towards https://github.com/grpc/grpc/issues/8798 (see caveats for why this wasn't marked fixed yet)
Works towards https://github.com/grpc/grpc/issues/33578 (see caveats for why this wasn't marked fixed yet)

This leverages existing `pthread_atfork` based C-core support for
forking that python/php use, but there's a bit extra involved mainly
because gRPC/Ruby has additional background threads.

New tests under `src/ruby/end2end` show example usage.

Based on https://github.com/grpc/grpc/pull/33495

Caveats:
- Bidi streams are not yet supported (bidi streams spawn background
threads which are not yet fork safe)
- Servers not supported
- Only linux supported
2023-07-10 13:34:10 -07:00
Vignesh Babu 974798a427
[tracing] Fix flakiness in tcp_posix_test (#33639)
tcp_posix_test is incorrectly assuming that all endpoint_writes with
timestamps enabled will be successfully traced. Remove the timestamps
checking related tests to prevent flakes when the test is enabled
internally.
2023-07-10 12:59:57 -07:00
Eric Anderson e0b8bd9c5b
[interop_matrix] Add Java 1.50.3 (#32865) 2023-07-10 11:49:21 -07:00
Eric Anderson 4599419687
[interop_matrix] Add Java 1.55.1 (#33049) 2023-07-10 11:49:08 -07:00
Craig Tiller d7f794743f
[promises] Fix use-after-free noticed internally (#33644)
CQ can access the call up until it's retrieved by the application, and
so needs to hold a ref.
2023-07-10 11:28:24 -07:00
Craig Tiller ed587f2b07
[hpack] Reduce parse table size in the rare case of a parse error (#33637)
Most of the time parsing succeeds, and only rarely do we see an error.

This change reduces the parse memento size from 120 bytes to 56 bytes.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-10 11:21:51 -07:00
Jan Tattermusch ac3b6bfd4d
[csharp] Include correct build of Grpc.Tools in nightly packages (#33595)
Tentative fix for  #32179.
2023-07-10 16:35:22 +02:00
alto-ruby f7b1ed8287
[Ruby] remove objs and strip libs in ruby extension build (#33596)
Remove `src/ruby/ext/grpc/objs/` and strip `src/ruby/ext/grpc/libs/` in
ruby build dir to save some space.
This can reduce the grpc gem size from more than 1G to about 70~80M.
This only affects opt build, dbg build remains the same.

A proper fix maybe use the same makefile to build c-core and the
extension rather than building c-core when generating the extension
makefile.

fixes: https://github.com/grpc/grpc/issues/33412
2023-07-09 18:38:53 -07:00
Craig Tiller dc5c99c9b4
[fuzzing] Increase deadline (#33600)
Similar pattern to many others.. increase this deadline to have the
fuzzer pass.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-07 12:39:55 -07:00
Sergii Tkachenko d66dbdba84
[PSM Interop] Include app net test to the PSM Interop LB suite (#33620)
ref b/288578634
2023-07-07 10:02:52 -07:00
Craig Tiller d3d4d5309d
[end2end] Fix fuzzer found deadline bug (#33633)
fix b/290140776
2023-07-07 09:43:35 -07:00
Craig Tiller cdfbb0ced7
[end2end] Fix fuzzer found deadline bug (#33629)
Fixes b/288888511
2023-07-07 09:43:11 -07:00
Craig Tiller e28729fe0a
[end2end] Fix fuzzer found deadline bug (#33630)
fix b/288965746
2023-07-07 09:42:48 -07:00
Craig Tiller f417da77a6
[end2end] Fix fuzzer found deadline bug (#33631)
fix b/288718007
2023-07-07 09:07:18 -07:00
Craig Tiller 4b7a360041
[end2end] Fix fuzzer found deadline bug (#33632)
fix b/289593034
2023-07-07 09:06:20 -07:00
nanahpang 0cc9d16e9c
[chaotic-good] Implement a promise-based endpoint for chaotic-good transport to read & write to EventEngine::Endpoint. (#33257)
This PR is continuing the work of prototyping in
https://github.com/grpc/grpc/pull/31592, and the design doc is at
[link](https://docs.google.com/document/d/1vRy0yse-d1heLQRmLPo_0figsTPXJAnNN84tBCAne_s/edit?pli=1&resourcekey=0-JvUPdq0LaZq8gMkgT9Pzlw#heading=h.qgvc5vr55ytg).

<!--

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-07-06 17:18:48 -07:00
Yash Tibrewal 9984f1bd5b
Revert "Revert "Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512)"" (#33601)
Reverts grpc/grpc#33599

Needs to be cherry-picked
2023-07-06 15:13:12 -07:00
Craig Tiller 08f1cc3ba8
[end2end] Explain failures a little better (#33621)
I'd been adding the following stanza regularly to debug flakes/fuzz
failures:

```
  Expect(1, CoreEnd2endTest::MaybePerformAction{[&](bool success) {
           Crash(absl::StrCat(
               "Unexpected completion of client side call: success=",
               success ? "true" : "false", " status=", server_status.ToString(),
               " initial_md=", server_initial_metadata.ToString()));
         }});
```

it was helpful because it indicated why a call batch finished
successfully and helped quickly identify next steps.

It occurred to me however that this would better be done inside of the
framework, and for *all* ops that have outputs, so this PR does just
that. Any time a batch with an op that outputs information finishes
successfully but unexpectedly we now display those outputs in human
readable form in the error message.

Sample output:
```
[ RUN      ] CorpusExamples/FuzzerCorpusTest.RunOneExample/0
RUN TEST: Http2SingleHopTest.SimpleDelayedRequestShort/Chttp2SimpleSslFullstack
E0101 00:00:05.000000000  396633 simple_delayed_request.cc:37]         Create client side call
E0101 00:00:05.000000000  396633 simple_delayed_request.cc:41]         Start initial batch
E0101 00:00:05.000000000  396633 simple_delayed_request.cc:47]         Start server
E0101 00:00:05.000000000  396633 cq_verifier.cc:364]                   Verify tag(101)- for 600000ms
test/core/end2end/cq_verifier.cc:316: Unexpected event: OP_COMPLETE: tag:0x1 OK
with:
  incoming_metadata: {}
  status_on_client: status=4 msg=Deadline Exceeded trailing_metadata={}
checked @ test/core/end2end/tests/simple_delayed_request.cc:51
expected:
  test/core/end2end/tests/simple_delayed_request.cc:50: tag(101) success=true
```
2023-07-06 14:31:13 -07:00
Craig Tiller 1e465cac91
[experiments] Allow deleting experiments without updating rollouts.yaml (#33628) 2023-07-06 14:22:21 -07:00
Craig Tiller 78240d42f1
[experiments] Fix some bugs for no rollout definition (#33626)
Some bugs crept in if there's no rollout defined for an experiment, fix
that up.
2023-07-06 12:11:08 -07:00
Craig Tiller d139c4a014
[metadata] Add an experiment to ensure a unique refcount on parsed slice strings (#33205)
The intuition here is that these strings may end up in the hpack table,
and then unnecessarily extend the lifetime of the read blocks.

Instead, take a copy of these short strings when we need to and allow
the incoming large memory object to be discarded.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 20:57:03 -07:00
Sergii Tkachenko 8101a808ec
[PSM Interop] Set canonical server via canonical-* tag, not commit sha (#33588)
While this is less transparent, it makes it significantly easier to
deliver images with latest security patches.
2023-07-05 17:17:44 -07:00
github-actions[bot] efa96780b0
Automated fix for refs/heads/master (#33610)
PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can
fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS
in .github/workflows/pr-auto-fix.yaml

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 16:51:15 -07:00
Craig Tiller c5bb43ab61
[chttp2] Eliminate grpc_chttp2_stream_map (#33503)
No need for a bespoke type anymore... and a step along the path to
C++ification.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 15:07:31 -07:00
Yash Tibrewal c0889a4f23
[fuzz] Increase call timeout for retry_unref_before_recv (#33608)
Noticed this failing on an internal cl due to deadline exceeded errors.
<!--

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-07-05 14:38:32 -07:00
Craig Tiller 43f67d3640
[fuzzing] Allow hpack fuzzers to supply config (#33242)
<!--

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.

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 14:20:47 -07:00
Craig Tiller 5b880e3342
Revert "Revert "[svc-cfg] Move ServiceConfigChannelArgFilter to promises" (#33508)" (#33510)
This reverts commit a194f145e4.
2023-07-05 13:19:40 -07:00
AJ Heller eb5c4da829
[EventEngine] Only use fork handlers when enabled via an environment variable (#33582)
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-07-05 13:01:51 -07:00
Vignesh Babu 63037989ca
[experiments] Add specification of different default values for different platforms. (#33543)
It introduces the following syntax:

The following would mark the experiment as broken on ios, false on
windows and debug on posix. If a platform is un-specified, the default
for that platform will be set to false. Refer to
test/core/experiments/fixtures/test_experiments_rollout.yaml for
examples which are tested.

- name: experiment_1
   default:
      &nbsp; ios: broken
      &nbsp; windows: false
      &nbsp; posix: debug
      
It also supports the already existing syntax and interprets it as just
specifying one default for all platforms.
    
Supported platform tags: ios, windows, posix
2023-07-05 10:36:37 -07:00
Esun Kim 415f2f9ee3
[Core] Improve HPACK (#33597) 2023-07-05 13:04:31 +09:00
Yash Tibrewal 523d9a2135
Revert "Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512)" (#33599)
Reverts grpc/grpc#33586

Looks like this has to be cherry-picked
2023-07-04 19:25:17 -07:00
Sergii Tkachenko e9446ca20c
[PSM Interop] Bump URL Map canonical server from 1.40.0 to 1.56.0 (#33587)
Similar to https://github.com/grpc/grpc/pull/33542.

Note that there's a ticket to automatically use the one specified in the
--server_image_canonical flag, but for now we just hardcode.

ref b/261911148, b/282106799.
2023-06-30 17:08:59 -07:00
Yash Tibrewal 8d9164fc16
Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512) (#33586)
Along with an experiment this time

<!--

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-06-30 16:27:30 -07:00
Bjorn Svensson ac874c2c83
[core] Add a channel argument to set DSCP on streams (#28322)
This adds a new channel argument `GRPC_ARG_DSCP` which allows users to
create classified gRPC streams with a
Differentiated Services Code Point (DSCP) marking on the IP frames.

The channel argument is handled on both clients and servers, but
currently only on posix based systems.

Fixes #17225

**Background**:
In addition to what is already described is #17225, when gRPC is used in
telco systems there is often a need to classify streams of importance.
There can be multiple hops between two endpoints (e.g. between 2 telecom
operators) and some streams that are more important than others (e.g.
emergency call related or similar). By marking the IP packets using DSCP
the aware routers can make a sound decision of the prioritization.

This PR propose to use DSCP as the configuration value since its common
for both IPv4/IPv6, an alternative would be to use a config name that
includes TOS and Traffic Class.
There might be more needed regarding documentation and end2end testing,
but there I need some advice.

**References**
https://datatracker.ietf.org/doc/html/rfc2474
https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml

<!--

Your pull request will be routed to the following person by default for
triaging.
If you know who should review your pull request, please remove the
mentioning below.

-->

@yashykt
2023-06-30 16:10:21 -07:00
Yash Tibrewal 189acd82dc
[http] Add logging on a new stream (#33584)
<!--

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-06-30 15:54:23 -07:00
Eugene Ostroukhov e0bc8a2c85
[xDS LB] xDS pick first support (#33540) 2023-06-30 14:06:08 -07:00
Vignesh Babu 867973b4c0
[experiments] Update experiments expiry (#33573) 2023-06-29 16:35:47 -07:00