OpenArena Message Boards

OpenArena => Technical Snafus => Topic started by: RMF on October 15, 2009, 01:28:01 AM



Title: 26+ players server crash
Post by: RMF on October 15, 2009, 01:28:01 AM
I got this eversince I run servers, but it never was a real problem. But now I want to organise a big match (for OAchallenge (http://oachallenge.webs.com)) where probably will me more players than my 26 limit. This is a part of the console log when testing with some bots:
Quote
addbot assassin 5 blue
loaded cached skill 5.000000 from bots/default_c.c
loaded cached skill 5.000000 from bots/sergei_c.c
ClientConnect: 26
ClientUserinfoChanged: 26 n\Assassin\t\0\model\assassin\hmodel\assassin\c1\4\c2\5\hc\100\w\0\l\0\skill\ 5.00\tt\0\tl\0
broadcast: print "Assassin^7 connected\n"
broadcast: print "Assassin^7 entered the game\n"
ClientBegin: 26
Kill: 12 16 3: Assassin killed Assassin by MOD_MACHINEGUN
Item: 3 ammo_lightning
Item: 1 ammo_lightning
Item: 20 item_health
Item: 20 item_health
Item: 2 item_health
Item: 26 weapon_plasmagun
Item: 2 item_health
Item: 19 weapon_rocketlauncher
Item: 1 weapon_lightning
Kill: 18 8 3: Assassin killed Assassin by MOD_MACHINEGUN
Award: 18 1: Assassin gained the EXCELLENT award!
addbot assassin 5 blue
********************
ERROR: G_Alloc: failed on allocation of 9088 bytes

********************
----- Server Shutdown (Server crashed: G_Alloc: failed on allocation of 9088 bytes
) -----
Sending heartbeat to dpmaster.deathmask.net
Sending heartbeat to dpmaster.deathmask.net
==== ShutdownGame ====
ShutdownGame:
------------------------------------------------------------
AAS shutdown.

Because it couldnt allocate the space I tried making the memory space bigger (com_hunkmegs;soundmegs;zonemegs all doubled or more), but that doesn't help. I got 3GB RAM at home, and where I just tried 4GB so that's not the problem.. Anyone another idea?

Btw I think it's possible because I saw ROFL|chatroom has 42 slots. Never seen it filled up though (once 20 or something, never more)..

Thanks in advance for any help :)

RMF


Title: Re: 26+ players server crash
Post by: andrewj on October 15, 2009, 05:38:18 AM
It seems the G_Alloc() memory is hard-coded at 256K and cannot be changed by console vars.  You would have to compile your own qvms.

From code/game/g_mem.c :
Code:
#define POOLSIZE    (256 * 1024)

static char     memoryPool[POOLSIZE];
static int      allocPoint;

void *G_Alloc( int size ) {
    char    *p;

    if ( g_debugAlloc.integer ) {
        G_Printf( "G_Alloc of %i bytes (%i left)\n", size, POOLSIZE - allocPoint - ( ( size + 31 ) & ~31 ) );
    }

    if ( allocPoint + size > POOLSIZE ) {
      G_Error( "G_Alloc: failed on allocation of %i bytes\n", size ); // bk010103 - was %u, but is signed
        return NULL;
    }

    p = &memoryPool[allocPoint];

    allocPoint += ( size + 31 ) & ~31;

    return p;
}


Title: Re: 26+ players server crash
Post by: Cacatoes on October 15, 2009, 05:39:33 AM
There isn't anything special on Chatroom, fill it and that'll explode ;)


Title: Re: 26+ players server crash
Post by: sago007 on October 15, 2009, 10:25:37 AM
Btw I think it's possible because I saw ROFL|chatroom has 42 slots. Never seen it filled up though (once 20 or something, never more)..
Bots require more memory than normal clients. G_Alloc is only used on bots.


Title: Re: 26+ players server crash
Post by: RMF on October 15, 2009, 01:57:53 PM
ah okay, thanks all :)


Title: Re: 26+ players server crash
Post by: Marble of Doom on October 15, 2009, 05:45:11 PM
Sweet, can't wait to play!


Title: Re: 26+ players server crash
Post by: davidd on November 14, 2009, 06:40:10 AM
As soon as this is fixed i am going to run a splatter server, with 63 lowrank bots and only big maps haha

i think since the "128Mb is lots of mem" 1999 Q3 era, we can have more than 256K reserved for this how about 1M? 26*4 = 104 players (should be enough for everyone).

I heard from DSD that only bots alloc this mem, with so many client connecitons it did not crash.


Title: Re: 26+ players server crash
Post by: RMF on November 14, 2009, 02:13:06 PM
i think since the "128Mb is lots of mem" 1999 Q3 era, we can have more than 256K reserved for this how about 1M? 26*4 = 104 players (should be enough for everyone).
We probably don't reach 104 players online on average so 100 player spots should be enough :P


Title: Re: 26+ players server crash
Post by: davidd on November 16, 2009, 07:37:08 PM
maybe we can have way bigger maps that could support bigger player numbers?
I think it would be fun, if the server and network dont lag too much because of the amounts of information transmitted.