Commit Graph

2826 Commits

Author SHA1 Message Date
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 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
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
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
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
Mark D. Roth 15db5cd16a
[resolvers] use proper %-encoding of authority by default (#33571)
- Change the `ResolverFactory::GetDefaultAuthority()` method to %-encode
the authority by default, so individual resolver impls don't need to
remember to do this.
- Remove the hack in the xds resolver for setting the authority to
everything after the last `/` character.
- Change the `unix`, `unix-abstract`, and `vsock` resolvers to use a
real authority instead of hard-coding to "localhost".
2023-06-29 13:00:03 -07:00
Craig Tiller b28c4048f9
[fuzzing] Fix failures found by max_connection_idle_fuzzer (#33487)
In chttp2: a pending but not yet sent goaway should block incoming
requests just like a sent one (we will sent that data momentarily!)

In the test:
- handle the case of the connection idle timeout happening before the
  request arrives at the server
- disable retries, as these cause the request to get stuck (as we don't
  have an additional server to retry on)

Fix b/287897932

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:51:05 -07:00
Craig Tiller 223117fc85
[fuzzing] Increase deadline to accommodate fuzzing injected delays (#33480)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 15:49:46 +00:00
Craig Tiller a8132669f4
[flake] Raise deadline to eliminate flake in request_with_payload (#33488)
Observed on CI over the weekend (and quite reproducible)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:46:34 -07:00
Craig Tiller 153f4e262c
[fuzzing] Increase deadline to accommodate fuzzing injected delays (#33481) 2023-06-20 08:46:16 -07:00
Craig Tiller 26ae8a1d96
[fuzzing] Fix fuzzer found test bug (#33471)
I think this is the right fix (doesn't seem deadline is related to the
test logic), but please check.
2023-06-16 15:59:12 -07:00
Craig Tiller 23f5810264
[no_logging] Restrict regexes by module name (#33468)
Promised follow-up to #33444
2023-06-16 13:00:31 -07:00
Craig Tiller a5272fa3c3
[test] Disable cq verifier logs for stress test (#33467)
They were tipping this test off into timeout land... but they're proving
useful for non-stress tests, so added an option just for here to
disable.
2023-06-16 09:33:41 -07:00
Craig Tiller ecb7549a99
[end2end] Increase deadline on filtered_metadata test after observed failure (#33466) 2023-06-16 16:19:15 +00:00
Mark D. Roth d8db05a068
[core e2e tests] increase RPC deadline in a couple of tests to avoid flakes (#33456) 2023-06-16 07:34:31 -07:00
Craig Tiller d4be39a6ab
[fuzzing] Use a smaller max delay for writes than run-after (#33455)
We want writes to participate in event re-ordering, but it's unlikely
that we can sustain one byte per 500ms on all tests and keep them
passing (which is the degenerate case right now).

Tune write delays down to 50ms for the moment, though I expect we'll
want to talk about going lower.
2023-06-15 10:44:47 -07:00
Craig Tiller e0ad9e5746
[end2end] Fix simple delayed request (#33450)
omgwtfbbq

This test relies on WAIT_FOR_READY semantics, but we don't do that in
the proxy, so it got assigned the wrong suite.
Fix the suite, fix the flakes.

Also add some handy dandy logging to help figure this stuff out in the
future.
2023-06-15 10:27:28 -07:00
Craig Tiller e5035063e8
[end2end] Further robustness tuning for uds path name selection (#33443)
I can still make the old algorithm break and assign duplicate names on
my machine... make it a little more robust.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-15 10:17:46 -07:00
Craig Tiller cd96210215
[fuzzer] Fix event ordering in retry_max_concurrent_streams (#33454)
Just like #33405
2023-06-15 09:53:07 -07:00
Craig Tiller 133640507b
[end2end] Better logging, and a fix (by increasing timeout) on disappearing_server_test (#33444)
I've had local runs with a 10 second gap between creating the call and
issuing the first batch client side.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-15 08:26:27 -07:00
Craig Tiller 2055cce132
[fuzzing] Fix bug on endpoint shutdown whereby we leave read requests dangling (#33406)
Fix fuzzer found bug b/286716972

Follows up on https://github.com/grpc/grpc/pull/33266 but gets the edge
case right of when there's a read queued before the peer closes - in
that case we weren't waking up the read.
2023-06-14 12:22:44 -07:00
Craig Tiller 51a6857fa1
[end2end] Shard some longer running tests a little more to reduce timeout risk (#33439)
<!--

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-14 09:05:04 -07:00
Craig Tiller 7e6606f5a6
[windows] Add a check for too long path names (#33418)
We should probably cap this so that our customers have a chance of
cloning the repository.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-13 07:41:06 -07:00
Craig Tiller 8e137e524a
[end2end] Reduce likelihood of two tests opening the same UDS socket (#33410) 2023-06-12 15:03:33 -07:00
Craig Tiller 14c63c70af
[fuzzing] Fix recursive mutex acquisition in fuzzing event engine (#33404)
Fixes internal fuzzing bug b/286717107
2023-06-12 16:31:35 +00:00
Craig Tiller 495bcbcb74
[fuzzing] Increase timeout to accomodate slow internal callbacks (#33407)
Fixes b/286780969
2023-06-12 15:46:30 +00:00
Craig Tiller eba6cecdcb
[fuzzing] Remove ambiguity in test case, make fuzzer pass (#33405)
Here the recv message batch 103 was returning end of stream.

Per the reasoning in
https://github.com/grpc/proposal/blob/master/L104-core-ban-recv-with-send-status.md
Sending status is the final thing for a call on the server, so requiring
a recv message to complete when we've sent status is getting into at
best a gray area in out spec.

Add a strict ordering between that recv and the sending of status to
make a more deterministic test.

fixes b/286708835, b/286727273
2023-06-12 15:02:56 +00:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Craig Tiller 82534bab24
[end2end] Shard some longer running tests a little more to reduce timeout risk (#33387)
Also drop a few deadlines so that tests can run faster (where that's
safe)


<!--

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-09 12:17:29 -07:00
Craig Tiller d8f3dab96c
[end2end] Binary & fuzzer per test .cc (#33374)
<!--

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-08 15:38:53 -07:00
Craig Tiller 72da46fa5c
[fuzzing] Handle closing after the final write in fuzzing-event-engine (#33266)
If an endpoint closes it should still report any pending writes.
2023-06-05 12:00:32 -07:00
Craig Tiller f964961ba8
[fuzzing] Tune down max delay (#33345)
This had been intended to be 500ms for the first round, but
inadvertently got bumped up during some last minute investigations.

Tune it back down, let things settle out, and then see whether we want
to increase it or not.

<!--

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-05 17:22:53 +00:00
Craig Tiller 21996c3784
[end2end] Force crash on failure to receive an event (#33260)
When I converted these tests there was an intent to use gtest failures
to see past an unexpected event/no event received error - however that
doesn't work out because our tests rely on the prior events happening.

What we got instead was misattributed failures, folks chasing wild
theories on uninitialized data, dogs and cats living together, mass
hysteria.

Let's just crash and see if it makes diagnosis actually easier.

<!--

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-01 08:33:06 -07:00
Craig Tiller bc70a67e94
[fuzzer] Increase timeouts to accommodate delayed callbacks (#33271)
<!--

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-05-30 11:43:50 -07:00
Craig Tiller ea58add8bf
[end2end] Fix fuzzer found memory leak (#33264)
(this is a bug in the core e2e fuzzer infrastructure)
2023-05-30 10:42:19 -07:00
Craig Tiller e0ba7b720a
[fuzzing] Increase timeout to accommodate delayed callbacks (#33267)
Put enough internal delays into this test and it hits deadline
exceeded... extend the deadline to cover that.

(this is likely to become a common edit over the next few weeks...)
2023-05-30 08:43:15 -07:00
Craig Tiller 7a3e2e45da
[fuzzer] Change core_end2end_test_fuzzer test selection scheme (#33197)
Use an index instead of a string to select tests (and use that index
module total test count to ensure whatever the fuzzer selects we always
run a test).

This will make the fuzzer corpus unstable when the test count changes,
which I think is fine - it'll regenerate.

<!--

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-05-19 11:50:02 -07:00
AJ Heller 4fde5dabf6
[fuzzing] Extract and modernize ChannelArgs fuzzer configuration (#33161)
ChannelArgs fuzz configuration is expected to be used in other fuzzing
targets as well. This PR extracts the common code from the API fuzzer
and converts to use the C++ types.
2023-05-19 10:50:38 -07:00
Vignesh Babu 9c59671936
[testing] Skip more flaky event engine tests (#33160)
Expand the set with more new flaky tests.
2023-05-17 11:35:40 -07:00
Craig Tiller 5fac4ad47b
[fuzzing] Improve OSA distance performance (#33149)
Early out evaluating this function where we can, and use macros to
eliminate function calls in debug builds.

Takes per-example time from 5400ms to 1200ms in debug asan builds.

<!--

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-05-16 21:15:30 -07:00
Mark D. Roth a78001a087
[resolver] remove unused ctor for ServerAddress (#33148)
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-05-16 16:53:01 -07:00
Vignesh Babu 63ecc4ba3e
[testing] Temporarily skip flaky event engine tests. (#33136)
Based on flaky tests reported by dashboard:
https://dashboards.corp.google.com/stubby_team.grpc_flaky_dashboard#1318s66d4f
2023-05-16 13:38:18 -07:00
Craig Tiller 239d3e6857
[fuzzing] Allow core_end2end_test_fuzzer, api_fuzzer to change experiments (#33147)
They were intended to be able to, but since these are currently frozen
across the process it wasn't possible.

Fix that for these fuzzers.
2023-05-16 12:47:55 -07:00
Craig Tiller cd44a2433e
[call] Dont take grpclb_client_stats from the app (#33118)
This metadata doesn't actually encode so passing it through from an app
will force a crash.
<!--

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-05-15 17:16:55 -07:00
Vignesh Babu 915d7c4a70
[Fuzzing] Bound RunAfter duration in fuzzing event engine (#33128)
Bounds duration to 1 year. Fixes b/258949216
2023-05-15 17:12:14 -07:00