View Issue Details

IDProjectCategoryView StatusLast Update
0004930Multi Theft Auto : San AndreasServerpublic2009-09-29 21:59
ReporterBlokker_1999Assigned ToIJs 
PriorityhighSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0 
Target Version1.0.1Fixed in Version1.0.1 
Summary0004930: Server freeze and download problem with multiple linux servers
Description

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.

Additional Information

stacktrace:

#0 0xb7f75424 in __kernel_vsyscall ()
#1 0xb7d19858 in recvfrom () from /lib/i686/cmov/libc.so.6
#2 0xb736c266 in CLanBroadcast::DoPulse () from /opt/mta-server2/mods/deathmatch/deathmatch.so
#3 0xb734bca5 in CGame::DoPulse () from /opt/mta-server2/mods/deathmatch/deathmatch.so
#4 0xb73183f4 in CServer::DoPulse () from /opt/mta-server2/mods/deathmatch/deathmatch.so
#5 0xb7781968 in CModManagerImpl::DoPulse () from ./core.so
#6 0xb7782763 in CServerImpl::MainLoop () from ./core.so
#7 0xb7782da5 in CServerImpl::Run () from ./core.so
#8 0xb778332e in Run () from ./core.so
#9 0x08048adc in ?? ()
#10 0xb7c4e455 in __libc_start_main () from /lib/i686/cmov/libc.so.6
#11 0x08048821 in ?? ()

TagsNo tags attached.

Activities

IJs

2009-09-01 20:16

administrator   ~~0010391

Last edited: 2009-09-01 20:21

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.

IJs

2009-09-01 20:22

administrator   ~~0010392

Temporary fix for this problem would be to disable LAN broadcasting in your configuration file:

<donotbroadcastlan>1</donotbroadcastlan>

IJs

2009-09-01 21:02

administrator   ~~0010393

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.

Issue History

Date Modified Username Field Change