Hokay-- tried it on another machine, also a 2.8GHZ hyperthreading box like the one that initially showed the problem. There however, I installed AS817. Almost the same problem-- got through the System() portion of the first two threads, then hung when on my original system it only got through the first thread's system() portion.

As both of these machines are hyperthreading, I decided to disable hyperthreading on the second machine in the BIOS and try it. Works better, but the very first time I ran it, it hung after the first thread's system(). After that, I wasn't able to get it to hang readily-- it ran fine several times in a row... Seems like a timing problem, so I created a simple .bat file:

:LOOP perl threadtest.pl goto LOOP

and ran it. Ran for a minute or so running the complete test multiple times, then finally hung-- though this time about in the middle of the various tests-- several system/bactic/popen's ran ok then it hangs. This is with hyperthreading disabled.

Appears to be a race or timing problem of some kind, possibly exacerbated by hyperthreading, but apparently not caused by it...

Makes me wonder if system() might also have the problem but less so-- will run some loop tests with just that to see if it will ever hang...

Update: Haven't seen the system() only version hang after looping for quite some time, while not definitive it's still a good sign as far as that is concerned. Also tried the full test on a 1.79GHZ box that doesn't have hyperthreading hardware, and after a dozen or so loops it hangs too. Yet to find a machine it doesn't hang on within a couple dozen loop iterations...

-- Sync

In reply to Re^4: Behavior of threads on XP-- system() works, backtic & popen don't... by Sync
in thread Behavior of threads on XP-- system() works, backtic & popen don't... by Sync

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.