-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydeephaven clients can get a RST_STREAM with CANCELLED error in some cases #5996
Comments
The skipped tests depends on a fix for #5996
I think we may want to consider two things here:
|
…ef (#6155) This is related to investigation in #5996. Swap the order of these tests to reduce the probability of the py-grpc client from claiming the rpc failed. One test was not testing the proper shared ticket; adjusted for correctness to test intended feature. ObjectService change is to adopt the proper ExportObject dependency pattern. Otherwise correctness requires analysis/knowledge that the list of objects are all brand new server side exports.
The original fix for this seems to break our grpc-web adapter, something to do with trailers being sent as a data frame instead of being flushed and closed with trailers. It appears to be on the server side though, not the client - we should ensure that trailers are being correctly written to other kinds of clients too. We've also discussed adding tests with TLS - ideally we add another gradle docker flag so that all client tests can validate that they work correctly. JS API tests are somewhat more important to test this way, since we change transport implementations. |
…ven#6401) This is a Jetty-specific workaround to avoid irritating the Python gRPC client into failing calls that had already half-closed successfully. See deephaven#6400 Fixes deephaven#5996
Reopening, for two reasons:
Clients are not impacted by this, but it is very noisy in the server log for clients that specify a |
…eephaven#6478) Changes from deephaven#6420 were supposed to be reverted in deephaven#6424, but apparently git interpreted the branch's relationship with main differently than I did. This patch reapplies deephaven#6401, with an additional change to avoid noisy stack traces from grpc clients that set `grpc-timeout`. At this time, Deephaven doesn't handle timeouts nor do any default clients set timeouts, so the impact here should be minimal. Fixes deephaven#5996 See deephaven#6400
This is a Jetty-specific workaround to avoid irritating the Python gRPC client into failing calls that had already half-closed successfully. Since we're now using ServletOutputStream.close() in place of AsyncContext.complete(), we need to apply the same wrapping for trailers to close() - that is, when the stream is clsoed, we can't rely on the servlet container sending our trailers because grpc-web trailers are actually a DATA frame which must be explicitly written. See #6400 Fixes #5996 Reapplies #6401 Backport #6424 Backport #6478
… gRPC client (deephaven#6420) This reverts commit 6ada0cb. See deephaven#6401 See deephaven#6400 See deephaven#5996
…eephaven#6478) Changes from deephaven#6420 were supposed to be reverted in deephaven#6424, but apparently git interpreted the branch's relationship with main differently than I did. This patch reapplies deephaven#6401, with an additional change to avoid noisy stack traces from grpc clients that set `grpc-timeout`. At this time, Deephaven doesn't handle timeouts nor do any default clients set timeouts, so the impact here should be minimal. Fixes deephaven#5996 See deephaven#6400
…eephaven#6478) Changes from deephaven#6420 were supposed to be reverted in deephaven#6424, but apparently git interpreted the branch's relationship with main differently than I did. This patch reapplies deephaven#6401, with an additional change to avoid noisy stack traces from grpc clients that set `grpc-timeout`. At this time, Deephaven doesn't handle timeouts nor do any default clients set timeouts, so the impact here should be minimal. Fixes deephaven#5996 See deephaven#6400
Discovered during #5990
Note that this
8
error code is not a grpc status 8: Resource Exhausted, but an h2 RST_STREAM error code 8: Cancel.It turns out that the Jetty server implementation is reading
AsyncContext.complete()
as not a call to end the stream as being finished correctly, but to send the CANCEL error code to the client. Likewise, the python client is the only gRPC client we're aware of that reads RST_STREAMs that arrive after the final end stream message and allow it to change the meaning of that last message.Changing the implementation of gwt-servlet upstream does not cause any integration test failures in grpc-java, but that's not a surprise since only the python client sees this bug anyway. Our initial "fix" does however cause tomcat to start having this same bug, so that won't be an acceptable solution. We're going to open tickets with grpc-java, jetty, and tomcat, and hopefully get the servlet container providers on the same page before making a change to grpc-java itself.
In the meantime, for some cases of this, we could wrap python client calls with try/except and handle the CANCEL case as success. We can also investigate changing the behavior of specific grpc bidi streams so that this issue cannot happen, by forcing the client to half-close first.
The text was updated successfully, but these errors were encountered: