as suggested many time sin the "main thread" of the dedicated server release ManiaPlanet 2 Beta Server 2013-02-27b ( http://forum.maniaplanet.com/viewtopic. ... 4&start=80 ) I am opening now an report thread for the memory leak issue here.
I'll try to collect all the important information here in one post to keep it more clean and more easy to get debug data for the team.
Status:
Probably FIXED since Release 2013-04-11.
See here for more details: http://forum.maniaplanet.com/viewtopic. ... 61&t=18545
Thanks Xavier!
2013-04-13: the memory handling is ways better now and the largest memory leak has been solved, but there is still a leaky code snippet. See: http://i.imgur.com/99GJz1h.jpg
Error:
Basically, this all is about the memory caused crash with the log message like that:
Code: Select all
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
So, there seems to be a memory leak under *nix systems,
as far as we know this is not concerning windows based systems.
Some of us are using CentOS (reported OS version: 6 x86_64) and some Debian/GNU Linux (reported OS version: 6.0.6 squeeze x86_64). In both cases the memory leak shows up.
- Debian 6.0.6 squeeze, x86_64 -> 64-Bit
- CentOS 6, x86_64 -> 64 Bit
- Debian 5.0 Highmem patch -> 32-Bit
- Windows XP, 32 Bit
- maybe: Ubuntu Server Edition 12.04.2, x86_64 -> 64bit
- 2013-02-27
- 2013-02-27b
We first reported this on Feb 28th 2013. The basic around this seems to be some missing delete instructions.
The memory increases when players are joining (well that works as expected^^),
but it does not decrease on player leave,
so I think it is keeping back all the player objects and never deleting one of it.
Same behavior about the maps.
As usual, on next map there is a allocation of memory, so it increases,
but there is no delete processed at the end of a map.
If there are only players leaving, say until zero players on the server, even though there are map changes (on an empty server), there won't be any new memory allocated, but also none freed.
The third abnormality we detected is, that a freshly started game server in a windows environment takes about 90-110MB of memory. Running on a *nix system, it takes 300-400MB from start up.
This problems seems not to occur with less than 10 players, but as my graphs are showing it would occur also then, as you can see the memory also increasing on low player counts, but it would take more time.
Testing for it:
If you want to test your system and log the memory behaviur, you can have a look here for linux systems:
http://forum.maniaplanet.com/viewtopic. ... 27#p154927
Additional information:
As analyzed the binary uses a 32 Bit architecture, so i386, as detected with "objdump", what is also the reason for the crash. The program gets out of address space what is in 32 Bit binaries 2^32 = 4096MB. Even though that's the reason for the crash, it is just the indicator that there is something terribly running wrong.
Code: Select all
ManiaPlanetServer
architecture: i386, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x08048140
There are some images out showing the malfunctions in memory handling.
http://img15.hostingpics.net/pics/15809 ... 396348.jpg
http://tm.bueddl.de//upload/crash-2013-03-06_1900.jpg
A live memory and player-count tracking for some of our servers is available here:
http://tm.bueddl.de/zero-stats/Very_Short
______________________________________________
Please add only a post if I was missing something really important. Otherwise I don't think that NADEO will carefully read that post, so keep it clean please
Kind regards,
Bueddl