03-04-2012, 11:14 PM
A quick overview of what thread locks what criticalsection
The deadlock is between ServerTickThread and cSocketThread
ServerTickThread callstack:
![[Image: Screenshot-2012-03-04_14.13.04.png]](http://dl.dropbox.com/u/27784874/ZScreen/2012-03/Screenshot-2012-03-04_14.13.04.png)
cSocketThread callstack:
![[Image: Screenshot-2012-03-04_14.14.23.png]](http://dl.dropbox.com/u/27784874/ZScreen/2012-03/Screenshot-2012-03-04_14.14.23.png)
Code:
ServerTickThread
Owns cServer::m_CSClients
Wait cSocketThreads::m_CS
cSocketThread
Owns cSocketThreads::m_CS
Wait cServer::m_CSClients
cServer::ServerListenThread
Wait cSocketThreads::m_CS // Doesn't really matter, but it blocks new clients
The deadlock is between ServerTickThread and cSocketThread
ServerTickThread callstack:
![[Image: Screenshot-2012-03-04_14.13.04.png]](http://dl.dropbox.com/u/27784874/ZScreen/2012-03/Screenshot-2012-03-04_14.13.04.png)
cSocketThread callstack:
![[Image: Screenshot-2012-03-04_14.14.23.png]](http://dl.dropbox.com/u/27784874/ZScreen/2012-03/Screenshot-2012-03-04_14.14.23.png)