[Uni-verse] possible maxbug

Martin martin.schlingmann at tii.se
Fri Mar 24 19:01:28 CET 2006


Hi.

> > I normally experience a lot of server crashes.
> 
> Its funny because i don't think i have had a server crash in the last 6
> months.

Well, when running on Intel Win32's (with fresh compile) I usually get a lot
of crashes. However after we made some changes so we control threads etc,
the server crashes less.

> > 1. Server crashes when running it on a too-fast computer and/or dual-
> core
> > machines under Win32.
> > I am not joking, we have tested several machines and this is always
> > reoccurring, we also tested this in conjunction with different network
> > speeds etc.
> 
> Well i do have a suspicion. My guess is that the machines you are
> running on are
> using intel CPUs. I have experienced a problem in my apps regarding
> timing using
> the query performance counter. It seams to wrap in some mysterious way
> that
> doesn't happen on AMD CPUs. It is possible that this problem gets worse
> when
> you have a CPU that closes on on 2^32 cycles per second. To see if you
> have the
> problem just start Connector and see in the intro motion is smooth or if
> it
> jerks every second or so. The code that makes this timing can be found in
> betray but is an exact copy of the one in verse.

Yes, Win32(WinXP) on Intel machines.
Query Performance counter... but you have to specifically ask for the qp
counter in your code under win32. You don't get it out of nowhere.
I usually use it without any problems, on the opposite actually since it has
a very nice resolutuion, and I guess more or less all real-time
systems/games under win32 uses it.
But it might certainly be some timer issue.

 
> > 2. Make sure you are not running the server in a debug-compiled version
> on
> > Win32 machine (It normally crashed due to some strange assert's).
> 
> I frequently do, never had a problem. Probably the intel bug gets more
> aggressive in debug mode.

Nope, it crashes here, but it is small dirty things in the code.
For example you get a run-time failure check (You use the variable 'drag'
without initializing it in some file at line 121...) and if you have a
debugger installed it will break the app.
This will halt/ throw (asm...3) an exception.

> 
> > 3. The verse client/lib is NOT thread safe and normally the server
> crashes.
> 
> No it is not, and it has never been. Perhaps we should have communicated
> that
> better. is it in the spec? We have debated making it thread safe but the
> problem is that we would need mutices and that would create dependency's,
> and
> possibly portability problems. We have talked about letting the user
> create
> macros that would insert user provided mutices in to verse. Is this
> something
> desirable?

Well, I think most applications that will use verse are multithreaded.
But it isn't a big thing to implement on top of it (if you know about it),
but I certainly think a library like verse should be.
Mutexes, why? ... couldn't you do it with simple critical sections etc? Some
kind of read/write/access lock?

> > Also, if you have several connections with the same user/pwd.. the
> server
> > sometimes crashes on win32.
> 
> This is impossible the user name and password is never stored, used, or
> compared
> in any way. It must be something else.

Ok, it's defiantly something else.
Hmm.. maybe this is an old error that doesent happened anymore since we
changed the thread safety.

Greets
Martin





More information about the Uni-verse mailing list