FS#3909 - Server hangs when client is joining, 100% cpu usage
Attached to Project:
OpenTTD
Opened by Dolly (dolly) - Sunday, 27 June 2010, 14:35 GMT
Last edited by Remko Bijker (Rubidium) - Tuesday, 29 June 2010, 21:15 GMT
Opened by Dolly (dolly) - Sunday, 27 June 2010, 14:35 GMT
Last edited by Remko Bijker (Rubidium) - Tuesday, 29 June 2010, 21:15 GMT
|
DetailsThis bug cannot be easily reproduced on real server, because this situation is quite rare. Sometimes it takes days to trigger this on my servers.
When new client is joining server game server just hangs up in infinite loop with 100% cpu usage. 1.0.0 is the last stable version without this bug. This behavior is triggered in NetworkSyncCommandQueue() function when there are some commands on _local_command_queue that should be copied to joining client command queue. When the command is copied pointer reference to next command is not cleared and client command queue has now wrong reference to commands in _local_command_queue which causes infinite for-loop in NetworkSyncCommandQueue() function. Attached patch should fix the problem. |
This task depends upon
Closed by Remko Bijker (Rubidium)
Tuesday, 29 June 2010, 21:15 GMT
Reason for closing: Fixed
Additional comments about closing: In r20035. Thanks for the diff.
Tuesday, 29 June 2010, 21:15 GMT
Reason for closing: Fixed
Additional comments about closing: In r20035. Thanks for the diff.
loop_fix.patch