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
FatalExecutionEngineException when Seq.distinct is called on seq of KeyValuePair #536
Comments
Nice find. I can repro on my machine. |
Me too, result assembly passes PEVerify, looks like a JIT bug to me
|
We raised this to the JIT team, they acknowledged it's a bug and are looking into it. |
Awesome! Thanks! |
@latkin if this bug truly a JIT bug, then it's quite a showstopper bug. I can reproduce and verify it on VS2015 RTM: I hope it should be fixed soon. Any update/news when we will have the fix for this? And what will the update be? I'm quite curious, as AFAIK it's closely related to .NET runtime or even infrastructure. |
I have a fix for this and verified that the repro case works. I am currently further testing this. |
@hrichardlee or anyone else who comes across this in the near-term -- please file a formal ticket at https://connect.microsoft.com/VisualStudio for this, too, marking it as a JIT bug. That will greatly increase the chances that this will be patched in the very near term, rather than rolled out with whatever the next scheduled release is (probably ~months). Connect leaves the paper trail needed in order to get a patch funded/supported, GitHub doesn't, unfortunately. |
Okay, I've posted it here: https://connect.microsoft.com/VisualStudio/feedback/details/1586892 |
I am trying to understand the severity and scenario impact of this issue. It would be of great help. |
I believe the scenario is as follows:
I think this is reasonably severe. Given that .NET 4.6 is an in-place update, this means that anyone who uses Seq.distinct on a seq of KeyValuePair cannot upgrade to .NET 4.6 or VS 2015 without either retargeting their projects or waiting for this bug to get fixed. |
Let me try to rephrase the impact one more time 😄 All current F# developers that have Seq.distinct on a Seq of KeyValuePair anywhere in their code must either control the environment that their code is deployed into so that .NET 4.6 is not installed OR they must immediately retarget all of their projects and immediately redeploy these projects. |
This F# issue is different from issue#1296. This issue is a case of a Virtual Stub Dispatch (VSD) call that requires runtime lookup for resolution being marked with ".tail" prefix. Further, this call cannot be dispatched as fast tail call (i.e. epilog+jmp). As a result, RyuJIT makes the call using TailCall helper. Since it is a VSD call CLR calling convention requires passing a secret parameter in R11 register - which is callee trashable. TailCall helper doesn't preserve R11 and hence the AV. |
So do you already have a fix? |
A fix to this issue was checked-in to dotnet/coreclr PR #1302. We recognize the urgency of this issue and working to release a fix for desktop users soon. |
Sorry to go off topic but i have to say this experience as a user is tremendous. Clearly acknowledging a problem, linking it through the work, allowing it to be tracked and code is merged within days to resolve the issue. This is the total antithesis of Microsoft Connect where we were collectively told to go pound sand anytime a bug was found. I'm immensely happy this is the "new Microsoft" |
yes big kudos for doing this in the open. |
Not sure if it's related, but I get the same type of exception occasionally creating values of type float option via reflection. See bug report and reproduction here: #566 |
FYI a patch has been released for .NET 4.6 which fixes this (and some other RyuJIT issues) https://support.microsoft.com/en-us/kb/3086251. It should have arrived via Windows Update this week. |
@latkin, actually it is different (cumulative) KB for each operating system which bundles KB3086251. For example on Windows 10 it is KB3081436 and it was shipped on 11th August through Windows Update. On Vista, it is KB3083186 bundling it and so on. Search for phrase "Security update file names" on https://support.microsoft.com/en-us/kb/3086251 to find KB id for your OS. 😉 |
Thanks! |
Environment:
Repro steps:
Expected result: Program runs and finishes successfully
Actual result: FatalExecutionEngineError was detected.
Severity: Seems pretty severe--existing F# code that currently targets F# 3.1 and .NET 4.5.1 (or 4.5 or 4.5.2) that currently works will not work when run on a machine that has .NET 4.6RC installed.
The text was updated successfully, but these errors were encountered: