View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004930||Multi Theft Auto : San Andreas||Server||public||2009-09-01 20:04||2009-09-29 21:59|
|Target Version||1.0.1||Fixed in Version||1.0.1|
|Summary||0004930: Server freeze and download problem with multiple linux servers|
When running 2 or more linux servers (and seperating the ports in the config file) only the server that is started first will work 100%. All other servers will be unable to send files to the clients connected with an error #0-52.
When trying to access the webinterface trough a browser of the second server, that second server will also freeze causing a timeout for the people connected to it.
#0 0xb7f75424 in __kernel_vsyscall ()
|Tags||No tags attached.|
The recvfrom call is blocking, indicating a non-blocking socket.
One problem may be in line 38, where the O_NONBLOCK flag is set: flags should be set based on the old/current flags (fcntl F_GETFL or'ed with O_NONBLOCK) to prevent the overriding any old flags.
The reason for the 1st server to work is because the socket that is created and polled by CLanBroadcast is global (the same for all servers on the machine: SERVER_LIST_BROADCAST_PORT on UDP). When another instance is started, something gets messed up.
Temporary fix for this problem would be to disable LAN broadcasting in your configuration file:
Confirmed problem is the following line:
setsockopt ( m_Socket, SOL_SOCKET, SO_REUSEADDR, "1", sizeof ( "1" ) );
(Passing in "1" is invalid; should be an int *)
Fixed in r1627.