openlierox
openlierox copied to clipboard
Server hangs when shutting down
After a dedicated server has been online for a long time, it often hangs when it's shut down. It apparently waits for something to happen at the master server. Messages like these are printed to the console (the number of threads may vary):
W: ThreadPool: waiting for 10 threads to finish: W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: thelobby.altervista.org/server/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: thelobby.altervista.org/server/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working W: thread CHttp: server.openlierox.net/svr_register.php?port=23400&addr=127.0.1.1 is still working
Yes, it should not hang. Seems that the CHttp code can end up in a hanging state. For how long does it hang?
I'm not sure when I will have time to debug this myself. Feel free to debug it yourself.
It often hangs for a very long time, several minutes at least, but longer than I'm willing to wait anyway. It happens with 0.58 at least. I haven't tested 0.59.
Also, there might be a bug in the master server. I'm not sure if it's related to this. Here's my message which I sent to DC via LXA PMs a while ago:
############################################################### I just noticed that there seems to be a bug in the master server (openlierox.net/server). I opened this site and saw my dedicated servers in the list even though I shut them down more than 24 hours ago.
Then I went to the master server page and the servers were listed there as well. But not in the TheLobby master server page.
I started OLX and opened the server list. The servers were not listed and when I came back to the master server page, it didn't show them either. So apparently, the master server doesn't update its list unless a client loads the list from it. That master server is not used by most clients so it's possible that no one has used it since yesterday.
There's also a bug of some sort in OLX which occurs on dedicated servers that have been online for a long time. It's related to server registration and it causes OLX to hang when the quit command is issued. I'll post a report when I get back home and get the console output. ###############################################################