Friday, July 14th 2017

Windows 10 Process-Termination Bug Slows Down Mighty 24-Core System to a Crawl

So, you work for Google. Awesome, right? Yeah. You know what else is awesome? Your 24-Core, 48-thread Intel build system with 64 GBs of ram and a nice SSD. Life is good man. So, you've done your code work for the day on Chrome, because that's what you do, remember? (Yeah, that's right, it's awesome). Before you go off to collect your google-check, you click "compile" and expect a speedy result from your wicked fast system.

Only you don't get it... Instead, your system comes grinding to a lurching halt, and mouse movement becomes difficult. Fighting against what appears to be an impending system crash, you hit your trusty "CTRL-ALT-DELETE" and bring up task manager... to find only 50% CPU/RAM utilization. Why then, was everything stopping?

If you would throw up your arms and walk out of the office, this is why you don't work for Google. For Google programmer Bruce Dawson, there was only one logical way to handle this: "So I did what I always do - I grabbed an ETW trace and analyzed it. The result was the discovery of a serious process-destruction performance bug in Windows 10."
This is an excerpt from a long, detailed blog post by Bruce titled "24-core CPU and I can't move my mouse" on his Wordpress blog randomascii. In it, he details a serious new bug that is only present in Windows 10 (not other versions). Process destruction appears to be serialized.

What does that mean, exactly? It means when a process "dies" or closes, it must go through a single thread to handle this. In this critical part of the OS which every process must eventually partake in, Windows 10 is actually single threaded.

To be fair, this is not a normal issue an end user would encounter. But developers often spawn lots of processes and close them just as often. They use high-end multi-core CPUs to speed this along. Bruce notes that in his case, his 24-core CPU only made things worse, as it actually caused the build process to spawn more build processes, and thus, even more had to close. And because they all go through the same single threaded queue, the OS grinds to a halt during this operation, and performance peak is never realized.

As for whether this is a big bug if you aren't a developer: Well that's up for debate. Certainly not directly, I'd wager, but as a former user of OS/2 and witness to Microsoft's campaign against it back in the day, I can't help but be reminded of Microsoft FUD surrounding OS/2's SIQ issue that persisted even years after it had been fixed. Does this not feel somewhat like sweet, sweet karma for MS from my perspective? Maybe, but honestly, that doesn't help anyone.

Hopefully a fix will be out soon, and unlike the OS/2 days, the memory of this bug will be short lived.
Source: randomascii Wordpress Blog
Add your own comment

107 Comments on Windows 10 Process-Termination Bug Slows Down Mighty 24-Core System to a Crawl

#76
EntropyZ
Another reason that Windows 10 just pees me off, even though I am not running a workstation. All I wanted is to have no driver issues and have a better gaming experience without slowdowns, what do I get? More spying and whatnot.

I am an early adopter, Win 10 was fine for the first few years. Now MS just c**ked the OS with stupid updates to add more tumors to their crap kernel which is decades old.

They said there would be no new Windows numbered versions. Which means things are just going to get worse rather than better.

And developers are also taking only baby steps because the OS is just a mess now.

F*** the consumer, right? Nobody cares anymore.
Posted on Reply
#77
Frick
Fishfaced Nincompoop
EntropyZAnother reason that Windows 10 just pees me off, even though I am not running a workstation. All I wanted is to have no driver issues and have a better gaming experience without slowdowns, what do I get? More spying and whatnot.

I am an early adopter, Win 10 was fine for the first few years. Now MS just c**ked the OS with stupid updates to add more tumors to their crap kernel which is decades old.

They said there would be no new Windows numbered versions. Which means things are just going to get worse rather than better.

And developers are also taking only baby steps because the OS is just a mess now.

F*** the consumer, right? Nobody cares anymore.
Naah, 10 is improving. They have cocked up updates in the past but they've been stable for a while now.
Posted on Reply
#78
FreedomEclipse
~Technological Technocrat~
With that said....

Google should of been using their Chrome OS
Posted on Reply
#79
notb
FreedomEclipseWith that said....

Google should of been using their Chrome OS
How would this be even possible?
Posted on Reply
#80
FreedomEclipse
~Technological Technocrat~
notbHow would this be even possible?
By having it installed
Posted on Reply
#81
notb
FreedomEclipseBy having it installed
That was really smart.
And now maybe some sufficient condition rather than a necessary one? :-)
Posted on Reply
#82
FreedomEclipse
~Technological Technocrat~
notbThat was really smart.
And now maybe some sufficient condition rather than a necessary one? :)
Run a marathon?

What sort of 'sufficient condition' are you looking for?
Posted on Reply
#83
zlobby
EntropyZF*** the consumer, right? Nobody cares anymore.
We are not the consumers anymore. We are the PRODUCT!
Posted on Reply
#84
notb
FreedomEclipseRun a marathon?

What sort of 'sufficient condition' are you looking for?
I'll put it differently. Do you think Chrome OS covers all OS-related needs of a Google employee?
Posted on Reply
#85
FreedomEclipse
~Technological Technocrat~
notbI'll put it differently. Do you think Chrome OS covers all OS needs of a Google employee?
They built it so I assume they can make it work for them. Its based off unbuntu or linux
Posted on Reply
#86
cryohellinc
FreedomEclipseThey built it so I assume they can make it work for them. Its based off unbuntu or linux
You are SO wrong on this one.
Posted on Reply
#87
FreedomEclipse
~Technological Technocrat~
cryohellincYou are SO wrong on this one.
Which part? The building, the unbuntu, the linux or tuning an OS to work for them?
Posted on Reply
#88
trparky
The Chrome OS part. Read this, there's no mention at all about Ubuntu in the article.
Posted on Reply
#89
FreedomEclipse
~Technological Technocrat~
trparkyThe Chrome OS part. Read this, there's no mention at all about Ubuntu in the article.
Hence why i said "unbuntu or linux" in my post

Either/Or etc
Posted on Reply
#90
L'Eliminateur
you have to be a troll or a dimwit to even think that they should use chrome OS on a fucking development workstation.

chrome OS is a lightweight end user OS which is mainly web only for shit hardware devices. Where in that is a proper development environment for a super high end desktop?.

ffs people talking because oxigen is free
Posted on Reply
#91
FreedomEclipse
~Technological Technocrat~
L'Eliminateuryou have to be a troll or a dimwit to even think that they should use chrome OS on a fucking development workstation.

chrome OS is a lightweight end user OS which is mainly web only for shit hardware devices. Where in that is a proper development environment for a super high end desktop?.

ffs people talking because oxigen is free
They could have other dev versions of Chrome OS you know.

the absence of evidence is not the evidence of absence
Posted on Reply
#92
L'Eliminateur
and why would they even consider using such a end user os for development when you already have windows, once you have windopws you don't need anything else
Posted on Reply
#93
FreedomEclipse
~Technological Technocrat~
L'Eliminateurand why would they even consider using such a end user os for development when you already have windows, once you have windopws you don't need anything else
Because development is in house and it wont grind to a stop like microsoft.
Posted on Reply
#94
HopelesslyFaithful
L'Eliminateurand why would they even consider using such a end user os for development when you already have windows, once you have windopws you don't need anything else
stop feeding him please
Posted on Reply
#95
R-T-B
jaggerwildWhy is this on "HeadLines"? Look like a bunch of bozos, but hey......
He works for google and probably (actaully, nearly certainly) makes more than you and me combined.

That said, I probably am not much of a factor and am the biggest bozo here, lol.
FordGT90ConceptMy guess is he had 48 processes (one per logical core) running that were killed at once. He noticed the 125 ms hitch and investigated by trying 1000. 48 is a lot; 1000 is crazy. Visual Studio only uses 4 or 5 processes usually.
Ah, I see now. Threads vs processes elluded me for a bit (been a while since I programmed). This is indeed a crappy build method if it's all processes, though not uncommon inside unix-land.
Posted on Reply
#96
FordGT90Concept
"I go fast!1!11!1!"
Anything a process can do a thread can also do with far fewer resources. Processes are really only useful for compartmentalization but when the threads are all carrying out a related task, there's really no need for that either. Having everything in one processes also greatly accelerates communication internally (all can stay in the RAM). Cross-process memory accessing is frowned upon unless it's absolutely necessary (e.g. interfacing directly with the operating system).

I think there is only two scenarios where multiple processes makes sense:
1) Experimental, distributed applications like BOINC. You want them separate for stability, security, and control reasons. They usually never finish at the same time even if you have 1000 projects running so even that is very unlikely to expose this bug.
2) Application updaters because you can't modify a running application. Usually only main application + updater and they never really ever run at the same time so no problem here either.

A process is effectively a collection of related threads.


I'm curious how *nix behaves in the same situation (closing 1000 processes in rapid succession).
Posted on Reply
#97
Boosnie
I think we are missing the point here...
A thread has a shared resouce pool with its parent process and its thread relatives. if you load a file in a thread that file is concurrently accessible by every relative thread and by the main process app.
When you are building an application and you have a shared library all the threads that are trying to read code from that library will try to access that file at different times or the same time. While compiling, you rely on different temporary resources to write to and read from; 10 thread doing this work have to have a mechanism to do not write and read from the same shared resource. So if you think about memory footprint and resource destruction, the point of having threads in spite of processes makes little to no difference. You will have to load in memory a different version of you application for every thread you spawn and you have to have a lot of control code. It will be slower, unsafer and probably as slower to unload.

Now take the process spawning approach.
You develop a simple working application, you spawn that 10 times in 10 different processes and you are done.
Posted on Reply
#98
Gasaraki
trparkyPlease don't tell me you like Windows XP. :fear:
Windows 98 or go home. BEST. GAMING. PERFORMANCE. EVA.
Posted on Reply
#99
trparky
Now I know you're not serious.
Posted on Reply
#100
FordGT90Concept
"I go fast!1!11!1!"
BoosnieI think we are missing the point here...
A thread has a shared resouce pool with its parent process and its thread relatives. if you load a file in a thread that file is concurrently accessible by every relative thread and by the main process app.
When you are building an application and you have a shared library all the threads that are trying to read code from that library will try to access that file at different times or the same time. While compiling, you rely on different temporary resources to write to and read from; 10 thread doing this work have to have a mechanism to do not write and read from the same shared resource. So if you think about memory footprint and resource destruction, the point of having threads in spite of processes makes little to no difference. You will have to load in memory a different version of you application for every thread you spawn and you have to have a lot of control code. It will be slower, unsafer and probably as slower to unload.

Now take the process spawning approach.
You develop a simple working application, you spawn that 10 times in 10 different processes and you are done.
If you're talking about DLLs, the main process loads them and keeps them in memory. Links and stuff, you have a linker pool that all threads query or update. If there's instances where cross-thread references can't be allowed, you write the code so only one thread can do it at a time (not a lock, invoke the owning thread).

Spawning lots of processes is just developer laziness relying on the operating system for locks and catching appcrashes instead of doing it yourself (at a huge performance boost).
Posted on Reply
Add your own comment
Nov 23rd, 2024 09:11 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts