Subj : Re: Hyper Threading / Multi-Threaded Queue / Application Freezes To : comp.programming.threads From : doug Date : Tue Apr 12 2005 07:34 pm "hibiki" wrote in message news:425C11B1.70708@9online.fr... > Joe Seigh a écrit : >> On 12 Apr 2005 07:34:05 -0700, Shaw wrote: >> >>> Is there a problem with critical sections and multi threads on HT >>> machines? Anyone had similar problems to this before? >>> I can post code snippets if needs be... >>> >> >> How many newsgroups have you multi-posted to? Has your problem been >> solved yet? I don't want to spend time answering your >> question if it has. It's pretty annoying when that happens. >> > I had lots of problems with HT machines and multithreaded applications. > Most of the time it's a ***Segmentation fault. > It seems the problem comes from a combined use of a recent kernel and an > old version of gcc (for example). > If you install a kernel that does not support HT, the problem disappears > (but it's not really what you want, i think...) > > -- > Salutations, > > Joachim Naulet > > 06 14 90 06 21 > http://jnaulet.no-ip.com He's using MFC, so I'm guessing it's Win32. I've heard of no problems that would cause a process to stall for that long on HT. Still, it's not impossible. My friend just had a similar problem, which I fixed for him this morning. He'd put a deadlock in, which in an HT environment was much more likely to be hit. He'd run successfully on uniprocessor for moths before that. He'd spent a lot of time checking his semaphoring, but missed this. If you are on windows, and have access to visual studio, then I suggest you run the code under the debugger, with symbols turned on (i.e. standard debug). If it hangs, just break into it, and examine each thread callstack to see where it is. That should lead to you the problem fairly quickly. Of course, your milage may vary. Running under the debugger changes the test conditions, so you might not hit your problem. You could try attaching the debugger *once* it's hung. Again, ymmv. Best course is to scour that source code again and check your locking. Things like this only usually turn up once you've delivered to the customer/public (so you've caught it early :) Good luck, Doug .