Memory Leak

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
slmclarengt
Militia
Posts: 68
Joined: Thu Mar 09, 2006 7:30 pm

Memory Leak

Post by slmclarengt » Thu Jan 03, 2008 12:56 pm

In my experience in the department of programming, there is one problem I dislike probably more than any other; memory leaks! I think the latest RC beta may be bugged with a memory leak because WC3FT is the only plugin I have changed since my server started very consistently crashing, crashing some more and more...


--- Please enter the following information for support ---
War3ft Version: Latest (hehe jk Geesu), real version: 3.0 RC10 Beta 1
Amxmodx Version: 1.8.0.3660
Metamod Version: v1.19p32
amxx list:

Code: Select all

10:54:48 Currently loaded plugins:
                name                    version     author            file             status   
          [  1] AMXBans                 5.0         YoMama/Lux & lan  amxbans.amxx     debug    
          [  2] AmxBans Admin Base      1.76        AMXX Dev Team     admin_amxbans.a  running  
          [  3] Admin Commands          1.8.0.3660  AMXX Dev Team     admincmd.amxx    running  
          [  4] Admin Help              1.8.0.3660  AMXX Dev Team     adminhelp.amxx   running  
          [  5] Multi-Lingual System    1.8.0.3660  AMXX Dev Team     multilingual.am  running  
          [  6] Menus Front-End         1.8.0.3660  AMXX Dev Team     menufront.amxx   running  
          [  7] Commands Menu           1.8.0.3660  AMXX Dev Team     cmdmenu.amxx     running  
          [  8] Players Menu            1.8.0.3660  AMXX Dev Team     plmenu.amxx      running  
          [  9] Teleport Menu           1.8.0.3660  AMXX Dev Team     telemenu.amxx    running  
          [ 10] Maps Menu               1.8.0.3660  AMXX Dev Team     mapsmenu.amxx    running  
          [ 11] Admin Chat              1.8.0.3660  AMXX Dev Team     adminchat.amxx   running  
          [ 12] Anti Flood              1.8.0.3660  AMXX Dev Team     antiflood.amxx   running  
          [ 13] Scrolling Message       1.8.0.3660  AMXX Dev Team     scrollmsg.amxx   running  
          [ 14] Info. Messages          1.8.0.3660  AMXX Dev Team     imessage.amxx    running  
10:54:48  [ 15] Admin Votes             1.8.0.3660  AMXX Dev Team     adminvote.amxx   running  
          [ 16] NextMap                 1.8.0.3660  AMXX Dev Team     nextmap.amxx     running  
          [ 17] TimeLeft                1.8.0.3660  AMXX Dev Team     timeleft.amxx    running  
          [ 18] Pause Plugins           1.8.0.3660  AMXX Dev Team     pausecfg.amxx    running  
          [ 19] Stats Configuration     1.8.0.3660  AMXX Dev Team     statscfg.amxx    running  
          [ 20] Restrict Weapons        1.8.0.3660  AMXX Dev Team     restmenu.amxx    running  
          [ 21] StatsX                  1.8.0.3660  AMXX Dev Team     statsx.amxx      running  
          [ 22] CS Misc. Stats          1.8.0.3660  AMXX Dev Team     miscstats.amxx   running  
          [ 23] Warcraft 3 Frozen Thro  3.0 RC10 B  Geesu & Avanderi  war3ft.amxx      debug    
          [ 24] AMX Super               3.7         Bmann_420 & Bo0m  amx_super-speed  running  
          [ 25] Bad Camper              1.3b        Brad Jones        bad_camper.amxx  running  
          [ 26] Admin Spectator ESP     1.3         KoST              admin_spec_esp.  running  
          [ 27] AMX Toggle Immunity     3.12        slmclarengt       amx_toggleimmun  running  
          [ 28] DeagsMapManager         2.40        Deags/JTP10181    deagsmapmanager  running  
          [ 29] ChickenMod: Rebirth     1.0a        T(+)rget          amx_chicken.amx  running  
10:54:48  [ 30] Advanced Roll The Dice  v2.5 RC 4   Striker           roll_the_dice.a  running  
          [ 31] Spawn Protection        7.0         Peli              spawnprotection  running  
          [ 32] FakeFull Original       1.7.6       JTP10181/Freecod  fakefull_origin  running  
          [ 33] Map Spawns Editor       1.0.16      iG_os             Map_Spawns_Edit  running  
          [ 34] Clan Vs. All            1.0         GHW_Chronic       clanvsall.amxx   running  
          [ 35] Knife Only on Bridge i  1.0         xx_sirhc_xx       amx_deagle5_kni  debug    
         35 plugins, 35 running
amxx modules:

Code: Select all

10:55:08 Currently loaded modules:
               name                    version     author               status     
          [ 1] MySQL                   1.8.0.3660  AMX Mod X Dev Team   running    
          [ 2] Fun                     1.8.0.3660  AMX Mod X Dev Team   running    
          [ 3] Engine                  1.8.0.3660  AMX Mod X Dev Team   running    
          [ 4] FakeMeta                1.8.0.3660  AMX Mod X Dev Team   running    
          [ 5] CStrike                 1.8.0.3660  AMX Mod X Dev Team   running    
          [ 6] CSX                     1.8.0.3660  AMX Mod X Dev Team   running    
          [ 7] SQLite                  1.8.0.3660  AMX Mod X Dev Team   running    
          [ 8] Sockets                 1.8.0.3660  HLSW Dev Team        running    
         8 modules, 8 correct
meta list:

Code: Select all

10:55:25 Currently loaded plugins:
               description      stat pend  file              vers      src   load  unlod
          [ 1] AMX Mod X        RUN   -    amxmodx_mm.dll    v1.8.0.3  ini   Start ANY  
          [ 2] SBSRV            RUN   -    sbsrv_mm.dll      v3.5.2    ini   Start Never
          [ 3] MySQL            RUN   -    mysql_amxx.dll    v1.8.0.3  pl1   ANY   ANY  
          [ 4] Fun              RUN   -    fun_amxx.dll      v1.8.0.3  pl1   ANY   ANY  
          [ 5] Engine           RUN   -    engine_amxx.dll   v1.8.0.3  pl1   ANY   ANY  
          [ 6] FakeMeta         RUN   -    fakemeta_amxx.dl  v1.8.0.3  pl1   ANY   ANY  
          [ 7] CStrike          RUN   -    cstrike_amxx.dll  v1.8.0.3  pl1   ANY   ANY  
          [ 8] CSX              RUN   -    csx_amxx.dll      v1.8.0.3  pl1   ANY   ANY  
          [ 9] SQLite           RUN   -    sqlite_amxx.dll   v1.8.0.3  pl1   ANY   ANY  
         9 plugins, 9 running
Social Security Number: haha, you wish!

Slmclarengt
"I am become Death destroyer of worlds" - Hindu God Krishna speaking with Soldier about battle (Later quoted by Robert Oppenheimer, head of the Manhattan Project in Los Alamos Laboratories.)

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Thu Jan 03, 2008 1:27 pm

I as well face crashes. I am working with my host to try and get core/debug.log files for crashes. Strangly, there doesn't seem to be any being created. My next step is to leave the server in the crashed state next time and get them to tell me exactly what they see on their end. Cause, not even their server console log shows any reason why it is crashing, it just terminates.
Image

No support via PM or Email

slmclarengt
Militia
Posts: 68
Joined: Thu Mar 09, 2006 7:30 pm

Post by slmclarengt » Thu Jan 03, 2008 8:04 pm

Here's the end of the log file, they all end similar to this: L 01/02/2008 - 16:29:27: "-[.40 cal ]- [D]ean Wh[!]t[E] *<347><STEAM_0:0:231631

That's where it seems to cut out for all of them, at least for me; at the right carrot.

I can't think right now; probably too much COD4 for a day and helping too many people with some crappy computer builds, giving them better ideas because some just suck. So I can't even think much about it; maybe SQL related, I don't know, I don't use SQLite so I can't say if it works fine then.

Sleeper
"I am become Death destroyer of worlds" - Hindu God Krishna speaking with Soldier about battle (Later quoted by Robert Oppenheimer, head of the Manhattan Project in Los Alamos Laboratories.)

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Fri Jan 04, 2008 9:42 am

I use SQLite. My normally will only crash at a mapchange. No HLDS error, but it did generate a core log file, though it is 2.4 gigs. I am going to see if Bail or someone can tell me how to look at the file or if they can. I will report back when I get something
Image

No support via PM or Email

kp_downarrow
Rifleman
Posts: 162
Joined: Thu Dec 21, 2006 2:12 am

Post by kp_downarrow » Fri Jan 04, 2008 9:17 pm

well i know an logic index out of bounds error will terminate hlds.exe

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Tue Jan 15, 2008 12:37 pm

I entirely agree that there must be memory leaks... But I have no idea how to debug this...

*technically* you shouldn't be able to create a memory leak through an amxx plugin b/c of the simplicity of pawn (no new/delete or memory management functions).

But I understand if enough amxx functions are called perhaps eventually a bug could exist in amxx which would cause a memory leak.

Not sure how to debug :(
No Support via PM

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Post by YamiKaitou » Tue Jan 15, 2008 2:55 pm

I asked Bail about something last week. I had a core file that I sent to him to see if he could tell me anything about it. And I also sent him a PM requesting a debug version of the 1.8 core (he told me to). So, once I get a response back from him, I will let you guys know
Image

No support via PM or Email

slmclarengt
Militia
Posts: 68
Joined: Thu Mar 09, 2006 7:30 pm

Post by slmclarengt » Thu Jan 17, 2008 12:05 am

Geesu wrote:I entirely agree that there must be memory leaks... But I have no idea how to debug this...

*technically* you shouldn't be able to create a memory leak through an amxx plugin b/c of the simplicity of pawn (no new/delete or memory management functions).

But I understand if enough amxx functions are called perhaps eventually a bug could exist in amxx which would cause a memory leak.

Not sure how to debug :(
Code is never so simple to prevent problems. I couldn't tell you where to debug this but maybe ensuring all functions properly terminate leaving no memory addresses open while executing prior functions. Although that is not really possible, I'd think it would be good to attempt. I think of it like Hard disks and fragments. When a program like Firefox is opening and you open a new text document. And with many programs open saving continuously to the hard disk, files become fragmented. The parts are split around the platter, which decreases efficiency. That's just how I think of functions not terminating fully; they leave "open wounds" which causes more problems, imo.

@Yami - maybe I should bother BAIL as well so my server can stop crashing and he can be quicker about helping :-)

Slmclarengt

P.S. I doubt any of this helped at all; probably confused people, sorry :-)
"I am become Death destroyer of worlds" - Hindu God Krishna speaking with Soldier about battle (Later quoted by Robert Oppenheimer, head of the Manhattan Project in Los Alamos Laboratories.)

Post Reply