in reply to Re^8: Time::HiRes sleep does not always work
in thread Time::HiRes sleep does not always work

*sigh*
  1. I provided enough information that you should have seen that most of those steps are not possible sources of the problem. Even if the network and webserver were not under our control (they happened to be), there were four calls through Win32::OLE. The call to bring up IE worked reliably. The call to navigate to the web page worked reliably. At this point all external networking, HTTP and so on has succeeded. Next came the call to print. That always went through. The call to close IE always worked.

    The point of failure was that IE did not always pay attention to the flag that was passed saying not to pop up a dialog box. That call is entirely within the machine in question. All of the external networking already successfully happened at previous steps.

    Now for all of the bugs in Win32::OLE, I've never heard anything indicating any way that code-paths within it could be non-deterministic. Besides, every call to Win32::OLE successfully went through, and the only the passing of a particular flag got messed up. While I can't prove it, I would be willing to bet large amounts of money that if the problem could have been debugged, we would have found that Perl reliably passed that call to Win32::OLE that reliably passed it into the appropriate underlying C library supplied by Microsoft. After all given that I had a reasonably simple single-threaded program, there is no possible cause to expect any non-determinism within that part of the code.

    If that belief is correct, then the flag must have been lost at some point after that. But every layer after that is part of Windows! Yes, including IE, which (as you say) is a multi-threaded GUI program designed for human interaction. (Which is, I suspect, the most likely location for the actual bug.) According to Microsoft, that is part of windows.

    So I've seen strong evidence that the problem arises in a piece of software that is (according to Microsoft) part of windows. How then am I wrong to blame windows for the problem?

  2. Hardware differences would be a reasonable explanation of that specific problem. It would not of other problems I've heard of though.

  3. Of course library version conflicts happen elsewhere. However most of us, including me, have had more grief from it on Windows than on other operating systems. Between other operating systems it varies widely. I have personally experienced and heard of more problems with it on Red Hat than Debian. Gnome has inflicted more of it on the Linux world than, say, Perl. However Windows has a history of being particularly bad in this regard.

  4. You got this one backwards. I was saying that uncertainty over whether your machine has been hacked or infected results in perceived non-determinism. And not that non-determinism causes security problems. Yes, security can be a problem with any system. However it seems to be more of a problem for Windows.

    Take, for instance, the case you bring up of Gary McKinnon. I can't find any records of what mix of machines he hacked into. But reading through things like this interview it looks like what he did was have a Perl script search for windows machines that had the default blank password for Administrator, and then he logged in. So it seems quite possible that none of the machines he accessed was any version of *nix. And if they were, then certainly the majority of them were not.

Now on to the default install. You are putting far too much fault on the manufacturers. While it is true that Dell actually configures the copies of windows on their machine, they are forced by contract to configure it within very tight guidelines provided by Microsoft. Microsoft took control of that after they got upset about pre-installs of Netscape on Windows 95 machines, and to the best of my knowledge have never given it up. Therefore no matter how competent they are, Microsoft makes them screw up.

Let me double-check that. (Searches.) Hmm. http://msdn.microsoft.com/en-us/isv/bb190477.aspx includes the sentence, OEMs cannot change any default settings in Windows, except as specifically described in Microsoft documentation or other contractual agreements. That doesn't exactly give the OEMs a lot of wriggle-room, does it? OK, that is specific to XP and to Windows Server 2003. But I think that it would take something big to make Microsoft change that policy. And I haven't heard of anything that could qualify.

So unless you can come up with something more recent, it looks to me like all of the problems with the default install of Windows are entirely Microsoft's fault. No matter how much the OEMs might wish things were different, they are prevented by contract with Microsoft from doing anything more serious for security than installing a third party anti-virus product.

  • Comment on Re^9: Time::HiRes sleep does not always work

Replies are listed 'Best First'.
Re^10: Time::HiRes sleep does not always work
by BrowserUk (Patriarch) on Aug 21, 2008 at 11:37 UTC

    1. Having made one long and painful foray into the world of driving IE from Perl via OLE (never again), and from the sounds of things in almost exactly the same time frame as you, I'll tell you that the cause of your problem was almost certainly cauased by unprocessed messages in IE message queue.

      If you could revisit that code now, and insert a few strategic Win32::OLE->SpinMessageLoop, you'd probably be able to cure that 1 in a 1000 event.

    2. However Windows has a history of being particularly bad in this regard.

      Yep. It was really bad in Win95/98/ME running third-party VB apps. That was quite a while ago...

    3. I was saying that uncertainty over whether your machine has been hacked or infected results in perceived non-determinism.

      That's like perceiving Fords as having bad fuel economy when you don't bother to keep your tyres correctly inflated.

    4. Read on a little further:
      OEMs may install third-party applications that launch in place of Internet Explorer, Outlook Express, Windows Media Player, Windows Messenger, or Windows Firewall as enabled by Windows registry settings and other documented mechanisms.

      So, the OEMs are not "prevented by contract with Microsoft from doing anything more serious for security than installing a third party anti-virus product."!

      If every OEM installed (say)the free version of ZoneAlarm and configured it, there would be no botnets. I don't know for sure that Zone Labs would allow them to do that for free, but it seems like a reasonable bet that the opportunity for product placement and potential upsell would be pretty pursuasive.

      That one step alone wouldn't make user experts or careful, but it would at least make them aware.

      And then there is the whole thing of "or as permitted in the license agreement.". I don't know what is in there as they are not published, but if you've ever used a newly purchased Sony VIAO laptop and seen the amount of customisation, and mostly useless preinstalled crap, on their systems, you'd think they could find the time to install a decent firewall, browser and email program, rather than a bunch of root kits.

    I'm no apologist for MS and roundly critisise them for their failings, but laying the blame for problems caused by badly installed/corrupted Perl modules, at their door, doesn't help anyone.

    Yes. Windows system dominate the bulk of cracked hacked and rooted systems, but then they dominate the bulk of all installed systems, by a huge margin. And if even the US military fail to secure them properly, how do you expect the average non-geek to do so?

    And as other systems and software become more prevalent, so they are being targeted. Witness the recent spate of Apple hacks; pdf and Flash hacks; Firefox hacks. The list goes on.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      And if even the US military fail to secure them properly, how do you expect the average non-geek to do so?

      You knew this was coming, with a setup like that...:-)

      By using a linux/unix type OS. You will notice that mission-critical military systems, do NOT use Windows....i.e. nuclear subs, etc. The use of Windows in the military was purely a political choice, because of heavy lobbying by Microsoft advocates to boost sales to the governement. The fact that they would risk the safety of soldiers, by relying on Microsoft security, is criminal in my opinion.

      And don't give me that argument that non-geeks can't do linux....it's just as easy as Windows, and installing is very easy nowadays. New Windows users go thru a heavy period of learning to point and click in the right places......linux is the same thing now.

      About the only argument Windows has going for it, is the ease of new driver installation, like Bluetooth, etc. But the reason for that is the sweetheart deals Microsoft makes with manufacturers, to prevent linux drivers from being released.


      I'm not really a human, but I play one on earth Remember How Lucky You Are
        There was actually a fairly good legal case that they were criminal. Many Windows machines were purchased for purposes that, by law, you needed C2 certified machines for. Small problem, only Windows NT 3.5 service pack 3 was so certified.

        That they pulled this with Windows NT 3.51 was illegal but not that bad since it was the opinion of the person who got the first certification (Ed Curry) that 3.51 would have an easy time getting certified. However this was around the time frame that Windows NT 4.0 came out. And there were architectural changes (specifically moving graphics drivers into ring 0) which made NT 4.0 impossible to certify to the C2 standard. Yet Microsoft so-advertised 4.0 machines, and sold them to government offices that by law required that certification.

        And this was not just in roles where security didn't matter. For instance in 1998 the USS Yorktown was left stranded dead in the water and needed to be towed to port because its Windows NT based control system BSODed. If that ship, and ships like it, had been in a battle situation, how many lives would have been lost?

        Ed Curry pointed this out, and Microsoft destroyed his company in one of the nastiest displays of corporate politics that I've heard of. For example after his company had folded he got a job as a security expert. Before he started work they called his boss to be and said, "How much do we have to pay you to make you fire him before he starts?"

        A legal case against Microsoft for their lies about C2 certification was getting under way when Ed Curry died from a heart attack. Certainly the stress of his mistreatment by Microsoft contributed to that. Without Ed to serve as a witness the case petered out.

        I knew Ed online and considered him a friend. Yet another reason I don't like Microsoft. As far as I am concerned they literally drove a friend to his death for daring to question their illegal business practices.

        You knew this was coming, with a setup like that...:-)

        Yup! :)

        And don't give me that argument that non-geeks can't do linux....it's just as easy as Windows, and installing is very easy nowadays.

        But with windows they don't have to install. And yes, there are OEMs that will preinstall some flavour of Linux. So why is the take up so low?

        The first part of the problem is:

        2X, 64 Studio, Absolute, AbulÉdu, ADIOS, Alinex, AliXe, ALT, Ankur Bangla, AnNyung, Arch, ArcheOS, Archie, Ark, ArtistX, AsianLinux, Asianux, ASLinux, ASPLinux, Astaro, Aurora, AUSTRUMI, B2D, BackTrack, Bayanihan, BeaFanatIX, BeleniX, Berry, Big Linux, BinToo, BioBrew, blackPanther, BLAG, Bluewhite64, BOSS, BU Linux, Burapha, Caixa Mágica, cAos, Càtix, CCux, CDlinux, Censornet, CentOS, ClarkConnect, Clonezilla, Clusterix, clusterKNOPPIX, Co-Create, College, Comfusion, Condorux, Coyote, CRUX, Damn Small, DANIX, DARKSTAR, Debian, Deep-Water, DeLi, DesktopBSD, Devil, Dizinha, DNALinux, Draco, DragonFly, Dreamlinux, dyne:bolic, Dzongkha, eAR OS, easys, eduKnoppix, EduLinux, Ehad, Ekaaty, eLearnix, Elive, elpicx, ELX, Endian, EnGarde, Epidemic, ERPOSS, Euronode, Everest, Evinux, EzPlanet One, Famelix, FaunOS, Fedora, Fermi, Finnix, Fluxbuntu, Foresight, FreeBSD, Freedows, Freeduc, FreeNAS, FreeSBIE, Freespire, Frenzy, Frugalware, FTOSX, GeeXboX, Gelecek, Gentoo, GentooTH, Gentoox, GEOLivre, Gibraltar, gNewSense, GNIX, gnuLinEx, GNUstep, GoblinX, GoboLinux, gOS, GParted, Grafpup, Granular, Greenie, grml, Guadalinex, Haansoft, Hacao, Helix, Hiweed, Honeywall, How-Tux, IDMS, Impi, IndLinux, Inquisitor, INSERT, Insigne, IPCop, JackLab, JoLinux, Julex, K12LTSP, Kaella, Kalango, KANOTIX, Karamad, Karoshi, KateOS, K-DEMar, Kiwi, Knoppel, Knopperdisk, KNOPPIX, KnoppMyth, KnoSciences, Komodo, Kubuntu, Kurumin, Kwort, L.A.S., LFS, LG3D, LinnexOS, Linpus, LinuxConsole, Linux-EduCD, linuX-gamers, Linux+ Live, LinuxTLE, Linux XP, Litrix, LiveCD Router, LiVux, LliureX, Loco, Lunar, m0n0wall, Magic, Mandriva, MAX, Mayix, Media Lab, MEPIS, MidnightBSD, MilaX, Mint, Miracle, MirOS, MoLinux, Momonga, Morphix, Muriqui, Murix, Musix, Mutagenix, Myah OS, myLinux, Myrinix, Mythbuntu, MythDora, Nature's, NeoShine, NepaLinux, NetBSD, NetSecL, Nexenta, Niigata, NimbleX, Nitix, Nonux, Novell SLE, NST, nUbuntu, NuxOne, Olive, OliveBSD, OLPC, Omoikane, O-Net, OpenBSD, Openfiler, OpenGEU, OpenLab, OpenLX, openmamba, OpenNA, OpenSolaris, openSUSE, Openwall, Ophcrack, Oracle, PAIPIX, paldo, PapugLinux, Pardus, Parsix, Parted Magic, PC-BSD, PCLinuxOS, PelicanHPC, Penguin Sleuth, Pentoo, pfSense, Pie Box, Pilot, Pingo, Pingwinek, Pioneer, Plamo, PLD, Poseidon, pQui, Protech, PUD, Puppy, QiLinux, Rails Live, RAYS, Red Flag, Red Hat, redWall, Resulinux, RIPLinuX, ROCK, Rocks Cluster, RoFreeSBIE, ROSLIMS, rPath, RUNT, Sabayon, SAM, SaxenOS, SchilliX, Scientific, Securepoint, Shift, sidux, Skolelinux, Slackintosh, Slackware, Slamd64, SLAMPP, Slax, SliTaz, SME Server, SmoothWall, SoL, Solaris, Sorcerer, Source Mage, StartCom, STD, StressLinux, STUX, SuliX, SuperGamer, Swecha, Symphony OS, SystemRescue, T2, TA-Linux, TEENpup, TFM, Thinstation, Thisk, Tilix, TinyMe, tinysofa, Topologilinux, Trinity, Trisquel, trixbox, TrueBSD, Truva, TumiX, TupiServer, Tuquito, Turbolinux, Ubuntu, UbuntuME, Ubuntu Studio, Ufficio Zero, UHU-Linux, Ulteo, Ultima, Ultimate, Untangle, Userful, Ututo, Vector, Vine, Vixta.org, VMKnoppix, VNLinux, Voltalinux, Vyatta, Wazobia, Webconverger, White Box, WIENUX, Wolvix, Xandros, X-Evian, Xfld, X/OS, Xteam, Xubuntu, Yellow Dog, Yoper, Zenwalk, ZoneCD...

        And that's without really trying.

        If the geeks can't decide on what Linux is or should be, how do you expect nanny to?

        Another part is all those incompatible application installation tools: APT, DEB, RPM, Portage, pkgtools, URPMI, SMART, YUM, YaST...

        Then there are the forks, instabilities and developer infighting...


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.