Discussion:
multiprocessor emulator
(too old to reply)
code hacker
2007-05-28 09:57:01 UTC
Permalink
Our application is crashing only on a clien't eight processor production
server. Since we don't have our own eight processor server, we are looking
into software simulation. Can someone please suggest a commercial/public
domain emulation software that will allow us to simulate the execution of our
existing windows application in an 8 processor scenario?
Nathan Mates
2007-05-28 16:49:20 UTC
Permalink
Post by code hacker
Our application is crashing only on a clien't eight processor
production server. Since we don't have our own eight processor
server, we are looking into software simulation. Can someone please
suggest a commercial/public domain emulation software that will
allow us to simulate the execution of our existing windows
application in an 8 processor scenario?
Given the above description, odds are, you're misusing
threads. Most people do the first few times they do so. Threads can
cause a LOT of very subtle timing and interaction issues that don't
show up on 1-2 CPU boxes. I much prefer code that's very black and
white-- it works, or fails -- hard and instantly. Threads allow you to
write code that allows way too many bugs to lurk for a long time. I'm
not saying that I'd forbid all threading, but I'm saying that they
allow you to shoot yourself in the foot in new and creative ways.

What I'd do is (1) try to use minidumps or other callstack writing
code so that you can get some info as to where it happened. You
*REALLY* want this, even w/o multithreading/multi-CPU environments in
the mix. There's some sample code at
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp for
writing minidumps. For callstack writing, see things like
http://www.codeproject.com/debug/extendedtrace.asp?print=true and
http://www.codeproject.com/cpp/exception.asp?df=100&forumid=3163&exp=0&select=665514

Next, (2) Do some code reviews of any code related to threads
and/or processes. Get more pairs of eyeballs looking into how things
are done. Look to see if you need more critical sections in the code
or the like. (3) As a final, very rude hack to try and simulate
8-CPUs, randomly bump thread priorities up and down. Use
SetThreadPriority() or SetPriorityClass() to tweak things. You're
not going to get very reliable simulations. Welcome to threads. :(

Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Loading...