Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Microsoft Windows

Exponential Algorithm In Windows Update Slowing XP Machines 413

jones_supa writes "An interesting bug regarding update dependency calculation has been found in Windows XP. By design, machines using Windows Update retrieve patch information from Microsoft's update servers (or possibly WSUS in a company setting). That patch information contains information about each patch: what software it applies to and, critically, what historic patch or patches the current patch supersedes. Unfortunately, the Windows Update client components used an algorithm with exponential scaling when processing these lists. Each additional superseded patch would double the time taken to process the list. With the operating system now very old, those lists have grown long, sometimes to 40 or more items. On a new machine, that processing appeared to be almost instantaneous. It is now very slow. After starting the system, svchost.exe is chewing up the entire processor, sometimes for an hour or more at a time. Wait long enough after booting and the machine will eventually return to normalcy. Microsoft thought that it had this problem fixed in November's Patch Tuesday update after it culled the supersedence lists. That update didn't appear to fix the problem. The company thought that its December update would also provide a solution, with even more aggressive culling. That didn't seem to help either. For one reason or another, Microsoft's test scenarios for the patches didn't reflect the experience of real Windows XP machines."
This discussion has been archived. No new comments can be posted.

Exponential Algorithm In Windows Update Slowing XP Machines

Comments Filter:
  • by kthreadd ( 1558445 ) on Monday December 16, 2013 @05:00PM (#45708329)

    This is clearly the right time for Microsoft to completely rewamp the update system in XP; and what could possibly be better than to just remove the whole thing and import an already working package system from Debian?

    • by Anonymous Coward on Monday December 16, 2013 @05:05PM (#45708397)

      Yeah, four months before the final end of support date I'm sure they have a copious budget for massive rewrites on their three-major-versions-old legacy product.

      But good news: after next April, just kill off the update checker entirely, because there will never be an update again! Problem solved. You're welcome.

    • Screw compatibility, let's install Linux on all Windows XP machines just to keep this fanbody happy.
    • by Anonymous Coward on Monday December 16, 2013 @05:11PM (#45708493)

      The dependency system in dpkg has been shown to be powerful enough to express sudoku puzzles which then APT has to solve to resolve conflicts. Technically still potentially exponential with improper use (I trust Microsoft would find some such non-working model reliably).

    • Re: (Score:3, Funny)

      by mlw4428 ( 1029576 )
      That's right. I can just then run an apt-get dist-upgrade and I'll have a non-booting system in mere hours! No more waiting for pesky Windows releases.
    • by TheRealMindChild ( 743925 ) on Monday December 16, 2013 @06:04PM (#45709081) Homepage Journal
      It just isn't possible. There is a whole api (WUA) built on top of how it works now. Everything using it would fail if it moved to something different. That is, it is very evident that it was built with the update format currently in use to guide its direction. An emulation layer may not be possible, and even if it is, may not be more efficient than what is there now and also is work toward something that is EOL in 4 months.

      The current way it works now, is the client downloads wsusscn2.cab, which in turn contains package.cab (among many others), which contains package.xml. Package.xml contains the updates in such a way that is flexible in that it can address more than one OS/platform/application/etc per patch, or more than one patch per update, or more than one file per patch, and so on. The Update nodes only point to categories/patches/files/locations/prerequisites/revision/etc via ids which have to be looked up deep in the file. Right now, that xml file is over 65MB. It would have made this easy if it were stored in a relation database, instead of an xml file, but it isn't and like I said, the API was built around the source of the information being an xml file, among other things.
  • by s_p_oneil ( 795792 ) on Monday December 16, 2013 @05:03PM (#45708373) Homepage

    That's the best way to force users to upgrade that I can think of. They're already planning to end-of-life it. After EOL, they can simply start adding empty patches to the update system until it drives left-over XP users to upgrade. ;-)

    • by sconeu ( 64226 )

      Isn't EOL planned for April, anyways?

      If there's no more updates, what's the point of fixing the update mechanism?

      • by Selur ( 2745445 )

        probably all depends on how much pressure China and similar factions have on Microsoft to persuade them to expend the XP support,..

      • by TangoMargarine ( 1617195 ) on Monday December 16, 2013 @05:32PM (#45708697) Journal

        Mainstream support ended on April 14, 2009. They've been pumping the dead horse full of adrenaline ever since to keep it from falling over.

      • Isn't EOL planned for April, anyways?

        If there's no more updates, what's the point of fixing the update mechanism?

        There will be more updates. It just means that they won't be free after April. My company has already begun discussions with MS as to how much they will have to pay for those updates as the sheer number of computers and lack of staff means that the upgrade to Win7 will not be done by that time. Figure in all the various departments that have apps that won't run in Win 7 or can't be upgraded till capital budget has the money for the upgrades and that could take years still. I'm sure many other large corps ar

    • What's the point of running the update service after EOL?

    • Yep. If people haven't upgraded yet, making their computer as slow as molasses is a good means of forcing them to get around to it, finally.
      • by mlts ( 1038732 ) on Monday December 16, 2013 @06:00PM (#45709017)

        It killed my Web browsing virtual machine until I used an offline update utility and fixed it manually.

        Yes, XP needs to die, because it is made to deal with threats from 2000-2001, with added security patches strapped on as the need arose. Windows 7 and newer help address this issue.

        However, I know plenty of places where XP is used that can't be fixed by a upgrade or platform change. Embedded stuff for example. Another are dedicated machinery that interfaces with a PC, does have newer drivers, and likely will not get newer drivers. A friend's $3000 sewing machine is one example.

        Another person's CNC wood mill is another item. So, those machines are stuck with XP pretty much for good, because who is going to throw out a perfectly functioning mill just because it requires a legacy OS? Even some CD/DVD duplicators only will interface with XP, and moving to Vista or newer will be an exercise in futility.

        So, XP in a lot of cases is here to stay, for better or worse.

        • A friend's $3000 sewing machine is one example.

          Another person's CNC wood mill is another item. So, those machines are stuck with XP pretty much for good, because who is going to throw out a perfectly functioning mill just because it requires a legacy OS?

          There are still options. You'd be surprised how much old oddball hardware *someone out there* has written Linux drivers for.

          Failing that, there's Wine. Or XP emulation mode in Win 7.

          Or pay a homeless developer some cash & Red Bull to write you some new software. CAM has been around forever and it's not complicated.

        • Re: (Score:3, Insightful)

          Yes, XP needs to die, because it is made to deal with threats from 2000-2001, with added security patches strapped on as the need arose. Windows 7 and newer help address this issue.

          Help address this issue..except not really. :/ Windows 7 was made to deal with threats from 2009-2010, with added security patches strapped on as the need arose. Windows 8 was made to deal with threats from 2012-2013, with added security patches strapped on as the need arose. You see a trend? The biggest things that consisten

        • by ultranova ( 717540 ) on Tuesday December 17, 2013 @06:53AM (#45712559)

          Yes, XP needs to die, because it is made to deal with threats from 2000-2001, with added security patches strapped on as the need arose. Windows 7 and newer help address this issue.

          No, not really. Windows 7's - and for that matter Linux's - security model is centered around users rather than applications. It's designed for multi-user central computers of old, not modern single-user desktops that run random code downloaded from the Internet. It protects the system from user-level code, but your personal files are screwed, should any of it be malicious. And not even the system is really safe: a program asks for administrative privileges, and you have no option to give it "fake" permissions in its own little sandbox or even any way of knowing what it has done, even after the fact.

          Android comes closer, but still has the problem of not allowing you to fake permissions. I doubt that will change, it ultimately being a glorified data mining and ad delivery platform for Google.

          As for a better security model, I'd really like to see a "tree" of virtual machines, with every program running in its own leaf it can mess to its digital heart's contents and any changes being merged into upper-level machine only at the approval of said upper level. That way you could do away entirely with the concept of administrator - since every program is the master of its own virtual machine - and try out new programs safely, since no matter what devastation they cause it's limited to their own playpen.

    • by Tablizer ( 95088 )

      I've seen a similar pattern. A complaint about MS-Access not being able to handle a situation that most would consider "expected" or "normal", had the following reply from Microsoft (paraphrased):

      "MS-Access is not designed for high-end loads or processing. We instead recommend you upgrade to MS-Sql Server, which is a more powerful tool. Thank You, -MS"

      • by sconeu ( 64226 )

        However, that statement has been made about Access since version 1.0.

        • by Tablizer ( 95088 )

          Warning: Rant Ahead

          After MS effectively killed off the desktop-database competition, MS-Access mostly stagnated. I've seen silly bugs last for almost a decade.

          They mostly just shuffled the menus around (driving existing users nuts), and added an HMTL-like forms/report editor about 5 years ago. I prefer the older WYSIWYG editor for most tasks, which is only half supported now. WYSIWYG is more natural for fine control where managers want to squish as much as possible on a single page. (Whether that's a good h

    • Upgrading to Windows 7 or Windows 8 certainly fixes one issue, but it creates a whole new set of problems.

      1.) There is guarantee that this won't be a problem in Win7 or Win8. This only showed up when there were *Lots* of updates to IE. In three or four years, Win7 could have a similar problem, or at least a problem with similar symptoms.

      2.) Win7 did redesign the update process. (Actually Vista first showed up with it, but many people are skipping Vista altogether.) But in their great (for very, very small

  • by Anonymous Coward on Monday December 16, 2013 @05:06PM (#45708415)

    I saw this during video playback, checked to see why the video was barfing and saw the svchost.exe chewing up 100% just like they say. It didn't happen on boot. I think it can happen whenever Windows Update scans for updates.

    However, when I killed the svchost just to watch my video, I lost sound which made me think it had to be Media Player.

    Well, maybe it was; but eventually I found out about this bug and realized I had to just sit through it.

    The questions for me are "WTF does it do?", "Why does it have to walk this tree, and what is so bloody CPU intensive about it?" followed by, "Why does an update have to care what patches are superseded? As long as you're up to the latest patch level, it should be all good".

    I think the whole thing is fundamentally broken. You have your current version of $Thing, it depends on N other things which must be of a given version. When you upgrade $Thing you just check to make sure the things it depends on are there and if they aren't, then you get them. The old stuff? You just check to see what depends on it, and if there is no longer anything depending on it you can quarantine it. If anything tries to access a quarantined dependancy, then your dependencies are broken and you need to patch the app that tried to do that.

    I know I'm glossing over some things, and package management is not trivial; but there's no excuse I can see for exponentially growing scan algorithms.

  • by HideyoshiJP ( 1392619 ) on Monday December 16, 2013 @05:06PM (#45708423)
    I've noticed that this is an issue on Windows Server 2003 (I believe R2 included). I have noticed that this is less of an issue once IE8 is installed (this should have already been done by this point), but this is still definitely an issue. I will be glad when I am rid of this OS (soon!).
    • by jaseuk ( 217780 )

      This is probably an issue with every Windows operating system using the update services, it's only visible with XP as it's the oldest supported operating system, so it has many, many more patches.

      Jason

      • by Nemyst ( 1383049 )
        The update system was completely revamped with Vista so honestly you're doing a big assumption there.
  • On purpose? (Score:5, Interesting)

    by wjcofkc ( 964165 ) on Monday December 16, 2013 @05:06PM (#45708429)
    I'm really not sure if I would put it past MS or not to do this intentionally and leave it unfixed while reporting (lying) about trying to fix it in order to force the death of XP on schedule. It seems too obvious.
    • by X0563511 ( 793323 ) on Monday December 16, 2013 @05:21PM (#45708593) Homepage Journal

      I'm really - I mean really, uncomfortable with the thought of Microsoft planning this kind of thing 12 years in advance...

    • Never attribute to malice that which is adequately explained by stupidity.

      Bubblesort is a very easy algorithm to implement... and works well for a few entries.

    • I've thought the same thing, especially since I saw the delay go from nearly no delay to an hour delay from one month to the next. There was no "exponential Increase", it was more like a step function. That is why I think the update delay was intentional in order to push people off XP.
  • Ah that explains it (Score:4, Informative)

    by ArchieBunker ( 132337 ) on Monday December 16, 2013 @05:23PM (#45708621)

    I just put XP on an old laptop to run some specialized automotive software. This svchost bug has been bothering me ever since. If you kill the process it also takes out other services (like wifi).

    • My work computer has been cursed with this problem. Eventually it started locking up every patch Tuesday, so I just killed automatic updates..... problem solved. Something with the Dell OEM XP install is clearly fubared with regards to the actual patch service as manually installing an update causes the machine to lock up too. Rebooting causes an evil "We had to shut your machine down to protect its hardware" blue screen until I go into safe mode once and reboot again. IT will get around to it eventually. I
    • by bmajik ( 96670 ) <matt@mattevans.org> on Monday December 16, 2013 @05:30PM (#45708685) Homepage Journal

      one thing you can do to fix this is the following

      sc config wuauserv type= own

      (the space between "type=" and "own" is important)

      this tells the service manager to put windows update service (WUAUserv) into its own hosting process, e.g. a new/separate instance of svchost.exe

      Another service that can be implicated in updates is the "BITS" service. You can use the same command to isolate it also.

      Anytime I see a svchost.exe instance misbehaving I start isolating the services inside it and then seeing which individual service is being problematic.

      • Even better: install the latest Internet Explorer cumulative security update manually, then re-run Windows Update. It seems that if IE is fully up-to-date, WU can chew through the remaining updates much faster. Then you're good for another month.
  • Here's a radical idea: why don't they fix the stupid exponential algorithm rather than papering it over by trimming the lists?

    • Because there aren't enough months of Windows XP's extended support left for it to be worth fixing. Microsoft refused to fix a few bugs near the end of Windows 98's service life as well; see this story from June 2006 [slashdot.org].
    • by tlhIngan ( 30335 )

      Here's a radical idea: why don't they fix the stupid exponential algorithm rather than papering it over by trimming the lists?

      Because the product is obsolete and will be out of support in 4 months?

      That's like replacing the air conditioner In a car that's about to be sold or scrapped.

      Now, if you're talking about WIndows Vista or 7, then yes, it's a good idea to fix it. But for something already out of date and will be EOL'd, there's less justification.

  • by Naatach ( 574111 ) on Monday December 16, 2013 @05:40PM (#45708779)
    How many Microsoft Engineers does it take to change a lightbulb? None. They just redefine darkness as the new standard.
  • Of course Windows performance degrades over time.

    How else would they ever get anyone to upgrade? Remove the Start button?

  • I miss Windiz Update....
  • I run a small computer store and this issue has been driving me crazy the last few weeks, we have had a few XP machines come back because customers are complaining they are so slow! When we refurbished them before these patches they were fine! I have had to disable Windows update to fix the issue, not the best solution at all. 100% CPU from svchost.exe for hours, how can Microsoft mess up so bad..!
  • by ewhac ( 5844 ) on Monday December 16, 2013 @06:20PM (#45709267) Homepage Journal
    I couldn't tell you why, but I haven't (yet) observed the described behavior on my XP system. The auto-updater ususally settles down in a matter of minutes.

    No. In my case, it's trying to apply the .NET updates that completely murders my system. Apparently MS wants a gigabyte or so of free disk space on C:\ (and nowhere else) or the update will fail miserably. As it happens, my system partition has about 200MB free space, so the update disappears down a rabbit hole and never completes.

    I used to think it was because it needed a bunch of temporary disk space, so last night I changed the TMP and TEMP environment variables to point to a volume with tons of free space, rebooted (because, you know, it's Windows), set just one of the several .NET updates running, then went off to see The Hobbit. When I returned some three hours later, the update had hung, the disk was idle, C:\ had zero bytes free, and the system log was corrupted.

    Honestly, I don't know why anyone continues to be surprised by Redmond's rank incompetence...

    Schwab

  • by GumphMaster ( 772693 ) on Monday December 16, 2013 @06:45PM (#45709493)

    This has been happening on and off for more than a year. I found the last couple of times that it was helped if I manually fetched and installed the latest "Cumulative Security Update for Internet Explorer" for version 8 (http://technet.microsoft.com/en-us/security/bulletin/ms13-088 at time of writing). Never understood why; perhaps it allows a serious chunk of the search tree to be pruned quickly avoiding the exponential stupidity.

    If you need to stop the 100% CPU while you fetch this then Start -> Run, "Services.msc", locate and stop "Automatic Updates".

    • by snickers ( 36112 )

      I've also found that this resolves the problem. The key thing is to make sure it's the latest Cumulative Security Update for IE. For December this is MS13-097 (KB2898785).

      http://support.microsoft.com/kb/2898785/ [microsoft.com]

      I've seen lots of people say this doesn't work but it's because they are trying the October or November update.

  • I buy used Dell's from Weird Stuff Warehouse in Sunnyvale.
    http://www.weirdstuff.com/ [weirdstuff.com]

    I have a few projects that require a windows OS and can't run under wine. By buying a Dell from weird stuff, the OS is licensed to the machine. So it's little more than a convenience thing for me.

If you didn't have to work so hard, you'd have more time to be depressed.

Working...