|  |  | 
 
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  | 
	
		
   
   
      | Support::Linux Servers Support forum for Linux EQEMu users. |  
	
	
		
	
	
	| 
			
			 
			
				08-26-2009, 09:58 AM
			
			
			
		 |  
	| 
		
			
			| Banned |  | 
					Join Date: Aug 2009 Location: look behind you 
						Posts: 30
					      |  |  
	| 
				 Memory leaks 
 Apparently the server has some rather large memory leaks in about 3 hours idle 5 dynamic zones ate 2+ gigs of ram. Has anyone else noticed such problems? |  
	
		
	
	
	| 
			
			 
			
				08-26-2009, 01:00 PM
			
			
			
		 |  
	| 
		
			
			| Developer |  | 
					Join Date: Apr 2009 Location: USA 
						Posts: 478
					      |  |  
	| 
 I know there were some memory leaks, but nothing that large. I've been pretty busy in RL lately, but I'm hoping when things settle down I will have time to go through and do a bit of cleanup on the code. Memory leaks were one of my planned targets to fix. |  
	
		
	
	
	| 
			
			 
			
				08-27-2009, 12:37 AM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Nov 2002 Location: NC, USA 
						Posts: 182
					      |  |  
	| 
 Err, I should have said Rev 961.  Silly typo, and I can't go back and edit it, :X 
				__________________Hmm.
 |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				08-27-2009, 05:59 AM
			
			
			
		 |  
	| 
		
			
			| Developer |  | 
					Join Date: Mar 2007 Location: Ohio 
						Posts: 648
					      |  |  
	| 
				  
 Here's a fix for a smaller leak based on the logs: 
	Code:  14 bytes in 1 blocks are definitely lost in loss record 5 of 55
    at 0x402209E: operator new[](unsigned) (vg_replace_malloc.c:268)
    by 0x817BC51: Database::GetZoneLongName(char const*, char**, char*, float*, float*, float*, unsigned*, unsigned*) (database.cpp:1112)
    by 0x82C9A81: Client::ZonePC(unsigned, unsigned, float, float, float, float, unsigned char, ZoneMode) (zoning.cpp:473)
    by 0x82CA3BC: Client::ProcessMovePC(unsigned, unsigned, float, float, float, float, unsigned char, ZoneMode) (zoning.cpp:447)
    by 0x82CA5E4: Client::MovePC(unsigned, float, float, float, float, unsigned char, ZoneMode) (zoning.cpp:404)
    by 0x82CA627: Client::GoToDeath() (zoning.cpp:711)
    by 0x8118406: Client::Death(Mob*, int, unsigned short, SkillType) (attack.cpp:1557)
    by 0x81190CC: Mob::CommonDamage(Mob*, int&, unsigned short, SkillType, bool&, signed char, bool) (attack.cpp:3013)
    by 0x8119D23: Client::Damage(Mob*, int, unsigned short, SkillType, bool, signed char, bool) (attack.cpp:1287)
    by 0x8115D11: NPC::Attack(Mob*, int, bool) (attack.cpp:1745)
    by 0x813F481: Mob::AI_Process() (MobAI.cpp:1179)
    by 0x8104F73: NPC::Process() (npc.cpp:623) 
	Code: Index: T:/svn/trunk/EQEmuServer/zone/zoning.cpp
===================================================================
--- T:/svn/trunk/EQEmuServer/zone/zoning.cpp	(revision 966)
+++ T:/svn/trunk/EQEmuServer/zone/zoning.cpp	(working copy)
@@ -476,6 +476,7 @@
 
 	if(!pZoneName) {
 		Message(13, "Invalid zone number specified");
+		safe_delete_array(pZoneName);
 		return;
 	}
 	iZoneNameLength = strlen(pZoneName);
@@ -655,6 +656,8 @@
 			}
 		}
 	}
+
+	safe_delete_array(pZoneName);
 }
 
 void Client::GoToSafeCoords(uint16 zone_id, uint16 instance_id) { |  
 
  |  |  |  |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				10-02-2009, 02:22 PM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Sep 2009 
						Posts: 147
					      |  |  
	| 
				  
 I haven't noticed any memory leaks with dynamic zones, yet (running rev 974).  However, I HAVE noticed that some PoP zones (e.g. poinnovations and a couple of others) like to chew on 200+ MB of RAM when launched statically.
 I'm running ~most~ zones on my server statically because I've noticed certain anamolies with running them dynamically that detract from the "MMORPG"/persistent world aspect of the game.  A couple of things I've noticed when all zones are dynamic:
 -the lack of weather change if you only spend a few minutes in a zone
 -the ~same~ thing happening if you pass the same point in a zone in approximately the same time every time you enter the zone (e.g. Lodizal ALWAYS just spawns, and ALWAYS wandering around the gnolls in Iceclad)
 -wandering mobs can almost always be found in the same location
 -"Spawn cycles" in zones like Frontier Mountains don't work right if the zone is dynamic, and you die a lot....
 
 Right now, I'm working on a balance of dynamic and static zones to maintain server performance, minimize RAM usage, and maintain a "persistent feel" to the world on my personal server...
 
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				10-02-2009, 08:18 PM
			
			
			
		 |  
	| 
		
			|  | Demi-God |  | 
					Join Date: Mar 2009 Location: Umm 
						Posts: 1,492
					      |  |  
	| 
 you can turn on Persistent Zone state. What this will do for dynamic zones- it will RECORD what/where things were when zone was shutdown and when it reboots - it will put things back exactly how they were last time on |  
	
		
	
	
	| 
			
			 
			
				10-02-2009, 09:34 PM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Sep 2009 
						Posts: 147
					      |  |  
	| 
 I missed that.  I've enabled that so the zones on my server that are still dynamic will be more persistent when I come back to them.  Though, I don't think it'll be exactly like a statically loaded zone, but it will will be better than a zone that just relaunched everytime I enter it. 
Thanks for the pointer; I thought that was enabled by default.  Obviously, I was mistaken   |  
	
		
	
	
	| 
			
			 
			
				10-02-2009, 11:53 PM
			
			
			
		 |  
	| 
		
			|  | Demi-God |  | 
					Join Date: Mar 2009 Location: Umm 
						Posts: 1,492
					      |  |  
	| 
 Important note - the Persistent state will carry on even after entire world server has been shut down and restarted, which leads to an issue that, when persistent state was turned on - ANY alterations to DB would prevent server from booting again until you turned it off - since the recorded data was using the DB as base and once base would be altered it would no longer match the PS recording, causing the crashes.This was a year ago however, so changes to the code may have already addressed this issue.
 |  
	
		
	
	
	| 
			
			 
			
				10-03-2009, 08:09 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: Sep 2006 
						Posts: 1,348
					      |  |  
	| 
 Lucky for you I completely disabled persistent state loading a while back.
 No one really ever had good experiences with persistent state loading, it was unmaintained and filled with bugs and exploits.
 |  
	
		
	
	
	| 
			
			 
			
				10-03-2009, 08:46 PM
			
			
			
		 |  
	| 
		
			|  | Demi-God |  | 
					Join Date: Mar 2009 Location: Umm 
						Posts: 1,492
					      |  |  
	| 
 LOL I always thought it was nice alternative to running crap load of static zones =P |  
	
		
	
	
	
	
	| 
	|  Posting Rules |  
	| 
		
		You may not post new threads You may not post replies You may not post attachments You may not edit your posts 
 HTML code is Off 
 |  |  |  All times are GMT -4. The time now is 06:12 PM.
 
 |  |  
    |  |  |  |  
    |  |  |  |  
     |  |  |  |  
 |  |