SeattleTestbed / repy_v2

Seattle Testbed's Repy ("Restricted Python") sandbox, version 2
MIT License
12 stars 50 forks source link

Check for previously noted socket race condition #120

Open aaaaalbert opened 8 years ago

aaaaalbert commented 8 years ago

An old wiki page claimed:

There exists a potential race condition while repy attempts to cleanup a network socket.

Assume repy is bound to the IP/Port tuple (X,Y) and it closes the socket. If another process binds to (X,Y) while repy is waiting for the cleanup to occur it will appear as if the OS has not yet cleaned up the socket, and repy will block indefinitely. This is a very rare bug, and is hard to trigger since repy checks 5 times per second for the socket cleanup.

Let's check if this problem really / still exists.