-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
EF 6.1.3 Crashing IIS Express with FatalExecutionEngineError in ASP.Net Core MVC #7812
Comments
Yep, seeing this as well. Super annoying. It seems to be related to IIS Express - is there a git for that? |
@DamianEdwards where do IIS Express issues go? |
Best place is likely at https://github.com/aspnet/AspNetCoreModule |
@danmosemsft Why do you suspect this is an IIS Express issue? We use the ASP.NET Core Module to host |
@shirhatti I actually think this is a Visual Studio debugger issue. We have been able to work around the issue in two ways:
Any thoughts on a better place to post this? |
@gregg-miskelly Which is the debugger repo where this issue can be moved to? |
@gkhanna79 This issue should likely stay here as I don't really remember a 'FatalExecutionEngineError' while debugging issue ever actually being a problem with the debugger. |
@adam8797 @shirhatti Do you have a repro or a crash dump for the FatalExecutionEngineError? |
@gkhanna79 I can't share the repo as its private to my company, but I can answer questions about it if you have any. If you've got instructions on how to produce a dump file, I can do so tomorrow. |
It will be great if you can try to create a reduced repro. That said, can you use https://blogs.msdn.microsoft.com/cobold/2010/03/01/collecting-crash-dumps/ to see if you can generate the crash dumps? Do note that the crash dump could contain name of your app, filenames and paths, etc, if you are concerned about PII. |
Sounds fine to me. I'll see what I can throw together. |
Likewise. I'm doing some work this evening and will switch back to VS running to see if I can get a crash dump. |
Unfortunately, none of the techniques in that post will work as your issue only repros while the app is already being debugged by another debugger. Noah may have some suggestions... |
ProcDump and Windbg can both handle the job, we just need to use them slightly differently than that page describes. Instructions for ProcDump:
It should look like this:
Then just send us that dump and we can take a peak under the hood. |
I've got the dump files, log files, and an example project. https://github.com/adam8797/coreclr_Issue_10717 But it was very strange. I was not able to File -> New Project and make it crash. Instead I had to take my application, and strip it down to basically nothing. I think it has something to do with my model classes. If I removed all of my models, I could not make it crash. Plus, I noticed that when it crashes, it always does so right before this line in the log file.
If I see this line printed, I know its going to load correctly. Otherwise, it crashes right before this. |
@adam8797 I wonder if this is an issue with ComplexType or an abstract base class. Those are the two similarities between the models in this github project and what we use. Maybe take them off and see if you can repo? |
If someone from the CLR team wants to take a look, here are some pointers. The dump to look at is the ManagerReports file. Look at thread 18 in windbg (or 19 in VS). Here is the exception record from the dump:
ContextRecord : Stack:
|
This is use-after-free bug fixed in dotnet/coreclr#6571 (comment). It will only crash with ETW managed memory tracing turned on, and program containing (generic) types with very long names. @gregg-miskelly Does the debugger turn on the ETW managed memory tracing by default? |
This crash is actually on .NET Framework, not on .NET Core. @swgillespie @adityamandaleeka Could you please open an internal TFS bug to get the fix for this ported to .NET Framework vNext? |
@jkotas we turn on some ETW events, but I am not aware of anything in Visual Studio turning on anything related to managed memory. I can ask the profiler team if they know of anything. |
I am having the same issue, similar stack. Back in March, we changed from "Any CPU" to "x64" and we didn't experience the Fatal Exception. Yesterday, we switched to "x86" and the problem came back. I switched from running IIS Express to running the Exe and haven't had the problem. If you need any additional crash dumps, I most likely could produce one. |
This is crash in full .NET Framework. I have opened .NET Framework on it (DevDiv TFS bug 425084). It will be fixed one in future .NET Framework updates. The crash is triggered by turned on ETW GC memory tracing. To workaround it, you can try turning off ETW GC memory tracing. |
@jkotas Thanks for your help with this. Any documentation on how to turn off ETW GC memory tracing in VS 2017? |
@adam8797 you can try this:
|
I have tried this workaround but it didnt work for me. Any other suggestions? |
We managed to work around this by turning off JavaScript Debugging. |
No idea how having JavaScript debugging on could possibly effect this, but I am glad you have something. |
@gregg-miskelly it was the Javascript debugging in VS that I had to turn off. I assume that it is the same issue that other debuggers were experiencing. |
Same problem. ASP.NET Core 2.0 target to NET 4.6.2 with EF 6.1.3 disabling diag tool while debugging seems a workaround |
Turning off ETW GC memory tracing didn't work for me, but taking the advice of the people that said it was an x86 vs x64 issue I forced my IIS Express to run in 64 bit mode and it seems to have worked around the issue for me. To do this: |
I have this problem in source line .Net 4.6.1 and 4.7.2 |
Any fix to this? Seeing the problem in 4.7.2 using Microsoft.AspNetCore.SignalR 1.0.3 and Microsoft.EntityFrameworkCore 2.1.4. IIS express is running in 64bit It usually dies at following, but it can be random: Specifically its an issue running without a project file (webforms - open website). I'd say just use project file, but then it effectively creates the overlying problem again, which is being forced to stop/start the app vs. dynamic recompile working correctly. Which if you are doing heavy .cs file editing, it is very frustrating to constantly start/stop. |
@jkotas ^ |
@OpenSpacesAndPlaces 4.7.2 would have a fix for this issue. So I doubt that the problem you are running into is related. |
I've yet to run into anything that fixes the problem for me. |
A FatalExecutionEngineError means that something in your process has corrupted the runtime. I don't know what that thing is, but it is very unlikely to be related to this bug. If you can reproduce the problem with a native debugger attached, you could stop on that access violation (if you use VS, it will stop on native access violation exceptions by default) and maybe that will give you some ideas as to what is going wrong. If that address is within clr.dll you could try reporting this issue either through a new github issue here, or from Help->Send Feedback->Report a problem in VS. If you can't reproduce the issue with a native debugger attached, that will make it much harder for the CLR team to understand. You could still save a .dmp file when stopped at the Managed Debugging Assistant so that you could find out something. If you debug the .dmp with with the interop debugging you could at the very least you open up the disassembly window and type in the address from the MDA text to see what function the exception is in. |
The native error is: The dmp error is:
|
I am not on the CLR team. But I would suggest opening that .dmp in VS so you can grab a call stack and openning a new issue with that (unless you already see an issue with a similar stack). I would hang onto the .dmp as someone on the CLR team may contact you to obtain it. |
Oddly this just stopped happening for my Team and I as of the latest Windows update. (in the past day). |
I (and a few other users) have been experiencing a problem when using EF 6.1.3 and IIS Express. For some reason, sites will crash very inconsistently. Some times, it works, other times it does not.
For the sake of not being redundant, I'll link to a StackOverflow question I put up on the subject, where I go into more detail. Other users are commenting that they have the exact same problem.
https://stackoverflow.com/questions/42772599
I posted this exact issue to the EntityFramework6 Repository and they recommended that I come here looking for ideas.
The text was updated successfully, but these errors were encountered: