Jump to content

valgrind [logs and help]

Recommended Posts

==32040== LEAK SUMMARY:

==32040== definitely lost: 1,439,090 bytes in 133,908 blocks.

==32040== indirectly lost: 176,216 bytes in 2,761 blocks.

==32040== possibly lost: 27,115,260 bytes in 108,642 blocks.

==32040== still reachable: 1,116,263,870 bytes in 1,148,081 blocks.

==32040== suppressed: 0 bytes in 0 blocks.


i used this script :

ulimit -c unlimited
while :
   valgrind --tool=memcheck --leak-check=full --show-reachable=yes --log-file=valgrind-$COUNTER.log ./mangosd #should be console disabled;)
       mv valgrind.core* valgrind-core.$COUNTER #if system not add .proccess_id to dumps for sure move it to keep it

i am trying to get mangos stable again, so any help would be nice, i am not experienced with valgrind, so tell me if i am doing this right, or what to do,. also have problems, mangos really lags with vlagrind(60online and 3-10sec lag), it use only 1-2core (have 8) i used also derex mtmaps patch with this test, if anyone know how to use valgrind on all cores ...or some special settings, what DEVS need

thx, and tell if this logs are need .. or how to find, that annoig freez in mangos :(

also tryied some gdb : theres loop somewhere:(



hope i helped little bit

informations taken from : www.valgrind.org

Link to comment
Share on other sites

cause i didnt managed to work purify on linux, i did some logs with valgrind (i am still looking for some DEV witch can join to mine server and install purify, PM pls)

NEW Vlagrind logs, mangos rev 7158 + sd2 857(modified some c++ scripts sorry)

mangos is almost clean, without derex mtmaps, only some minor changes at player plevel accounts+ player titles:)

here are two valgrind logs, one is only mangos startup with full debug mode, without optimization, second is debug, with optimization, and cca 2hours gameplay, i also reproduced crash described here:


here are the valgrind logs:


here are bt from core dumps generated by gdb/valgrind

http://pastebin.com/m73b92b7e crash

http://pastebin.com/m145027f5 ctrl+c ?:D (i am not sure )

hope it helps : )

Link to comment
Share on other sites

There are a LOT of serious SD2 errors! They could be causing some of the core bugs/crashes/freezes but it's impossible to fix them if you don't use clean SD2.

Did you reproduce it while running under valgrind ? The first log ends with a freeze and the second one seems to be shut down/terminated.

i need to get working purify, its really slow with valgrind ,..

i will do some valgrind for clean sd2 too (i modified only BT,sunwell,ZA)

and first log should be with crash / freez :

i did what i described here, and got crash or freez not sure


i posted bt from valgrind.core dump + valgrind.log . think its freez cause i had setting 2mins for freeze detector. i am using script in first post, if u could modify it , to generate right files, or what should i do in moment of freez, i can post aditional logs, but need to know how... mine script auto generate core dump+ log file, i just du bt full on that core file

Link to comment
Share on other sites

sorry for BIG delay, i didnt had mutch time to do some logs, so here are promised logs, i can provide more if need ... hope it help, i would really like to see some fixes from thees logs on mangos GIT :) so i know it helped

tested on : debug mode, no optimatization+(some flags for quade core)

Mangos/0.13.0 (**REvision 7723-* ) for Unix ( little-endian)

Using script library: ScriptDev2 (for MaNGOS 7715+) Revision [1029] 2009-04-26 23:45:06 (Unix)

Using World DB: UDB 0.11.0 (371) for MaNGOS 7681 with SD2 SQL for wev. 1012

Using creature EventAI: ACID 0.0.9 - Full Release for Mangos 7673+


1. this is instance/ai/map system crash:D described here: http://getmangos.eu/community/viewtopic.php?id=5749

thread apply all bt / bt full

core dump : http://pastebin.com/f7693493

valgrind log : http://filebeam.com/94eb2ed63f7dad5ef09e7b4c26fbcd6d


randome crash

thread apply all bt / bt full

core dump: http://pastebin.com/f1f5ed691

valgrind log: http://filebeam.com/850dc310375eb38384334bcf9fe9f97d

Link to comment
Share on other sites

  • 39 years later...
Been a long time since anyone made a valgrind log of the server .. looks like there's lots of info to go over :).

i did another valgrind,

==8114== LEAK SUMMARY:

==8114== definitely lost: 1,467,961 bytes in 135,580 blocks.

==8114== indirectly lost: 176,135 bytes in 2,760 blocks.

==8114== possibly lost: 15,705,824 bytes in 162,928 blocks.

==8114== still reachable: 1,871,554,842 bytes in 2,138,667 blocks.

==8114== suppressed: 0 bytes in 0 blocks.

but i have still problem, how to run valgrind on all cores? it really lags, i cant try to freez it(more then 100ppl, 5-30seclag), so we cant find wheres loop, is there another tools, how to find freez crash etc ? .

or mine script is it all what u need ?

i need info what should i do, i can give access to server if need..


i really want have mangos stable again (note i have some changes in core, but they definately not relatd to freez, tested without)

Link to comment
Share on other sites

how to run valgrind on all cores?
The main thing to point out is that although Valgrind works with the built-in threads system (eg. NPTL or LinuxThreads), it serialises execution so that only one thread is running at a time.

This approach avoids the horrible implementation problems of implementing a truly multiprocessor version of Valgrind, but it does mean that threaded apps run only on one CPU, even if you have a multiprocessor machine.

So multicore support is NYI in valgrind :o
Link to comment
Share on other sites

If by "that" you mean the last freeze you posted in the crash report thread then it's fixed. Could you please post which revision you made those logs with ?

:( i am not sure , it was like 7094 or 7090 ,

i will make new logs of valgrind/purify(hope i get them to work) soon with clean mangos, (think today) and will post revs number also

mine was ending with WorldSocket::handle_input_header: client sent mailformed packet size = 16831 , cmd = 1717468147 not sure what does this msg mean , some hacks think.

will see hows new revs stays up:)

Link to comment
Share on other sites

Since you're using clean mangos, please also use clean SD2. I've gotten complaints that some of the errors that show up in your logs are not present in SD2.

will do, but i cant get purify working on debian:( need help with that, if its possible i will give u access on server and u can install it, if ye, send me pm, we can talk about it.. (derex was ones on our server but i dont have access to devs irc, so cant talk to him, didnt see him on normal irc)

Link to comment
Share on other sites

Im been having real issues on windows too, so ill use purify for windows and im also debugging so ill post all the info i get in a .zip later on tonight :)
That would be great, just remember that in order to use purify on windows you need to:

- switch to Debug mode

- remove #include <vld.h> from MemoryLeaks.h

- for EACH project (where you have linker options), including SD2!, set the following:

Linker->Advanced->Fixed Base Address->Generate Relocation Seciont (/Fixed:No)

Linker->General->Enable Incremental Linking -> No (/incremental:no)

- full rebuild everything

Link to comment
Share on other sites

Much more people could help you if you would just report what error/problem you are having, in detail.

i tryied to intall it,

after log to putty i have this err.

Rational PurifyPlus for UNIX %SUITE_VER%

not installed for the Linux platform.

i dotnloaded this : PurifyPlus.

and exec rs_install


   Debian GNU/Linux 4.0 n l not supported in this release.
   rs_install must be run on one of these operating systems:
       Red Hat Enterprise Linux .. release 3
       Red Hat Enterprise Linux .. release 4
       Red Hat Enterprise Linux Server release 5
       SUSE LINUX Enterprise Server 9
       SUSE Linux Enterprise Server 10

   IBM recommends you run rs_install on a machine running one of
   these operating systems.

   Check the following web address for the latest
   Rational PurifyPlus for Linux (Evaluation) updates and platform support:


   Do you want to continue rs_install? [no] y

   You are logged into kitakami-2 as root.
   Are you sure you want to run rs_install as root?

   Press the Enter key to continue rs_install as root, q to quit:
RS Install                     IBM Corporation                 Version: 2.190

                               Using RS Install

   You are running the rs_install command as root.

   Output from rs_install will be copied to a log file.  When you exit
   rs_install or rs_install completes, the location of the log file
   is displayed.

   The -help option can be used to display rs_install command line options.
   All of your inputs will be saved for future runs of rs_install.

   Your window size is 40 lines long.  IBM recommends running
   rs_install in a terminal window that has at least 48 lines.

   You can enter a q, q! or ? at any prompt:
   q    Will save your inputs and quit rs_install.
   q!   Quit rs_install without saving your inputs.
        Note that the 'Rational' directory is always saved.
   ?    Get help on the current prompt.

   Press the Enter key to continue, q to quit rs_install:

     Rational PurifyPlus for Linux (Evaluation) - Enter Install Location

   Enter the location to install IBM Rational products.
   This will be referred to as the 'Rational' directory.
   In 'Rational' directory, rs_install will create a releases
   directory to keep all of the products by name and version.

   For example, in 'Rational'/releases, this install will
   create a 'PurifyPlus.' directory to install
   Rational PurifyPlus for Linux (Evaluation)

   The 'Rational' directory must be accessible from
   every machine where you plan to run these IBM Rational products.
   The 'Rational' directory path must be identical on each machine.
   Thus, an automount path like /tmp_mnt/rational should not be used
   because you cannot access this directory from every machine.

   Checking for 'Rational' directories..  One found.

   Enter 'Rational' directory: [/releases]

   Running LAP Tool:
/opt/_purify/PurifyPlus. -classpath extras/LAP/lib/lapapp.jar:extras/LAP/lib/i18n.jar com.ibm.lex.lapapp.LAP -l extras/LAP/LA_files -text_only -s /releases/releases/PurifyPlus.
/opt/_purify/PurifyPlus. line 179: /opt/_purify/PurifyPlus. No such file or directory

   Will look for a different version of java and try again.

   JRE failed to run.  Cannot run LAP Tool.
   Error in rs_install.
   For answers to frequently asked questions please visit our
   Technical Support pages at:

   Check the following web address for the latest
   Rational PurifyPlus for Linux (Evaluation) updates and platform support:


   A Java Runtime Enviroment (JRE) is needed to install this product.
   Set JAVA_HOME to the location of a JRE or JDK, version 1.3 or later.
   Then run rs_install again.
   rs_install log file:

   End of rs_install.

i trzied to install some java, etc still dont work, if anyone can help me, wold be nice]

Link to comment
Share on other sites

Thanks for the help with that Wyk3d. Been really busy last night and will be tonight but ill sort it out ASAP :)

If it helps here's a crash log from last night. I managed to stop the bad lag spikes and now its just a little. Then a big lag spike before the server crashes and restarts. http://paste2.org/p/134430

This is what i tried:

Visibility.GroupMode = 0

Visibility.Distance.Creature = 45

Visibility.Distance.Player = 45

Visibility.Distance.Object = 45

Visibility.Distance.InFlight = 45

Visibility.Distance.Grey.Unit = 1

Visibility.Distance.Grey.Object = 10

Instead of the default 66

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use