5 ms·
Update and shut down no longer restarts PC, 25H2 patch addresses decades-old bug
- cybrox 1y agoLooking at the rest of their recent update history, this likely just broke... Task failed successfully.
- throwaway106382 1y agoWhat a joke of an OS and company.
- SurceBeats 1y agoAbout time... I guess
- chris_wot 1y agoSeriously, on a Linux system, I update everything except the kernel without a reboot. Why can’t Windows do this?
- davidhyde 1y agoThe file system won’t allow you to overwrite an open file in Windows.
- AndrewDucker 1y agoWindows locks files when they're in use, so that you cannot overwrite them. Linux doesn't do this. So if you want to overwrite a running service then you can either stop it, update it, and restart it (tricky to manage if it has dependencies, or is necessary for using the PC), or to shut down everything, update the files while the OS isn't (or is barely) running, and then restart the OS.
- formerly_proven 1y agoMOVEFILE_DELAY_UNTIL_REBOOT is sort of the real trick, because it's processed by the Windows equivalent of PID 0 (ssms), which processes these pending operations before actually starting any other userspace stuff (which would invariably load things like kernel32.dll etc.)
- aaronmdjones 1y ago> Windows locks files when they're in use, so that you cannot overwrite them. Linux doesn't do this. Linux does do this (try overwriting or truncating a binary executable while it's running and you'll get -ETXTBSY). The difference is that Linux allows you to delete (unlink) a running executable. This will not free the on-disk space occupied by that executable (so anything you write to disk in the immediate future will not overwrite the executable, and it can continue executing even if not all of the executable has been paged in) until all references to its inode are freed (e.g. the program exits and there are no other hardlinks to it). Then you can install a new version of the executable with the same name (since a file by that name no longer exists). This is what install(1) does.
- luxuryballs 1y agothinking it has something to do with this https://unix.stackexchange.com/a/49306 https://unix.stackexchange.com/a/49306
- mananaysiempre 1y agoWindows NT was always capable of what Microsoft calls “POSIX delete semantics” (the POSIX compatibility layer was in the design doc since before the name change from “NT OS/2”), but some years ago the default for the Win32 call DeleteFile actually changed to take advantage of that (causing some breakage in applications, but apparently not a lot of it).
- magicalhippo 1y agoKDE Neon used to do this. Almost always caused issues after update with stuff crashing due to mismatch of versions talking to each other over D-Bus and such. So they moved to something more like the Windows style, where it downloads, reboots to apply and then reboots again freshly updated.
- bayindirh 1y agoKDE sometimes borks after big Qt or KDE updates. I just logout and login. This what it said on the tin since forever for Linux systems, and it doesn't hurt.
- magicalhippo 1y agoRight, but a reboot is just as quick and then you get to load everything from scratch so I just ended up doing that.
- bayindirh 1y agoMy systems run a couple of services, too. So, I don’t prefer to reboot unless I’m upgrading the kernel or something in close vicinity. Also, it surfaces long-running bugs so I can report them.
- amiga386 1y agoWindows won't let you overwrite files "in use" and "file" is determined by the full pathname. Linux will let you overwrite files "in use" (though the program(s) using them may not notice) and "file" is determined by a magic number, the inode - you can delete a file from a directory, really it's removing _that inode_, and put a new file in place with the same name, it's a _new_ inode. Programs that still have the file open are referring to the _old_ inode, which only goes away once everyone stops using it. So actually you need to go round restarting your programs/services on Linux to get them to pick up changes (most package managers do that automatically), but at least it's _possible_ to make those changes without a reboot. Windows has to go into a special mode where nothing else runs, to be sure that it can update files.
- throwaway106382 1y agoThis is why I love OpenSUSE, when you update your system it will let you know when updated files that certain processes are using were touched and you can then decide if you want to restart them. Suse systems in general are just so much nicer to administer than RedHat or Debian/Ubuntu ones (imo of course).
- aaronmdjones 1y agohtop(1) can also highlight running processes that have had their on-disk executable replaced (highlights in red) or one of its shared libraries (highlights in yellow). I find this very useful.
- edoceo 1y agobtop as well
- mschuster91 1y agoDebian can do just the same, at least for a libc upgrade and a few others you get asked if you wish to restart now or later.
- 1y ago
- cassonmars 1y agoWith things like kpatch you can even update the kernel without a reboot
- anonymars 1y agoBriefly: it can (see e.g https://devblogs.microsoft.com/oldnewthing/20130102-00/?p=5663 https://devblogs.microsoft.com/oldnewthing/20130102-00/?p=56...) Note that just replacing files on disk is not sufficient because all the running software would still have the old version. In the first place it means the security issue could still be present in currently running software, in the second place exciting things can happen when two (or more?!) different versions try to talk to each other. Oh, and who's to say the whole file was fully loaded into memory (or wasn't partially paged out) - imagine the fun that would happen if you later page in data from a different version of the binary! So you need to hot patch the running binaries. I don't really remember why it's not done in practice even though it's technically possible, I seem to remember the conclusion was that clustering (in whatever form) was the solution for high availability, rather than trying to keep a single machine running.
- toast0 1y ago> So you need to hot patch the running binaries. I don't really remember why it's not done in practice even though it's technically possible, I seem to remember the conclusion was that clustering (in whatever form) was the solution for high availability, rather than trying to keep a single machine running. Most systems are technically capable of hot patching (if your exe file is mmaped, and you change the backing file, Bob's your uncle, unless your OS is no fun; which is why unix install pattern is unlink and replace rather than in-place updares). But most executables are not built to be hot patched, especially not without coordination. Hot patching lets you make changes to your live environment with tremendous speed, but it also has risk of changing your live environment to an offline environment with tremendous speed. I'm a proponent of hot patching, and would love to be able to hot load all the things, but it has requirements and tradeoffs and most software isn't built for it, and that's probably the right decision for most things.
- anonymars 1y agoYep. In fact rename/replace is conceptually the same as unlink/replace, but another potential issue is in-process dll hell. If a patch replaces multiple libraries, and they're not all loaded into a process yet, even if each is atomic, you might load version 1 of the first library but version 2 of the second
- layer8 1y agoThat’s not strictly true: https://askubuntu.com/a/731993 https://askubuntu.com/a/731993 I semi-regularly have to reboot my Linux system despite the kernel remaining unchanged.
- 1718627440 1y agoYou can even update the kernel while keeping userspace running by hibernating.
- waltbosz 1y agoThat was a bug? I always thought it was because of my dual boot configuration.
- coolness 1y agoYeah, even with this fixed it's going to be annoying because it first restarts, so you have to stay at the PC to select windows in grub
- snmx999 1y agoYou can set grub to select the lastly selected menu entry.
- MereInterest 1y agoFull-disk encryption, as useful as it is, also makes this a royal pain. Updates can't be performed unattended, because each restart done during the updates requires providing the password before continuing.
- hulitu 1y agoWhy don't you let Windows manage the password for you ? It will be safely stored in the Cloud. /s
- nerdjon 1y agoI honestly thought the same and kind of just gave up the idea of hitting that at night and being done. Figured having 4 OS installations was already fairly niche that it was largely a self imposed issue. Looking forward to confirming that this fixes the issue in my use case.
- poolnoodle 1y agoI can't believe I'm alive to witness this.
- SirFatty 1y ago"Microsoft shipped a broken “Update and shut down” toggle with Windows 10, and it never acknowledged it until now." I guess they know what's best for the user base, and this was obviously deemed not important. But boy did they get Copilot integrated in everything post haste. Typical Microsoft hubris.
- nusl 1y agoDifferent teams, perhaps. No idea. A monster org like this must be massively disconnected internally, specially for non-critical bugs and such.
- SirFatty 1y agoI've been supporting MS as a career for 30+ years, so trust me, I understand that.. and it's a common excuse. But I don't accept it.
- rs186 1y agoI used to always think like that and try to come up with these excuses. Until I read the story about how Steve Jobs was mad about the fact that Mac was slow to start and asked teams to fix it. Surprise, they fixed it. And it's not like nobody could say anything at Microsoft. Someone on HN posted this email (originally from a different website): https://www.techemails.com/p/bill-gates-tries-to-install-movie-maker https://www.techemails.com/p/bill-gates-tries-to-install-mov... However, my guess is that this email got nowhere, because the experience of using Windows isn't so different decades later. What this means is that 1) Microsoft is first and foremost a business oriented company, and what matters to them most is feature set, compatibility, support etc. As long as things mostly work, it's fine. Usability is at the bottom of the list. 2) Windows is just not important to Microsoft any more. I bet that Satya Nadella has grumbles about bugs and ads in Windows 11, and likely has run into this specific bug first hand. But when he decides that "ads revenue trumps everything" and "these are just small bugs that don't really matter", he immediately forgets about it all.
- transcriptase 1y ago
- AaronAPU 1y agoI have always blamed my Dell desktop for this. Incredible.
- ale42 1y agoI had often reboots followed by more update installation and then a shutdown, so I assumed this was working as intended (i.e. finish installing the updates, which might require a reboot, and then power off).
- TiredOfLife 1y agoFor me 25H2 was the first update that didn't update and shut down. All the previous ones did (on multiple computers).
- AJRF 1y agoThis happened to me last night! I was going to bed and I clicked Update and Shut Down, then I went in to the other room. After a few minutes I could see the blue glow of my Windows background shining on the wall. Glad it is fixed!
- OCTAGRAM 1y agoHow dare you shut down such a great operating system?
- fennecfoxy 1y agoOh. My God. Finally.
- 8cvor6j844qw_d6 1y agoI noticed Windows's start menu only updates certain tracked files (e.g., remove deleted files) on a normal shutdown + start, and not on a restart. Which is odd because I was under the impression a restart is the only "true" shutdown due to fastboot behavior. I didn't look too much into it and chalked it up to a quirk of Windows start menu behavior in tracking recent files.
- yalue 1y agoFor a long time, windows had two options: 1. Update and restart and prompt for bitlocker password and update and restart and prompt for bitlocker password and restart 2. Update and restart and prompt for bitlocker password and update and restart and prompt for bitlocker password and shut down (and restart) Finally, they fixed the last bit of option 2
- riffic 1y agoit'd be nice if Microsoft paid just a bit of attention to the immutable/atomic Linux ecosystem a bit and if they could finally ship an OS that wasn't always a dearly loved "pet". pity to those who have to work on/with this jank.
- xbar 1y agoMicrosoft denied a bug for a decade that harmed 100% of users every month in an obvious way. It is the denial that is so very Microsoft.
- hollow-moe 1y agoMy laptop did something like it last night but not exactly : it booted from HIBERNATION to apply updates and reboot. Auto updates have been turned off for a while and yet this happens. You can't trust micro$oft for even the smallest thing. Edit: And I'm fairly sure this is a wanted malicious behavior. The thing was hibernating for quite a time before doing it, like it would wait for me to leave the office/for the computer to be in a bag on the way back home and I wouldn't notice what happened.
- portugueasey 1y agoI’ve always assumed it’s either just something my corporate laptops like to do (my older HP would often switch itself back on even when you told it to shut down, forgetting about any updates), or that I had just clicked the wrong button. Well, guess that’s my mentally stability so slightly restored!
- aaronmdjones 1y agoI wonder if they'll backport this fix to Windows 10 (Very much doubt). I also wonder if they'll ever fix the menu entry delay bug. At the moment neither of the "Update and ..." options is in the menu when you first open it. Opening the shutdown menu then checks if there are updates available to install and will then add those options, shifting the existing menu entries. Which makes it incredibly easy to quickly click on an option you didn't want.
- Fire-Dragon-DoL 1y agoOh so it wasn't a business decision for such horrible behavior,it was an actual bug.