Closed
Description
Describe the bug
After upgrading to ASP.NET Core 2.2, we frequently face this error and our website gets restarted. This happens once an hour or so. We had to target 2.1 again to fix this issue.
Here are the errors from event viewer (in the order they have occurred):
Application: dotnet.exe
CoreCLR Version: 4.6.27110.4
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at System.IO.FileStream.FileStreamCompletionSource.CompleteCallback(UInt64 packedResult)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Faulting application name: dotnet.exe, version: 2.2.27110.6, time stamp: 0x5be769ed
Faulting module name: KERNELBASE.dll, version: 10.0.14393.2457, time stamp: 0x5b7e2adb
Exception code: 0xe0434352
Fault offset: 0x0000000000033c58
Faulting process id: 0x34374
Faulting application start time: 0x01d48cab8dc6d688
Faulting application path: C:\Program Files\dotnet\dotnet.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: aaeaddc7-02d9-45ce-9f29-318127ca0951
Faulting package full name:
Faulting package-relative application ID:
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: C:\Program Files\dotnet\dotnet.exe
P2: 2.2.27110.6
P3: 5be769ed
P4: System.Private.CoreLib
P5: 4.6.27110.4
P6: 5be75665
P7: 27fd
P8: b
P9: System.ObjectDisposedException
P10:
Attached files:
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_C__Program Files_55e13f92ac2eada5e8dd2daa7dea78fd1e8d5d_0e1906bf_ade641d7
Analysis symbol:
Rechecking for solution: 0
Report Id: aaeaddc7-02d9-45ce-9f29-318127ca0951
Report Status: 4
Hashed bucket:
Fault bucket 1396378374383491433, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: C:\Program Files\dotnet\dotnet.exe
P2: 2.2.27110.6
P3: 5be769ed
P4: System.Private.CoreLib
P5: 4.6.27110.4
P6: 5be75665
P7: 27fd
P8: b
P9: System.ObjectDisposedException
P10:
Attached files:
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_C__Program Files_55e13f92ac2eada5e8dd2daa7dea78fd1e8d5d_0e1906bf_69a648dc
Analysis symbol:
Rechecking for solution: 0
Report Id: aaeaddc7-02d9-45ce-9f29-318127ca0951
Report Status: 0
Hashed bucket: 0fdfa957dcca13d25360eebbb12a5969
To Reproduce
Steps to reproduce the behavior:
Use SDK v2.2.100 with IIS on Windows Server 2016
Additional context
Add any other context about the problem here.
Include the output of dotnet --info
Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]