in reply to Re^3: Behavior of threads on XP-- system() works, backtic & popen don't...
in thread Behavior of threads on XP-- system() works, backtic & popen don't...
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Behavior of threads on XP-- system() works, backtic & popen don't...
by BrowserUk (Patriarch) on Jun 16, 2006 at 12:15 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 17:23 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2006 at 18:04 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 21:54 UTC | |
by BrowserUk (Patriarch) on Jun 16, 2006 at 22:14 UTC | |
| |
by ww (Archbishop) on Jun 16, 2006 at 18:29 UTC | |
by Sync (Initiate) on Jun 16, 2006 at 22:06 UTC |