.NET 4.6 Optimizer Bug Causes Methods To Get Wrong Parameters
tobiasly writes: A serious bug in the just-released .NET 4.6 runtime causes the JIT compiler to generate incorrectly-optimized code which results in methods getting called with different parameters than what were passed in. Nick Craver of Stack Exchange has an excellent write-up of the technical details and temporary workarounds; Microsoft has acknowledged the problem and submitted an as-yet unreleased patch.
This problem is compounded by Microsoft's policy of replacing the existing .NET runtime, as opposed to the side-by-side runtimes which were possible until .NET 2.0. This means that even if your project targets .NET 4.5, it will get the 4.6 runtime if it was installed on that machine. Since it's not possible to install the just-released Visual Studio 2015 without .NET 4.6, this means developers must make the difficult choice between using the latest tools or risking crippling bugs such as this one.
This problem is compounded by Microsoft's policy of replacing the existing .NET runtime, as opposed to the side-by-side runtimes which were possible until .NET 2.0. This means that even if your project targets .NET 4.5, it will get the 4.6 runtime if it was installed on that machine. Since it's not possible to install the just-released Visual Studio 2015 without .NET 4.6, this means developers must make the difficult choice between using the latest tools or risking crippling bugs such as this one.
Since it's not possible to install the just-released Visual Studio 2015 without .NET 4.6, this means developers must make the difficult choice between using the latest tools or risking crippling bugs such as this one.
If you're a dev, you shouldn't be chasing versions. Find a stable version, stick with it through your project. SE already has enough of that "stuff changing out from under me" feel without adding to the issue.
Wait until the .1 release of Windows 10 unless you have to be on the bleeding edge. Despite the promises made by Microsoft, it'll have bugs, cause problems and third party support will be lagging.
Harrison's Postulate - "For every action there is an equal and opposite criticism"
On the other hand if you fall behind current dev tools, you miss out on the potential for a lot of community support, risk being crippled by the bugs that remain in the older system that are fixed the new, and hamstring your ability to work as effectively as you might because you cannot use newer tooling/frameworks to help with development...
Yes SE has a lot of stuff changing, it always has and always will. But cringing from the pain will not help, SE is not finding any kind of safe plateau (because there are none). It is moving ever forward at a reasonable pace, using nettles as handholds where you must grasp them firmly as you ascend, living with the brief pain to move forward.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
> this means developers must make the difficult choice between using the latest tools or risking crippling bugs such as this one.
Not so difficult. Just don't use the latest and not-so-greatest stuff.
Que 1000 "waaaaah, I wanna to use teh new shiney!!11!!" replies....
Lots of people care, including myself. I develop using .NET and this is very useful information for me. This is the exact kind of information I would expect out of Slashdot: tech information that helps me in my tech-oriented job.
.NET is in no way "dead", despite your obvious hatred for it.
Why is the story of Slashdot being sold not on SLASHDOT!?!?!?
You must be new here. Slashdot editors will only find out about it tomorrow when it's old news.
Maybe CmdrTaco will buy slashdot back...
The Company, however, has not successfully leveraged the Slashdot user base to further Dice's digital recruitment business
Great news, everybody! We win!
You must not be a very good SysAdmin if you can only managed 2 days of uptime. I have Windows 7, 8, and 8.1 boxes with weeks of uptimes. In fact, the only downtimes they've had is to reboot to apply the updates. I do have a Windows 7 box that hasn't had an update (it's off network, attached to some equipment) that hasn't been rebooted in about 7 months. That outage was due to the power going out. .NET has typically been a pretty stable product as well. I believe it to be the best framework out there for development. Nothing else, in my opinion, competes with the completeness and applicability that the framework provides. I think you're just trolling.
Well, ignoring the rest of your comment, this is actually worth highlighting.
Good riddance, dice.
Sorry we couldn't help you leverage your synergies.
Actually, we're not sorry at all.
Lost at C:>. Found at C.
Showstopper bug on a much awaited release! Ah, the fruits of jumping on the open source bandwagon...
As much as I love Microsoft .Net and the tools. We all know never to use the latest/greatest from Microsoft. I'm using VS.2013 until the first service pack or two are released.
I guess the expected tsunami of techies eager for SJW articles never arrived.
He isn't the only one to hate it, so do I.
Unfortunately it's sometimes the right tool for the job.
That's a shame. (Really.) Dice were relatively benign overlords compared to some others who might have been even more aggressive in their attempts to monetize us.
Not that I particularly like Dice. But Slashdot is still here, mostly intact, and still the bastion of free speech that no one else wants to be. That ought to count for something.
"Ha-ha!"
-- Nelson
I do not fail; I succeed at finding out what does not work.
I heard that slashdot was sold to 9gag...
Can I use my HOSTS file to redirect the original parameters to the called method? I understand this will be very efficient due to HOSTS being evaluated in the kernel.
DO NOT BREAK USER SPACE.
This bug is in the JIT optimizer of the 4.6 framework. For apps you are developing, it's absolutely no problem, you just go into the compiler settings and uncheck the 'optimize' setting.
The problem though, is that the 4.6 framework is an in-place replacement for the 4.5 framework, which was an in-place replacement for the 4.0 framework. And the JIT optimizer is on by default. So if you install the 4.6 framework, it could potentially introduce this bug into any application developed targeting the 4.0, 4.5, or 4.6 framework that is already distributed.
Luckily, it appears as though the issue is a combination of a nullable int that has a bug in the boxing/unboxing of it's operator when calling the .hasValue method. So the actual number of places where this will actually pop up is hopefully quite limited.
That said, MS better get this patch deployed ASAP. Or if you are in a critical hurry, the correction has already been committed to the .Net Git repo, so you can brave a build from that.
-Rick
"Most people in the U.S. wouldn't know they live in a tyrannical state if it walked up and grabbed their junk." - MyFirs
See subject & read the article: IF using .NET 4.6 don't turn on optimizations (yet) until they patch it.
APK
P.S.=> That's a "temporary work-around" for it - hosts have nothing to do with this (afaik @ least - & I suspect you're actually just trying to be a trolling pest here, one I've dusted badly on hosts before, & this is some insane butthurt form of effete "retaliation" on YOUR part - utterly useless)... apk
I guess the expected tsunami of techies eager for SJW articles never arrived
And yet here you are bringing it up. Funny how the people whining loudest about "SJW" and whatnot are tautologically the ones who make the biggest fuss about it.
How about you stick to the topic of the optimizer bug in .NET and not drag your hatred of bogeymen into it?
SJW n. One who posts facts.
this means developers must make the difficult choice between using the latest tools or risking crippling bugs such as this one.
I don't know much about this but isn't it possible to just reduce the optimization level to avoid this behaviour? Sounds to me just skimming things that this the result of overly aggressive optimization. I know that's not a long term fix but is it a short term option until MS rolls out the patch?
Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
Yeah, imagine that. A bunch of entitled little shits upset that they're being shown articles that their shit indeed does stink.
Non impediti ratione cogitationus.
Hey, wether you visit to read, or you visit to start a Bro-splainer flamewar, it still counts as an ad impression.
Don't blame me, I voted for Baltar.
I check the Disable Advertising box. Therefore, in order to contribute ad impressions, I must start flame wars.
You must not be a very good SysAdmin if you can only managed 2 days of uptime
Why blame him for the problems Microsoft created? Yes, a Windows system will survive a week or more if you're not doing anything. If you actually work for a living, then averaging one crash per day is pretty much average. We have a script that does:
systeminfo | find "System Boot Time"
(Aside: as usual Microsoft products are extremely slow. That simply command takes several minutes to run even on an new i7. Microsoft is simply just slow.) On every system every hour so I know exactly how often Microsoft systems crash. For our sales people, they can usually go a week without rebooting. For most of our developers, it's around a day. They use both IntelliJ and Eclipse for our project so they hammer their systems. For our .NET developers that run VisualStudio, rebooting three times a day isn't that uncommon. Windows is not stable if you actually use it. Yes, your grandmother might not have to reboot every day, but technical people do.
Yeah, neckbeard dinosaurs don't even grasp the irony when they try to pretend .NET/Windows is "dead". They're so cute.
Fuck Beta, fuck Dice, godd riddence.
Where's that Taco man?
Apparently we've not been successfully leveraged.
That's unfortunate.
Yep. Shit has officially hit the fan. I think we're in for a bumpy ride.
.
Some development tools are more stable than others from one version to the next, others are less stable. Managing the change then requires the developer to put into place the process for determining how to upgrade software tools in a manner consistent with the best outcome for the project.
Clearly, given the number and frequency of serious bugs coming out of Redmond of late, it is beginning to look as if Microsoft's QA team is either out to lunch, or has been laid off.
So any change mitigation strategy involving Microsoft products would probably have as it's #1 item: let new software from Microsoft settle down before using.
I reboot Windows at lunch and the end of every day, and Windows still crashes a few more times during the week. It is simply unreliable.
My works machine gets rebooted about once a month and my home machine can sometimes go longer, depending on what kind of security issues are being fixed on Patch Tuesday. Font driver bug, yeah reboot now, SMB bug, nah, got a firewall, will wait a bit longer.
If Windows is crashing regularly, look at what crapware you have installed or replace the hardware.
HTML based stringtype data, or better, filtered more so there's less on intake to finalization of intended data state integrity? Possibly - Yes, such as hostnames, yes, locally on a webserver (hardware) for serving a site & what not also.
You're letting ME be creative here so, possibly - latencies to disk MIGHT matter though, so,SSD @ the very least but better on hardware SSD (Gigabyte IRAM is what I use here, 4gb) for temp ops systemwide, pagefile, webbrowser cache, hosts file location, print spooler, %TEMP% ops, + %COMSPEC% location & yes, data I work with & of course, hosts itself.
Dedicated ramdisk in local system RAM? EVEN BETTER (faster too).
I'd do these parameters to it to insure tcpip.sys really concentrates on hosts to supplement it + loading it from @ LEAST SSD (for possible reloads) etc.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\ServiceProvider]
"Class"=dword:00000008
"HostsPriority"=dword:00000005
"DnsPriority"=dword:00000006
"LocalPriority"=dword:00000007
"NetbtPriority"=dword:00000008
"Name"="TCP/IP"
* It works for making it in RAM of somekind, constantly, doing more with less (or, the same, just doing it faster by not doing stuff it doesn't need to be, on things it does need to be doing = less CPU overheads in string processing too by filtered datasets).
I do most of that here except serving up a site: I'm the ghost in the machine & can't be seen, I'm NOT the body of it (internet machine from here @ least - I prefer "inviso-power" from DEFENDER - I'm no webmaster).. I'm it's soul.
APK
P.S.=> I am being nice in this post, thought about it, & there's how I'd apply it (I do as I post this in fact)... apk
What do you guys always mean with this uptime thing? Why does a desktop have to be on for days? Are your office people working in shifts, 24/7? I've never been in a business where they thought it was ok to just leave on the computer when you were done working. Everyone who goes home after work shuts down his PC (and screen and any other device) to safe electricity.
Is not turning off computers a typical American thing maybe? Or are the people in our country/region just a bunch of penny pinchers?
i just ran this on my i5-3570K running win7:
>timecmd "systeminfo | find 'System Boot Time'"
systeminfo | find 'System Boot Time'
Results of execution:
Exit code 2
Time of execution 10.121
that's 10 seconds.
i just had to reboot to install about 6-weeks-worth of updates.
it never crashes.
you're doing it wrong.
Posting Anon testing to see if the troll mod to your post is undone. If it is, you're right. If it's not, I'll post a reply to this confirming such.
Or they could just "Get-CimInstance -ClassName win32_operatingsystem | select lastbootuptime" (100ms).
Or "wmic os get lastbootuptime" (500ms)
Or, hell, net statistics server / net statistics workstation (200ms) if, for some insane reason, the servers are allowed to Sleep.
I'll never understand "admins" who can't figure out that the screwdriver isn't a power-saw...
This signature does not exist. It has never existed. It is all a figment of your imagination.
I use Windows in a Parallels VM and in 4GB (or GiB who the fuck cares) I run Chrome and I with several tabs, Outlook, Word, 3 or 4 instances of VS2013 and all sorts of other miscellaneous stuff and don't have any problems with crashing. What hardware are you running your Windows on?
Why are you running SQL Server and IIS on a Dev machine out of interest?
Why wouldn't you? We have about four dozen developers, and we all do. How else are they going to develop a web app that uses a database?
Of course, we have to reboot constantly because Windows is such a piece of garbage. It sucks wasting half of your day rebooting and trying to get back to where you were before the typical Microsoft problem interrupted you. Yes, Windows will run for days without crashing...if you're not doing anything with it.
You could run it on a separate server or a few separate servers instead of consuming the resources of several dev machines. SQL Server isn't exactly lightweight and you're running other RAM intensive processes by the sounds of things.
We're using .net on our production server, and since we implemented the new optimizer our system's been running super-fast! There's almost no load on the CPU anymore, leaving plenty for our Team Fortress server! That seems pretty optimum to me!
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Why in the hell would you run IIS on another server instead of just running it locally? Are you going to copy your entire app over to another server every time you compile? No. You run IIS locally just like every other damn Microsoft dev. The GP is correct that you typically run things locally. And, that is why he is correct that Windows crashes constantly. Putting it under any sort of load makes it crash constantly. If I had to guess, the developers working under me spend nearly a third of their time waiting on Windows to reboot and getting VisualStudio and the rest of their environment running.
I just installed 8.1 with VS 2015 this weekend.
Is this serious enough where I need to re-image as things like my Intel RST raid driver all depend on 4.5 runtimes or does this only hit code being compiled?
http://saveie6.com/
It is installed by default in VS
http://saveie6.com/
Agreed on IIS although Web deploy takes no more time than building it locally but I wouldn't run SQL Server locally unless it's a small DB. What I'm getting at is that I have never had any problems with crashes while developing on Windows so I'm just surprised to hear of such bad experiences. Don't peg me as a Microsoft fanboy; I might work with their stuff but I curse them daily.
Why not? I run a 'datacenter on a vm' type of vm. SQL server, MySQL, postgresql, rabbitMQ, Couchbase, IIS, visual studio, elasticSearch/kibana, and tomcat and eclipse for the java app another team maintains. Runs fine with 6.5 gb of ram
Agreed, I reboot about every two weeks or so at work, at home it was longer - but since we now have load shedding our lovely power utility reboots my home PC's a lot more often. The fact that their devs are using IntelliJ and Eclipse screams "we don't like Microsoft" so they probably reboot out of reflex. For the .Net devs the only time I had to reboot that many times was when I was writing drivers in test mode. WTF are you doing? (Or doing badly in this case)
There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
I am not a developer, but if a few days after release are enough to find such a significant bug then it makes me wonder which quality processes Microsoft has in place and if anyone in Redmond even bothers using their own stuff for at least some test projects. So what's the plan for software companies these days? Fire everyone in quality assurance and hire more project managers who set arbitrary release dates and force rushed releases? Oh yay!