-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Canceled GCS Multipart upload leaks HTTP2 streams and leads to REFUSED_STREAM errors #1211
Comments
This is likely related to #753, as well. |
Another related issues: golang/go#20985. |
Thanks for the reproduction @KJTsanaktsidis. It's been very helpful. Meanwhile, here's another related issue: golang/go#27208. |
Yup - golang/go#27208 is exactly it! I tried my reproduction using So I think this isn't a bug in google-cloud-go at all, and should go away on go 1.12? |
Well done! Provided the patch lands in Go 1.12, yes, the problem should go away. I'll ping the Go issue. |
Awesome - thanks heaps for your help in joining these dots! |
Since this is an issue outside this repo, I'm going to close it. Thanks again for all your help getting to the bottom of this. |
Client
Google Cloud Storage
Describe Your Environment
SDK is used in Hashicorp Vault running on Ubuntu 18.04, on GCE
Expected Behavior
When canceling a context passed to
ObjectHandle.NewWriter(ctx)
, all resources associated with the request should be cleaned up and it won't affect subsequent operationsActual Behavior
I have a minimal reproduction test case here: https://github.com/KJTsanaktsidis/refused_stream_repro
The reproduction tries to upload lots of files to GCS with
ObjectHandle.NewWriter(ctx)
, and cancels some of the contexts at random times. Eventually, after running for a few minutes, all uploads start returning the following error:I used a packet capture to debug the communication between Vault and GCS, and I found that the SDK would often
/upload/storage/v1/b/vaultgcs_backend_us1_staging/o?alt=json&prettyPrint=false&projection=full&uploadType=multipart
So, eventually, the GCS server starts sending REFUSED_STREAM errors back to the client when any new upload attempt is made, because the number of forgotten-about upload streams has exceeded the servers HTTP2 MAX_CONCURRENT_STREAM value of 100.
This issue seems to be the cause of hashicorp/vault#5419
The text was updated successfully, but these errors were encountered: