-
Notifications
You must be signed in to change notification settings - Fork 524
MemoryPoolBlock.Dispose can throw and ODE during server shutdown leading to an error log from the Socket Transport #2638
Comments
@seanmars What version of the dotnet runtime and Kestrel were you running when you saw this error? Are you able to repro this consistently? |
@halter73 the
|
Hi, I found the point that caused the problem, It's the But i'm sure that not happened in version 2.0 try
{
BuildWebHost(args).Build().Run();
}
catch (System.Exception ex)
{
throw;
}
finally
{
NLog.LogManager.Shutdown();
} |
@seanmars could you please share a simple app that reproduces this problem on GitHub? Thanks. |
I have the same (or a similar) issue: it prints a scary red error, but the exception is caught internally and doesn't actually hurt. It occurs ~90% of the time. dotnet --info
To reproduce, run Koala.Tests, it is a console exe. Example run
It seems to happen when multiple instances of Kestrel are running in parallel. Is this even a supported scenario? |
@muratg No problem, and i found it's doesn't matter the https://github.com/seanmars/DotNetCoreObjectDisposedException |
I just got that exception as well, although with a slightly different stack trace (it includes the async state machine, see below) when I CTRL+C'ed my application. I'm running on Mono 5.4.1.6 on Linux. I'm not using any logger besides the default console logger. By the time I stopped the app, there was one active SignalR connection via WebSocket. The exception message (including the
|
FYI: getting infrequent reports of this error in our production. In some instances the call stack like in #2254, in others:
|
@muratg Should we move this to the 2.1.3 milestone? I don't think there's too much to investigate. Since so many customers are reporting seeing this, we should backport https://github.com/aspnet/Common/pull/344/files#diff-708aafde37872ea09e25cfadd4d95f0eL56. Merging #2619 and backporting #2646 should also fix this issue, but I would make all 3 changes to be safe. |
@halter73 to take this to shiproom |
This is approved for 2.1.3. |
MemoryPoolBlock.Dispose() can throw and ODE (ironic I know) during server shutdown leading to an error log from the Socket Transport. Maybe we should to backport https://github.com/aspnet/Common/pull/344/files#diff-708aafde37872ea09e25cfadd4d95f0eL56
This was originally reported by @seanmars in #2254 (comment):
The text was updated successfully, but these errors were encountered: