Vanilla List Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Serious bug in INL Robot



While doing some testing for allowing cambot recordings of INL games,
I ran across a bug that shows up with overtime.  If OT ends without a
winner, there is a possibility that the server will get stuck in an
endless loop, spawning new processes like mad.  The client will see a
bunch of "-- game ran out of time without a winner --" messages.

If you want to try this out, be prepared to kill the robot process
immediately.

The problem occurs because the end_tourney script is called inside of
inlmove().  If the script doesn't finish before the next alarm (1/5 of
a second), inlmove() gets interrupted before it can unset a flag
(S_OVERTIME), so the server keeps on trying to run the end_tourney
script.

I think the fix should be to ignore SIGALRM at the start of inlmove(),
and set SIGALRM again at the end of inlmove().  I tested this, and it
seems to work OK.  The same thing should probably be done for move()
in daemonII.c, just for safety's sake.

If I get some agreement (or lack of disagreement), I'll update the
source in CVS.

-Jeff