[IIS express known issue] When using IISExpress with latest v7 Polly, app pool restarts cause IISExpress to crash
See original GitHub issueSummary:
To preface, this may be something in our specific config/usage of Polly - however I wanted to file in case anyone else is encountering this weirdness. We use IISExpress locally to do development on our site. After updating from Polly v6 to v7 - whenever we re-build the solution and refresh (and IISExpress shuts down the app, and spins it back up), IISExpress will crash. The console does not say anything is wrong, but the Windows Event log has:
Application: iisexpress.exe Framework Version: v4.0.30319 Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FFDB2DCA4BF (00007FFDB2C90000) with exit code 80131506.
–
Faulting application name: iisexpress.exe, version: 10.0.14358.1000, time stamp: 0x574fb9e6 Faulting module name: clr.dll, version: 4.7.3362.0, time stamp: 0x5c2fcfd4 Exception code: 0xc0000005 Fault offset: 0x000000000013a4bf Faulting process id: 0x8a5c8 Faulting application start time: 0x01d4e8e42d82d2c4 Faulting application path: C:\Program Files\IIS Express\iisexpress.exe Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Report Id: 6a06573f-4e42-4a3f-88fb-71a370c3de53 Faulting package full name: Faulting package-relative application ID:
–
Downgrading back to v6 solves this problem for me, every time. So something changed from v6 to v7 that IISExpress (or our specific site config/build) doesn’t like.
Expected behavior:
For IISExpress to not crash with Polly v7.
Actual behaviour:
IISExpress crashes hard upon upgrade to Polly v7.
Steps / Code to reproduce the problem:
Best is a complete example or failing unit test. It is always useful to see:
- code of any policy declarations,
- code of calls to
.Execute/AndCapture/Async(...)
We only actually use Polly in a handful of places in our codebase, here’s some examples:
_retryPolicy = Policy.Handle<Exception>().WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(i + 1), (exception, timeSpan) =>
{
Logger.Warn("Retrying Query", new { exception = exception.ToString(), timeSpan = timeSpan.ToString() });
});
var output = Policy
.Handle<TimeoutException>()
.Or<RedisServerException>()
.Or<RedisException>()
.Or<AggregateException>(
ae => ae.InnerExceptions.Any(ie => ie is TimeoutException || ie is RedisServerException ||
ie is RedisException));
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
@nicholashead Awesome! Noted to the Microsoft teams. Thanks for your collaboration in pin-pointing!
Closing as there is nothing further to do on the Polly side on this issue. However, I’m tracking https://github.com/dotnet/standard/issues/873 and will comment again here when that resolves.