Subject: | Locking issues |
We, at BBN Technologies, have been toying with IPC::Locker to solve
pretty massive network concurrency issues. Upon using it for a while, we
found that the server/client works fine for the most part. But at times,
some clients get stalled forever. We have not been able to debug this
problem but here is what we found-
If there are a lot (400+ clients) trying to talk to the server at the
same time asking for different locks, and if three or more clients ask
for the same lock at the same time and are setup to be blocking, then
this is what happens:
Lets say A,B,C are three clients requesting the same lock at the same
time. The server serves A and puts B and C into waiting. Once A is
finished with the lock, it serves B with the same lock. In the meantime,
client D also requests the same lock from the server. After B, the
server serves D with the lock but forgets to ever serve C. So C goings
into infinite wait and stalls.
I haven't had a chance to look at the server code but will try doing
some debugging at our end to resolve this issue.
Thanks,
Krishna