Server code
Today I am working on the server code. There is a “race condition” somewhere in the code which makes the servers to spiral down arbitrarily.
I have a fairly good idea where the culprit is. You have probably noticed that London sometimes stops in the middle of the night. It is usually London that stops for some reason. But today I got the same probnlem on the Stockholm server. The problem is relected to a so called select() call when receiving data from a socket. The race condition can occur if a signal comes before the select() is called so therefor POSIX has come up with an alternative call called pselect that also listens for signals. One thing I could try is to mask the signals before I make the select() call. We’ll see.
73
Kelly