I got around it by making nothing else dependent on that job finishing in a timely manner, emailing someone if the alert came up, then having someone manually check that alert every week or two. Oh, and I pushed the person who developed the web page to make a standards compliant version so that we could just use html2pdf and get rid of the Windows dependency. (That happened about 6 months later, and I was very glad when it happened.)
According to Microsoft, every layer from Win32::OLE on was part of and integrated with Windows. Including IE. So when I say that this was non-deterministic behaviour within Windows, I am using Microsoft's definition of Windows. I do not know why it happened. It "smells like" a race condition but I cannot prove that.
Admittedly this was some years ago. As you may know, I avoid dealing with Windows whenever I can. The problems may have all gone away, and I wouldn't know.
However I doubt it. Every so often I hear stories that confirm my low opinions. For instance with the initial release of Vista I heard complaints from people testing it that they couldn't get the same result twice from an install. More specifically, they could script an install of the whole OS and applications. Start with 2 factory machines that were supposedly identical. Do identical installs. And they would wind up with 2 machines that would misbehave in different ways. Of course this was before Vista was in wide release and I am sure it has improved since, but still a non-deterministic install process does not inspire confidence.
If I was to guess a cause for these problems, I would say that it is a combination of heavy multi-threading and a dysfunctional development process. If you want to know about the latter, you could do worse than to occasionally read the discussions from insiders at http://minimsft.blogspot.com/. I know we disagree on multi-threading, but read through The Problem with Threads and tell me whether you can honestly disagree with the technical content of that paper. (I know you will disagree with the tone, so please identify technical content you disagree with.)
A second cause of problems is that behaviour may be deterministic, but is affected by things outside of our knowledge. DLL hell comes to mind as a common cause, but it is far from being the only one. For instance many home users have no idea when their computer is captured and made part of a bot net. How many of us don't know someone whose computer mysteriously got corrupted and crashed? How often is it because of computer viruses and worms? Even if the behaviour is deterministic, from the operator's point of view, it isn't. If you're like my nanny your computer starts off fine, gets slow, then at some point won't turn on. For no apparent reason.
And before you say it, yes I know that other operating systems like Linux use multi-threading. However by and large they use it less than Windows does. YAnd their internal development processes seem to be in better shape. Yes, they have security problems. But those are less exploited than Windows is. The result that I haven't experienced a similar amount of pain from non-deterministic behaviour on Linux that I remember from Windows.
In reply to Re^7: Time::HiRes sleep does not always work
by tilly
in thread Time::HiRes sleep does not always work
by tone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |