-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
SslStream object disposed exception #28171
Comments
From @halter73 on Wednesday, 12 December 2018 20:16:44
The ODE seems to have happened during TLS renegotiation. Kestrel ensures that it's done with its SslStreams before disposing them meaning that any calls to AuthenticateAsServerAsync(), ReadAsync(), WriteAsync(), etc... have completed. @timmydo Do you have any evidence that the SslStream belongs to Kestrel? Kestrel doesn't initiate a renegotiations itself, and I don't know why a client would do so either. I suspect that HttpClient might own the SslStream. Either way, we should probably move this issue to dotnet/corefx. |
How often does it happen? |
this seems to happen on different machines. looks like it's happening from an http client request because the program isn't listening for connections (it's just processing things in a queue--so not kestrel related like the original issue). maybe a handful of times a day. if there is a way you could recommend I get more info that would be great. if it's not easy, I can just close this. I agree the stack trace doesn't look that helpful |
I don't know about a way forward without additional info or simple repro. Closing. |
@karelz This issue occurs regularly (every minute) if there is a lot of traffic. I tried ramping up some to this new environment today and had to take it down due to crashes. The stack trace usually appears at the end of the logs, so I would suspect that it's fatal whatever it is. I will try to narrow down which dependency is at fault, but like I said above, I suspect it's related to the http client. Do you have any ideas on how I could get more info? |
Could this be related to #21330 ? |
Or #28073 and maybe fixed with dotnet/corefx#34089 |
I facing the same problem and due that the application is closing.
Aborted (core dumped) |
3.0 daily builds fixed it for me |
@timmydo, where can i download this update? |
Daily builds of .NET Core are here: https://github.com/dotnet/core/blob/master/daily-builds.md |
Port fix from PR dotnet#34089 (.NET Core 3.0) to release/2.1 LTS branch. Fixes #34033
Re-opening for release/2.1 LTS port |
Port fix from PR dotnet#34089 (.NET Core 3.0) to release/2.1 LTS branch. Fixes #34033
Fix for release/2.1 checked in with PR dotnet/corefx#39456 |
When the fix will be released in .Net Core 2.2.(7?) officially? I see that it is already merged with the release branch several weeks ago. |
The fix will ship with the next 2.2.x release which is 2.2.7. And that will be sometime next month. It will also ship with the next 2.1.x release which is 2.1.13. That should be shipped the same time as 2.2.x. |
This doesn't seem to be fixed in .NET Core 3.0.0-preview9. Should I expect it to have been fixed in that release, or would it only appear in rc1 or the full release? (though mine is from an HttpClient)
|
.NET Core 3.0 released today. I suggest you try out the official release. If you still have a repro using .NET Core 3.0 and see these |
Will do. Time to failure was about 9 days, so it may not happen again soon, but wanted to make sure to report it, since I jumped to 3.0 just for this fix. |
We're getting the same issue on 3.0.0. |
@kyschouv looks like the problem has multiple root causes (or similar symptoms)) and you've hit another one. Please file a new issue with description, call stacks, repro attempts info, etc., so that we can chase it down. |
We have the same issue in high-load stress environment (release v3.0.0):
|
We have also been receiving this in our production environment, intermittently over the past few weeks. After reading through this issue, plus a couple of linked issues am able to repro consistently. In short, if I start uploading a large-ish file, one that allows me enough time to close the browser before the file upload completes, I get this error. System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.ObjectDisposedException: Cannot access a disposed object. |
This issue is closed already. Where's the final fix? |
What browser are you using? How is .NET Core involved with your browser exactly? |
We definitely fixed the original issue where an However, it appears based on these reports above that there is still an Keep in mind that the top-level exception, TaskCanceledException is probably correct. Something caused the HttpClient to cancel the request, most likely due to the HttpClient.Timeout occurring. However, there is potentially a bug still in .NET Core where the cancellation logic and the closing of the SslStream and TCP connections is throwing these inner exceptions that are surfacing in the call stack. Those exceptions can probably be trapped in a better way since the So, to help isolate this particular issue, please open a new issue and post repro instructions so we can diagnose. Thanks! |
From @timmydo on Saturday, 08 December 2018 21:55:49
I'm not sure if this is the right place to report this, but I'm seeing this exception occasionally:
kubernetes docker pod uname -a:
Linux platform-prod-577cf48b4b-wrg7x 4.15.0-1030-azure dotnet/corefx#31~16.04.1-Ubuntu SMP Tue Oct 30
context:
running kestrel behind nginx on linux in docker image based on dotnet:2.1-aspnetcore-runtime
pod error code:
let me know if there is more info I could provide. thanks.
Copied from original issue: aspnet/KestrelHttpServer#3111
The text was updated successfully, but these errors were encountered: