I'm guessing that SMTPRCV.EXE is dumping to a drwstn32.log and is providing
some kind of information in there somewhere.

When I write code for LCC these days, I compile with the built-in debug and
line number support turned on during testing.  With that it tells me where
in my code, which function and which line the crash occurred.  The
debugger's compiled right into the binary, so a non-LCC user can see this
information.  Don't modern versions of Delphi include this kind of debugging
support?

At least with that, the folks who are getting crashes could at least tell
Klint where in the code it's crashing and why.  It will also help if the
code in question wasn't running as a Service (smtprcv -debug as pointed out
earlier), or if running as a Service have "Interact with Desktop" turned on
so a debug window will at least display itself.

>From observing the comments I've read so far, it looks like a problem with
two or more threads colliding on a bit of shared data, and there isn't a
working locking mechanism (mutex / semaphore) used to prevent that.  A
multi-processor system seems to have more trouble, probably because there's
more of a chance of thread collision on that.

What kind of thread functions come with a current Delphi environment?  Is
there a special version of CreateThread() provided?  Are there provisions to
use locking (mutex/semaphore/criticalsection/etc) built in or are you
required to use the Win32 functions such as WaitForSingleObject() yourself?
Also beware that some of these things are NT4 or Win2K specific, such as
TryEnterCriticalSection() which is NT4 specific.

I couldn't read Delphi source to save my soul, but if this were C code I'd
look for every bit of data that could conceivably be shared between threads
and make sure there's a lock of some kind on them, depending on the nature
of what's being shared.  This especially includes log file handles.
Alternately, try to make as much stuff not shared as practical, by making
some global variables local variables instead.  Or do both.  If stuff can be
read by multiple threads safely but only written once, this is tricky in
Win32 (it was easier on the Amiga because it was possible to have multiple
read locks on something but only one write lock - on Win32 you'd need both a
semaphore and a mutex to accomplish the same thing).

--
PGP key (0x0AFA039E): <http://www.pan-am.ca/[EMAIL PROTECTED]>
What's a PGP Key?  See <http://www.pan-am.ca/free.html>
GOD BLESS AMER, er, THE INTERNET. <http://vmyths.com/rant.cfm?id=401&page=4>

This is the discussion list for the IMS Free email server software.
  To unsubscribe send mailto:[EMAIL PROTECTED]

            Delivered by Rockliffe MailSite
           http://www.rockliffe.com/mailsite
                Rock Solid Software (tm)

Reply via email to