Build 161 server memory leak

devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
edited January 2011 in NS2 General Discussion
Anyone else seeing this? My server is fairly quickly hitting the 2gb process limit then crashing.

If it helps, I can provide process memory dumps but please send me a PM if you want these (developers).
«1

Comments

  • Slickk-Slickk- Join Date: 2007-11-26 Member: 63019Members
    I'm hearing performance isn't great atm.

    I would start uploading the logs.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I'm not seeing it leak yet.. Still at about 465400 right now. Has a few users on it.
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    Unfortunately yes, I'm also seeing memory leaks that lead to a crash.

    <img src="http://img822.imageshack.us/img822/2575/graphm.png" border="0" class="linked-image" />

    Notice the memory stays level, when it first had players tonight at 7pm, memory remained constant.

    Looks like when the map changed or players left (?) the memory spiked up, then peaked a second time until it crashed at its limit of ~1.7GB or so.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    How often are those numbers recorded, can you zoom in? Im interested in when the players all dropped, which event occured first.

    Also, changed map? How do you do that?
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    It's sampled every 5 minutes (that graph is the highest zoom), I can get a breakdown of the samples on a per-5 minute basis but I'd have to dig them up atm.

    And sorry I meant when the map resets (players usually leave after a game if they're gonna etc) not map change.

    Also interesting that it chews 50% CPU (1 core) even when idle.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    That is strange, using 50%. I dont understand, Im assuming those times are in aus east, when did you do the 161 update? Is it that spiky section around 3:00pm?
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    The update was around 6pm I think, it's probably only been down for a minute or so during the update so it doesn't appear noticeably on the graph.

    No idea what the spiky section was at 3pm, pretty strange I agree.

    Let's see how it goes tomorrow I guess. Unfortunately the server crashes due to memory leaks again, not sure if your server is doing the same (rada sucks yeah?).
  • Slickk-Slickk- Join Date: 2007-11-26 Member: 63019Members
    <!--quoteo(post=1823569:date=Jan 12 2011, 02:13 PM:name=endar)--><div class='quotetop'>QUOTE (endar @ Jan 12 2011, 02:13 PM) <a href="index.php?act=findpost&pid=1823569"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That is strange, using 50%. I dont understand, Im assuming those times are in aus east, when did you do the 161 update? Is it that spiky section around 3:00pm?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Looking at the graph the memory spikes a couple of times after 7.00pm. I'm guessing that's when it patched.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1823492:date=Jan 11 2011, 09:24 PM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Jan 11 2011, 09:24 PM) <a href="index.php?act=findpost&pid=1823492"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Anyone else seeing this? My server is fairly quickly hitting the 2gb process limit then crashing.

    If it helps, I can provide process memory dumps but please send me a PM if you want these (developers).<!--QuoteEnd--></div><!--QuoteEEnd-->
    Is there anything in the log? We saw a problem like this once in our testing, but after restarting the server is stayed at a consistent ~500 MB. We'll be looking into the cause of that for the next build.
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1823616:date=Jan 12 2011, 01:31 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Jan 12 2011, 01:31 PM) <a href="index.php?act=findpost&pid=1823616"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Is there anything in the log? We saw a problem like this once in our testing, but after restarting the server is stayed at a consistent ~500 MB. We'll be looking into the cause of that for the next build.<!--QuoteEnd--></div><!--QuoteEEnd-->

    A bunch of this: (8000+ lines of it)
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Error: std::exception (bad allocation)
    Error: std::exception (bad allocation)<!--c2--></div><!--ec2-->

    Nothing else really strikes me as important from the log, it all looks pretty normal.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1823691:date=Jan 12 2011, 01:57 PM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Jan 12 2011, 01:57 PM) <a href="index.php?act=findpost&pid=1823691"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->A bunch of this: (8000+ lines of it)
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Error: std::exception (bad allocation)
    Error: std::exception (bad allocation)<!--c2--></div><!--ec2-->

    Nothing else really strikes me as important from the log, it all looks pretty normal.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Thanks, that's what I was expecting. I'm not really sure what's causing this yet (my best guess is something related to a player connecting), but it will be a top priority for 162.
  • Horseless HeadmanHorseless Headman Join Date: 2011-01-07 Member: 76594Members
    +1 for Awesomeness Max

    No crashes here, but I've only had a few players and I doubt a full run at the map. Now that we might be needing the NS2Monitor/ProcessMemoryMonitor.exe again, could anyone with experience using it PM me? I'm a bit lost. And the <a href="http://forum.specialattack.net/viewtopic.php?f=94&t=7639" target="_blank">original instructions</a> aren't helping me much.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    edited January 2011
    <!--quoteo(post=1823579:date=Jan 13 2011, 01:59 AM:name=Plasma)--><div class='quotetop'>QUOTE (Plasma @ Jan 13 2011, 01:59 AM) <a href="index.php?act=findpost&pid=1823579"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Unfortunately the server crashes due to memory leaks again, not sure if your server is doing the same (rada sucks yeah?).<!--QuoteEnd--></div><!--QuoteEEnd-->

    He sure does.

    edit: I don't see memory leaks unless it happens at the start as described below.

    Still havnt had a memory leak yet <b>EDIT: Just checked the log, it did reach 2gb this morning at 26 past midnight</b>, played some good games on Tram last night too, which seemed better, no black screens (possibly due to turrets being so expensive). One reproducible way I have noticed a memory leak is when clients are currently connected to the server, and when you restart it, they keep sending bad data and filling the memory untill they timeout, but it has normally crashed by then.

    For example, if I restart the server while it has players currently connected, when the server comes back up, they must still be sending data to the server, because memory will grow at a rate relevant to how many clients were connected, however, if I wait untill all the users have timed out, restarting the server will start it at around 450MB and keep it steady there. If its possible for a previous client to keep sending rubbish data, is it possible for a different user to be the cause of it?
  • darkyatdarkyat Join Date: 2011-01-12 Member: 77212Members
    Build 161 Server seem to crash more often:

    Recent Crash @ ~650MB with ~7 Players and ovrmind active:
    "Faulting application server.exe, version 0.0.0.0, time stamp 0x4d2c794b, faulting module kernel32.dll, version 6.0.6001.18215, time stamp 0x4995344f, exception code 0x40010006, fault offset 0x0002f328, process id 0x988, application start time 0x01cbb3408d9339d0."
  • AdamaAdama Join Date: 2010-12-21 Member: 75826Members
    edited January 2011
    I'm also experiencing this. It's happened 3 times within 24 hours. (although lots of memory free on this occasion)
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1823878:date=Jan 12 2011, 11:42 PM:name=endar)--><div class='quotetop'>QUOTE (endar @ Jan 12 2011, 11:42 PM) <a href="index.php?act=findpost&pid=1823878"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->One reproducible way I have noticed a memory leak is when clients are currently connected to the server, and when you restart it, they keep sending bad data and filling the memory untill they timeout, but it has normally crashed by then.

    For example, if I restart the server while it has players currently connected, when the server comes back up, they must still be sending data to the server, because memory will grow at a rate relevant to how many clients were connected, however, if I wait untill all the users have timed out, restarting the server will start it at around 450MB and keep it steady there. If its possible for a previous client to keep sending rubbish data, is it possible for a different user to be the cause of it?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Thanks, that's very useful information.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I've just had it Devicenull. A whole bunch of Error: std::exception (bad allocation). Memory usage is over 1.9GB (just), but server is somehow still running. I joined it and warned people, but it has not crashed yet. I will probably editing this post saying "ok, it crashed now", very shortly!
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    Yeh i confirm clients constantly sending bad data to the server. I found this when testing the web script and and resetting the server while connected to it, does not always drop and time you out. Very easy to reproduce.
  • AdamaAdama Join Date: 2010-12-21 Member: 75826Members
    I can also confirm this. Are we sure this is causing the server crashes as this has been around for awhile? The main problems I have is with Hydra spam, I then see steady increase of memory :| and severe drops in the tick rate.

    That is why for now I've increased the cost of the Hydra so no-one goes around spamming them everywhere.
  • SyntaximSyntaxim Join Date: 2011-01-13 Member: 77267Members
    Please fix this. making the game aggervating , at the start of the game you can tell how much 161 improved the game , but then it slowly dies! Literally! Fixxxx itttt :( Thanks.
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    and who said you nerds wouldn't achieve great things in life with your juicy brains.
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1824634:date=Jan 15 2011, 02:08 PM:name=Adama)--><div class='quotetop'>QUOTE (Adama @ Jan 15 2011, 02:08 PM) <a href="index.php?act=findpost&pid=1824634"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I can also confirm this. Are we sure this is causing the server crashes as this has been around for awhile? The main problems I have is with Hydra spam, I then see steady increase of memory :| and severe drops in the tick rate.

    That is why for now I've increased the cost of the Hydra so no-one goes around spamming them everywhere.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Yes. A process can only use up to 2gb of memory. Once it tries to go above that, it crashes.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    <!--quoteo(post=1824648:date=Jan 15 2011, 11:58 AM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Jan 15 2011, 11:58 AM) <a href="index.php?act=findpost&pid=1824648"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yes. A process can only use up to 2gb of memory. Once it tries to go above that, it crashes.<!--QuoteEnd--></div><!--QuoteEEnd-->

    "Hydra Optimization (create 5+) "

    its on the progress page. its in the works. nobody is friggin playing right now anyways unfortunately so might as just well wait for the patch next week.
    maybe they could be nice and toss in Onos and allow pre ordering and ads on steam. revenue and features. but thats just my pipe dream :)
  • AdamaAdama Join Date: 2010-12-21 Member: 75826Members
    <!--quoteo(post=1824648:date=Jan 15 2011, 07:58 PM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Jan 15 2011, 07:58 PM) <a href="index.php?act=findpost&pid=1824648"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yes. A process can only use up to 2gb of memory. Once it tries to go above that, it crashes.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Okay i'll keep an eye on it. If you are referring to 2GB due to server.exe being a user process, you could use the /3gb switch to give you another GB. Although that's just going to delay the issue from happening and not fix the root cause.
  • PricePrice Join Date: 2003-09-27 Member: 21247Members
    For me its like 161 lags more then 160...don't know why, maybe because reloading and firesounds are now serverside?
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    Definitely more overall hitching/lag in the latest patch; looking forward to the next one which has a few optimizations.
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    edited January 2011
    Btw this isn't fully fixed in 162. It's much improved (the memory leak happens slowly how), but my 162 server is currently using 1.5gb of memory, after having players on it for about two hours.

    <img src="http://dl.dropbox.com/u/2078961/ns2.png" border="0" class="linked-image" />

    Note: The initial spike on the far left of the graph is from 161. The drop represents me restarting the server to apply 162.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    What do you use to get the data for that graph?
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1827239:date=Jan 25 2011, 09:27 PM:name=endar)--><div class='quotetop'>QUOTE (endar @ Jan 25 2011, 09:27 PM) <a href="index.php?act=findpost&pid=1827239"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What do you use to get the data for that graph?<!--QuoteEnd--></div><!--QuoteEEnd-->

    It's some custom software that we wrote. Sorry, but it's not something you can download anywhere.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    No harm in asking!
    Thought it could have been from the web admin page. I have not yet had any leaks like are shown in that graph, had up to 12 players, currently about 6 and its holding steady.

    Have you tried running everything stock?
Sign In or Register to comment.