Mir

Comment 1 for bug 1517781

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

The problem is a double close of an fd in our test framework.

The AsyncServerRunner is creating a client socket which it then passes to the client. However, the server keeps ownership of the socket fd, and the client also thinks it owns the passed fd, so eventually both the server and client close the same fd number.

Between the two close operations, our events dispatchers may create an eventfd or epollfd (depending on how threads are scheduled), getting the fd number of the recently closed socket. When the second close operation happens it ends up closing the eventfd/epollfd instead, wreaking havoc on the unsuspecting distpatchers.