Microsoft suggests command line fiddling to get Windows 10 update installed
theregister.com
theregister.com
When installing the update, some users are finding themselves faced with an 0x80070643 error, a generic failure message. Unfortunately, according to Microsoft, "because of an error in the error code handling routine," this might not be the correct error.
Error in the error code code is giving the wrong error code for the error.I'm curious how often the error code code needs touching that there is an error in there that hasn't been patched long ago. I would imagine it would be a set and forget kind of thing. Unless this error in the error code code has been there for a long time but unnoticed. In which case there might be a errors in the QA of the error code code.
WinErr:013 Unexpected error - Huh ?
This may be the famous "/* NOTREACHED*/".
Just once too often did a bug in exception handling cause a system to go down - It is often not or hardly covered in tests (Its exceptional after all) and very unpredictable: more than elsewhere do exceptions have the tendency to arise where you never expected them (it's in the definition, really).
This would necessarily presume applying the same attitude towards the happy path—you're describing something short of that.
Or to put it a different way: defensive programming necessarily implies a skepticism that you even are sure what the happy/error paths are!
I realize that this is a different person from you, but that's the attitude I am replying to.
"extra vigilant ... [compared to my level of vigilance on the happy path]",
but rather
"extra vigilant ... [compared to other people I work or have worked with]"
The latter is how I read it, because I have definitely worked on teams where the happy path was heavily scrutinised, but error handling was treated as an afterthought, and rarely inspected too closely, leading to anything from error strings copied from another part of the application with names not updated to match the new location to throwing XException but only handling YException, so the XException bubbles up to a much less useful handler.
Hell, I'm free now! Everyone I've ever worked with sucks donkey-dick for not coding how I do!
> Hell, I'm free now! Everyone I've ever worked with sucks donkey-dick for not coding how I do!
I read it as "extra vigilant ... [because it's natural for people, including me, to focus on the happy path]".
I didn't read it as putting down other people you've worked with, holding yourself up as some paragon, OR potentially exposing yourself as incompetent (I'm really not sure how it would do that anyway?).
People tend to focus on the happy path. It's good to be aware of that and try to correct it. It doesn't require or imply thinking poorly of other people.
My experience definitely counters your own!
In my experience, these metaphors are introduced to meet time constraints and produce shitty software.
It's fine to talk about these metaphors as efficiency-accelerants, but they don't produce quality software. Not that there are many companies trying to do that these days.
I have no idea what you mean by quality software, so I can't answer that. Can you give an example? I also have no idea what your alternative framing is. It seems like fundamentally not how people think of software.
> The "primary goal" as you state is often characterized by others as "bias"
...yes, that's the point of I (and I believe the others) have been making. People are generally biased to focus on the happy path.
I'm honestly having trouble figuring out your line of argument from your various comments. Maybe I misunderstood what you said earlier about your experience contradicting mine. Were you actually saying that you really did believe everyone else was worse at programming?
What? I'm surely just as vulnerable to giving a shit about the happy path as everyone else. I'm just saying this leads to bad software, and anywhere you see good software produced you see people giving inspection to the code paths they suspected were error-free. The conception that giving extra attention to the error path leads to better software seems to entirely confuse the concept of a flawed program with some kind of finite bulk work that needs to be done.
There's code that can be allowed to fail, and furthermore, it will eventually fail due to the sheer amount of this code, the development time constraints, the number of possible game states, etc. I don't care that this code rarely fails under some arcane conditions, because this simply causes some button to stop working, some NPC to stop moving, but the game will remain playable. Even if the player notices the bug, they'll just shrug and keep playing. My aim is to make sure that the game recovers and returns to a healthy state after the level/save is reloaded. (Obviously, I'd like to fix/avoid every single possible bug, but it's impossible in practice. You'll have more luck continuously tracking in your head how dangerous the code you're working on is. Also, you rarely have the luxury of being the only programmer on the team. Bugs will happen.)
The other kind of code is the core game system stuff, the low level stuff, the error handling stuff, the memory stuff, the pointer stuff. You must pay special attention while working on this code, because failures will straight up crash the process or bring the game into an irrecoverably broken state (eg. all objects stop updating, stuck in some menu, the player never respawns...). Bugs like these are also highly prioritized by management. My update loop needs to be shiny.
Such is the reality of working on complex systems (or simple object-oriented programs ;))
But I insist the "unknown unknowns" are handled extremely simple, predictable and decoupled. Because those happy paths will fail. And then the exception-path must take over and this must be able to handle it predictable.
So no third party error services that I have to call over HTTP (HTTP will fail). No complex logging libraries (dependencies will become outdated). No difficult tracing middleware that has to be configured "just right" (configs will break). And certainly no flows that require a spaghetti-wrangler to follow along.
It’s more possible to recover from errors higher in the system but you can’t predict every problem so you need layers of error handling at increasingly lower levels with different recovery expectations.
```c#
public class FooError {
public Message(){
//TODO: I copy pasted this from somewhere else. I still need to update to a meaningful message
return "this is a BarError"
}
}
``` try{
try{
windows_update_function_that_saves_to_disk();
}catch(DiskSpaceException e){
DiskLogger.log(e.printStackTrace()); // itself tries to save to disk
System.err.println(e.printStackTrace());
}
}catch(GenericException e){
// something went really badly wrong, generic error
}Lib Guy 1: "I need an error.h to store all my errors to make it easy for me"
Lib Gal 2: "I need an error.h to store all of my error values so I can just use type names like a boss"
Exe Guru 1: "Which <error.h> is this?"
The other option is that an error was thrown inside error handling code which threw an error and was unhandled, throwing an error generically at the base.
“Well, it’s the absence of a value, or 0, or nullptr, or…”
“Forget it, you’re insane.”
- My son.
This kind of mistake is very common when dealing with GetLastError() or errno, since most library functions you might call while handling an error do not overwrite these values... until something in one of them fails (sometimes even a non-fatal error which is handled internally by them) and overwrites that per-thread variable.
Last year I had to debug a Windows issue that caused the following: we get back a struct from the Windows API that contains an HRESULT style error code, and also a string error message in case of error. Printing the string revealed that it started with the error code in hex, so we just logged the string. As part of a workaround for another Windows bug we had to check the error code for a specific value and do something different.
Eventually we got a report from a Windows machine in the wild where the code seemed to be doing something impossible: the log indicated the error code we looked for was being returned, yet, the code didn't take the conditional path that checked for it. After a lot of head scratching we realised there was only one possibility: the error code printed in the error message and the error code returned in the structure didn't actually match. Sure enough that turned out to be the case. Somehow Microsoft had generated the textual version of the error successfully, and then the machine readable error code had been replaced with something else before it was returned. The fix was to compare against both the HRESULT and the stringified form.
Naturally, this error only occurred on some Windows installs and not others for no obvious reason. The core OS seems to have tech debt issues so severe that it's basically impossible to verify even for app developers - you can do everything right, test it all carefully, and your code will still blow up in the wild in an undocumented fashion because no two Windows installs are quite alike, even (perplexingly) for fresh out-of-the-box installs that appear to be the same version. At this point even Linux is more consistent than Windows 10 is. I can't imagine how painful it must be to work on Windows deployments at Microsoft. The install base has become so inconsistent that they're pretty much guaranteed to trash people's systems with every change they make by now.
Then we'll know why QA went bad.
"Why, on the back of an error, of course."
"Um... and on what, may I ask, does the error stand?"
"Ah, but you're clever, young man. Too clever by half. It's errors, all the way down."
Try MS Teams: https://github.com/MicrosoftDocs/msteams-docs/issues/8539#is...
It's surprising that a script hasn't been provided for this process, which suggests the complexity and potential pitfalls involved. This leads me to believe that the absence of a scripted, simple double-click solution is due to the intricate nature of the task. Consequently, I'm not optimistic about a prompt Windows Update fix, as many had hoped for.
However, I anticipate that third-party developers will soon release scripts or programs to automate this process.
I always wondered why the recovery environment seemed to let me have SYSTEM privileges to my auto-decrypted system drive... Thats been the case for years, and you can use it to dump the contents of a machine you've lost the login password to for example.
I guess it wasn't supposed to!
Not for the "Shift+F10" command prompt option....
Bitlocker using TPM with PIN has no way to know your hard drive key without asking the TPM, which requires the PIN (and has anti-hammering/lockout built in.)
That said it's been ~10 years now since they dumped the traditional QA department (which involved more than just leveraging external user validation) and I honestly can't say Windows is blowing up any more than it was the previous 10 years to that. I'd really like to see some actual measured statistics of e.g. patch issue outages at a health system over the last 20 years though.
We should hold Microsoft accountable for borking installs and coming up with a half-assed fix even if it is a complex problem. They're in the lead on the desktop OS market and make billions upon billions of dollars that way. They should do better.
the reason its on here is that many was affected i guess
Yeah, join the club. Actually you've been in the club. A few years back I had Windows decide that I didn't have permission to access my own user directory anymore, resulting in a system with a glitchy Explorer and taskbar where nothing worked. To fix things I had to drop into an administrator console, create a new user, then move all my old files from the old user account to the new one and change ownership and permissions on them. So no, the idea that Windows is easier because graphical is BS. If the system is going to get into weird failure modes that I need to type commands to démerde myself out of anyway, I'm just going to stick with Linux and NetBSD.
I think that came in with Windows XP and it was a good thing. Letting user programs write into a folder full of executables is terrible for security.
> Unfortunately, according to Microsoft, "because of an error in the error code handling routine," this might not be the correct error.
I'd be tad happier to have apt install/apt update/upgrade instead of windows schedule 'updates'
It feels like Microsoft is trying to "convince" users to switch to Windows 11 by making Windows 10 bad.
At the same time Win 10 computers without this UEFI cannot be migrated to Win 11...
Do you have any sources for this? AFAIK, according to the LTT wan show when he was duiscussing his conversation with MS baout Windows sleep issues, he laerned MS still uses plenty of bare metal HW for testing, especailly notebooks and in no way got rid of it.
The new normal changed around 2014, as described in this Ars Technica article [2]. In order to ship more stuff, more quickly, Microsoft eliminated the developer in test roles, removing the bottleneck of a specific role in charge of quality and hoping to diffuse the responsibility.
This addresses the 'fired all testers' part of your quote. I don't have references on the 'scrapped their testing hardware', but I imagine most testing hardware was maintained by developers in test, and when their positions were eliminated, they may not have had anyone to transfer the hardware to.
[1] https://www.amazon.com/How-We-Test-Software-Microsoft/dp/073...
[2] https://www.amazon.com/How-We-Test-Software-Microsoft/dp/073...
I'm fairly certain this isn't the case. 1) Microsoft still adds Microsoft drivers for hardware; this implies having hardware and people to work with it. 2) Microsoft has a massive base of corp and gov customers buying hosting, surveillance, etc. Widespread issues with Windows would could affect that.
I'll go out on a limb and guess the fired all testers theory arose when the insider program became widely available to the public.
They killed the test org completely around 10 years ago because of course developers can just do TDD and ship an operating system with 30 years of legacy applications/hardware ecosystems around it. Or "telemetry will just tell us what to fix"
Of all the mountains of dumb shit this company has done in the past 10 years, this is actually what killed Windows for the people (like myself) who actually used to like Windows.
Edit: To add sources, I worked at Microsoft years ago and still have friends in those orgs.
Windows 9x was extensively user tested using mockups made in frickin' Visual Basic; user feedback was incorporated into the next round of mockups to converge on something that was actually easier to use. It was agile development before that was a buzzword. What's replaced that? Just rolling out whatever UI brainfart the design team came up with into the product and using bitching on X (formerly known as Twitter) to gauge whether to keep it?
"Under the new structure, a number of Windows engineers, primarily dedicated testers, will no longer be needed. (I don't know exactly how many testers will be laid off, but hearing it could be a "good chunk," from sources close to the company.) Instead, program managers and development engineers will be taking on new responsibilities, such as testing hypotheses..."
https://www.zdnet.com/article/beyond-12500-former-nokia-empl...
There were also a lot of insider comments from affected SDETs on the notorious (at the time) Mini-Microsoft blog as well: https://minimsft.blogspot.com/2014/07/18000-microsoft-jobs-g...
The burden of testing software was shifted over to developers after the layoffs. If you check Microsoft's job listings, there isn't even a category for software testing positions anymore.
Hmm
More information on the fix can be found discussed here: https://old.reddit.com/r/sysadmin/comments/10atdqe/is_bitloc...
What did the author want, a button to push for each solution to every possible exotic error, even critical ones that would require to resize a system partition from a running OS? Seriously!? Of course one solve this through the command line.
Or, if that wasn't what the author meant, then he may have to upgrade his Slackware 4.0 install, because a thing or two have changed in the Linux world.
I still remember from the Windows days when you were unlucky enough to hit a more unusual error code, where googling it didn't immediately result in a dozen forum threads with people posting the same issue and then some dude replying with a fix where you don't even know how they possibly figured that out. If you didn't find a solution googling the error code it basically meant you can try random shit until you accidentally fix it, or reinstall. On Linux I could just ultimately look at the source code of whatever component is broken and track back from where the error is printed.
it works too. Lots of comments both on their own site and here purely in response to mentioning Linux in the subheading.
Windows updates can usually do this actually. But only if the recovery partition is after the system partition. On my systems that have been around for a while and had a recovery partition in the front of the drive (as used to be common), there's often a handful of recovery partitions, because the original one was too small, so some update made a new one at the end, and then that one was too small and another update made another one at the end. Kind of messy... and hard to cleanup, I don't think many filesystems are easy to extend or reduce from the front of the partition.
People get Windows/Mac for the convenience of 1 click solutions and the understanding that most things will work with one click, or at most a few clicks and a login.
It also comes with the expectations that such massive companies won't completely annihilate their computer with a buggy update.
(edit: the actual extension triggered HN's blocker..)
Also how the heck does something like this happens ? Did MS forgot the size of the WinRE partion which THEY created ?
You might not be using it now, but you might want to switch it on later.
And more importantly, it prevents an exponential explosion on the amount of different variants of the code. If you allow people to not get this patch, and later another bug is fixed, either you force people to get this patch before getting the next one (leading to N different versions), or you'll have to develop a fix both for people who have and for people who don't have this patch (leading to 2^N different versions).
HN appearances: https://hn.algolia.com/?query=massgravel&type=comment
How can you screw up so badly that you even have the ability to bypass the entire reason for a security feature existing?
Sorry to be mean to Microsoft, I am certain there's usability reasons for this, but sincerely: principle of least surprise please.
I'd be incredibly surprised if Linux kept a copy of my unlock keys around somewhere that were available to anyone except me. That is a truly monumental fuck-up.
If you use any non-auto unlock -- PIN, passphrase, network -- then WinRE can't magically access your data and needs that code to then retrieve a key from the TPM.
You can set it up to auto unlock:
https://devicetests.com/decrypting-luks-encrypted-filesystem...
I was called to help my concerned stepson with "an update error" this past weekend. I'm a software engineer but even I kind of balked at it at first, realizing how very easily an on-the-fly resizing of partitions can go wrong!
Let's take it from the beginning.
He pointed me to the "out of disk space" error code, which isn't in text form to begin with, but only something you find out by googling it. I thought that must be wrong, because the drive is like 30% full. Knowing how this particular error is sometimes thrown inaccurately, I dug deeper and ended up in a long winded forum thread about all sorts of people and skill levels having issues. Novice home users. Advanced users. SERVER ADMINS.
It soon dawned upon me that the disk space error was correct; it was only talking about it from the perspective of a tiny Windows Recovery Environment partition! Or "tiny"... It was like 300 MB large but not enough. It wanted something like another 500 MB now.
People yelled at MS for not pulling the patch and fixing it or bringing an automated post-patch fix.
BUT if this HAS to be done, MS is in a tough spot now. Because it's inadvisible to resize partitions automatically. You usually want backups as it's a high risk operation where power loss or bad input will brick the OS install. I also think how and if it can be resized depends on the layout on the partition table. For example, I had to reduce the end of a former partition to increase the start of the recovery one. Fortunately, I had free space there. I can imagine a Microsoft script wizard would have his heart sink as he'd ship an automated partition resizing script to millions of systems and all their intricacies.
So, I'm not sure how MS will end up fixing this to be honest. My only "fix" would be to rewrite the code so that it don't need a larger Windows RE partition anymore?? OR simply not installing this patch if it's too small. Otherwise, this can only really be "safely" fixed as part of a fresh Windows install with hard drive reformatting and the whole shebang.
I ended up fixing it with a free partition resize tool (MiniTool Partition Wizard). MS advised me to the command line but to hell with that and their ancient DISKPART.EXE and having to input the correct partition # for your partitions when there were like five of them on the drive. I needed something more visual as assistance to hand hold me from making mistakes.
But how on Earth could this even happen? Did MS just kind of forget that they have had previous, smaller Windows RE requirements in the past?
i.e., I make a point to never run windows updates, they've only caused more harm than good post Win7
should I increase it by a further 250 MB (for a total of 750 MB), or are they just plain crazy?
is it that not accurate? how do i find out how much actually free space i have?
My experience is: On Windows, for most enduser use cases (and this absolutely excludes anything dev related), I would expect the user to get by without touching the CLI. In fact, I would assume that any given application will expose all of its functionality only through a graphical UI. For me, on Linux, the opposite expectation applies.
It's either crashdump or nice error message. If not I just increase loglevel to find the actual problem.
I just meant it as a lighthearted joke.
Every time I've tried Linux, I've had to dive into the terminal and paste commands from the internet to get normal things to work.
I've no problem with more than that. I don't know what hardware you're using, but that's atypical.
I've been on Linux some 28 years now, and it used to be like that¹. But today? I haven't had a kernel or graphics driver update failing on me for years. Maybe 10+ years? Granted, my Linux is the most boring, hardly-configged Unbuntu LTS. Boring hardware. Boring drivers. Everything optimized to "Just Work" - My machine pays my bills and if I'm down for a day because I fiddled around with some fancy custom trackpad module, or special Bluetooth whatevers, it's costing me actual money.
I'm certainly in my terminal 80% of the time (developing in nvim etc), so can't say much about how much it is needed by someone who doesn't know or use that terminal.
¹ My personal worst was at a conference doing a presentation for a 200+ audience having to recompile X, while entertaining the audience, because the beamer wasn't found and X crashed on it.
Edit: oh, and not to mention graphics (Nvidia), multiple monitors and HiDPI, especially with fractional scaling and different multiples per display. HiDPI on Linux doesn't work nearly as well as Windows and macOS.
On the AMD, I couldn't use the webcam for a good six months under Windows. It wouldn't detect some part of the USB tree.
On the Intel, for a good year, I couldn't get 4k@60Hz over DP via the HP dock. Then at some point, installing Intel drivers fixed the issue, but Windows would insist on "updating" to the older, borken version every so often. Now Windows also has the correct drivers. A different dock still doesn't work. Then there's the fact that the Windows installation (11 22h2) doesn't support the touchpad, nor the wifi card. Bonus points for the default install insisting on connecting to the internet for the online account thing.
Linux had 0 issues on both since the day I got them.
As for HiDPI, yeah, the Linux story, at least with X11, is non-existent if you want multiple HiDPI settings. But Windows is a crap shoot, too. It's easy to get a blurry mess: just connect and disconnect an external screen, and even the freaking windows 11 start menu is borked. It looks fine when you open it, but start typing something and enjoy the blurriness. Apps will be stuck with either enormous or tiny text. The context menus of the systray icons will appear all over the place.
Some apps manage to combine everything: tiny text, yet blurry, and displayed in the middle of the screen. To name and shame: Fortinet VPN client.
Intel for graphics and wifi is generally the safest choice. I pick laptops with those and have great success.
I'm not trying to argue that "Linux Just Works" or that "you won't run into hardware issues on Linux". I'm arguing that by choosing "boring" hardware, and "a boring LTS from a large distro" you won't.
I had a kernel update break a memory management API that JavaScript engines use about a year ago, and then before that my last kernel induced update breakage was in like 2012 with fglrx.
That broken kernel update also would not have made it into more conservative distros, as the change was rolled back 5 days later.
Meanwhile I have previously experienced the windows issue in this topic in like 2019. The windows 7 installer created even smaller reserved partitions than the windows 10 one (100 Vs 500 mb iirc), so users with systems upgraded from 7 to 10 would have seen this sooner.
And for completeness sake I've also experienced OS X fail at updating to High Sierra as that updater didn't like something about the way my employers provisioning software had set up the partition layout some years earlier.
I've administrated a fleet of ~100 Ubuntu devices that used nVidia for some AI stuff - unattended-upgrades disabled and all that - and yet graphics drivers broke in regular intervals, every couple of months. Apparently, nVidia drivers have some system in place that can update drivers on its own. The only solution was to uninstall all nVidia drivers, upgrade all packages, then re-install nVidia drivers.
But somehow Debian keeps uninstalling the display manager. One would think this is the easiest problem in the world to avoid, but they avoid every hard problem, and this one passes by.
I realise it doesn't help now, but in the future you may want to avoid hardware that's specifically hostile to Linux.
there's a reason I chose my latest laptop specifically because it was Ryzen.
Ultimately, thinking winget can be used like apt to get a new system up and running is misguided on my part.
Yeah, I found that one out the annoying way too.
What's surprising though is that it listed the msstore source as operating normally when I did winget source update. Regardless, kind of crappy this doesn't work out of the box and I have wave dead things not mentioned in any instructions to get this dumb thing working.
WinGet would... launch, but provide no output. And of course, it was my first time trying to use WinGet in general...
A few reboots later suddenly Win+X had Terminal and WinGet started working, and on a subsequent reinstall in a VM I spotted that, yeah, apparently all the extra WinGet, Terminal, etc stuff all has to be pushed from the MS Store instead of Windows Update.
Total pain in the ass.
Yes, it is true, that on Linux there are many, many things which are best done through command line fiddling.
But installing a system update, that update borking things, belching up a totally cryptic error message, and then forcing you to clean up the mess through the command line, is nothing something I've experienced on Linux so far. For me, apt updates have always been super reliable - and error messages have mostly been quite specific and easy to google.
So, this specific case seems nothing like Linux to me.
The ocean between. While you or me might appreciate a good error message and handy debugging options, the standard windows user experience is optimised to not confront users with errors at all. Either approach comes with its trade offs and is implemented with varying degrees of success.
Windows discourages this kind of professional responsibility, hides everything it can that would give you an inkling of what's going on under the hood. Microsoft wants you to be dependent on them for doing ANYTHING out of the ordinary. And of course, when anything out of the ordinary occurs, there is wailing and gnashing of teeth from millions of windows users, billions of dollars lost by their employers, and all the Linux users just stare in disbelief that y'all don't know how to change your own oil. If you use a computer for work, should probably know how it works. Microsoft has intentionally made it difficult, so... Have you tried Linux, the backbone of modern computing, installed on more devices than Windows by at least a factor of two?
Microsoft had extensive documentation of nearly every API they support, and some they don't. Comprehensive documentation with notes and caveats. Automatically available from their tools.
Compare, for instance, with Apples almost total non-documentation of anything. Mostly just scraped comments with arguments barely described e.g 'a string'. No notes, no architecture, nothing.
Interesting, I've never found Microsoft documentation for Windows thorough enough to reason about a problem, especially when compared to Arch or Gentoo's docs. I always feel like I'm reading the abstract of a paper, with no access to the rest of it. Is there some kind of special access or login requirement for deeper documentation, or am I just spoiled by the great Linux docs?
Apple products are the king of the "you don't own your device" mantra. I just refuse to develop anything for them, because the time expense of trying to guess how to get the OS to comply hasn't been worth the reward. That being said, I've found the documentation for Swift to be extremely good, better than most other languages I work with.
I was privileged(?) to have access to source under license for years, contracting with a company that ported Windows to various industrial platforms. So my view is similarly colored.
Linux is definitely the king, no argument there.
Lmao, come on now.
"Error: unmet dependencies"
I swear, I haven't run into this.
I'm very hesitant to touch Linux updates, but I am occasionally "forced to" when I need to run a new piece of software that ends up being like pulling on a loose string on a sweater.
I'm not going to have an argument about my personal experience. You can find plenty of others in the comments who have had similar problems. I enjoyed the response, as I've been joking for 20+ years that 95% of the time Linux advocates will tell anyone running into issues "you're using the wrong distro".