Jump to content
  • Ubuntu - Zero - Crash when loading scripts


    wtfcolt
    • Status: Completed
      Main Category: Core / Mangos Daemon
      Sub-Category: Core Crash
      Version: 0.19 Milestone: 20-newbeginnings Priority: High
      Implemented Version: 0.20(currentmasterbranch)

    Ubuntu - Zero - Crash when loading scripts

    Issue comes up when trying to load the scripts... fresh databases

    [PHP]MySQL client library: 5.5.35
    MySQL server ver: 5.5.35-0ubuntu0.12.04.2
    AUTOCOMMIT SUCCESSFULLY SET TO 1
    SD2: ScriptDev2 database initialized.


    Loading ScriptDev2 (for MaNGOS Zero Release 0.19+) Revision [Rel0.19] (*) * * (Unix)
    SD2: Loading Script Texts...
    Loading texts from script_texts, with additional data
    [>> Loaded 1316 text templates from script_texts***] 100%


    SD2: Loading Custom Texts...
    Loading texts from custom_texts, with additional data
    [**************************************************] 100%
    >> Loaded 0 string templates. DB table `custom_texts` is empty.

    SD2: Loading Gossip Texts...
    Loading texts from gossip_texts
    [>> Loaded 23 string templates from gossip_texts***] 100%


    SD2: Loading Script Waypoints for 53 creature(s)...
    [>> Loaded 1378 Script Waypoint nodes.*************] 100%

    *** glibc detected *** ./mangosd: free(): corrupted unsorted chunks: 0x0d10c6e0 ***
    ======= Backtrace: =========
    /lib/i386-linux-gnu/libc.so.6(+0x75ee2)[0xb6ea2ee2]
    /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdlPv+0x1f)[0xb70e651f]
    /usr/lib/i386-linux-gnu/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1b)[0xb70cd99b]
    /home/wtfcolt/wow/bin/lib/libmangosscript.so(_Z12LoadDatabasev+0x14b)[0xb276931b]
    /home/wtfcolt/wow/bin/lib/libmangosscript.so(InitScriptLibrary+0x11e)[0xb27695be]
    ./mangosd(_ZN9ScriptMgr17LoadScriptLibraryEPKc+0x63d)[0x84170ad]
    ./mangosd(_ZN5World23SetInitialWorldSettingsEv+0x127e)[0x848f7ee]
    ./mangosd(_ZN6Master3RunEv+0x14a)[0x814903a]
    ./mangosd(main+0x345)[0x813b685]
    /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb6e464d3]
    ./mangosd[0x8140921]
    ======= Memory map: ========
    08048000-087f3000 r-xp 00000000 08:03 13238293 /home/wtfcolt/wow/bin/bin/mangosd
    087f3000-087f4000 r--p 007ab000 08:03 13238293 /home/wtfcolt/wow/bin/bin/mangosd
    087f4000-087f8000 rw-p 007ac000 08:03 13238293 /home/wtfcolt/wow/bin/bin/mangosd
    087f8000-087ff000 rw-p 00000000 00:00 0
    0a3a6000-0e079000 rw-p 00000000 00:00 0 [heap]
    b0b00000-b0b22000 rw-p 00000000 00:00 0
    b0b22000-b0c00000 ---p 00000000 00:00 0
    b0ca2000-b0ca3000 rw-p 00000000 00:00 0
    b0ca3000-b0ca4000 ---p 00000000 00:00 0
    b0ca4000-b21e4000 rw-p 00000000 00:00 0
    b2714000-b2881000 r-xp 00000000 08:03 13238295 /home/wtfcolt/wow/bin/lib/libmangosscript.so
    b2881000-b288c000 r--p 0016c000 08:03 13238295 /home/wtfcolt/wow/bin/lib/libmangosscript.so
    b288c000-b288e000 rw-p 00177000 08:03 13238295 /home/wtfcolt/wow/bin/lib/libmangosscript.so
    b288e000-b5100000 rw-p 00000000 00:00 0
    b5100000-b5122000 rw-p 00000000 00:00 0
    b5122000-b5200000 ---p 00000000 00:00 0
    b5283000-b52ff000 rw-p 00000000 00:00 0
    b52ff000-b5300000 ---p 00000000 00:00 0
    b5300000-b5b00000 rw-p 00000000 00:00 0
    b5b00000-b5b22000 rw-p 00000000 00:00 0
    b5b22000-b5c00000 ---p 00000000 00:00 0
    b5c02000-b5c40000 rw-p 00000000 00:00 0
    b5c7c000-b5cb3000 rw-p 00000000 00:00 0
    b5cff000-b5d00000 ---p 00000000 00:00 0
    b5d00000-b6500000 rw-p 00000000 00:00 0
    b6500000-b6521000 rw-p 00000000 00:00 0
    b6521000-b6600000 ---p 00000000 00:00 0
    b6613000-b661e000 r-xp 00000000 08:03 2884115 /lib/i386-linux-gnu/libnss_files-2.15.so
    b661e000-b661f000 r--p 0000a000 08:03 2884115 /lib/i386-linux-gnu/libnss_files-2.15.so
    b661f000-b6620000 rw-p 0000b000 08:03 2884115 /lib/i386-linux-gnu/libnss_files-2.15.so
    b6620000-b6621000 ---p 00000000 00:00 0
    b6621000-b6e24000 rw-p 00000000 00:00 0
    b6e24000-b6e2b000 r-xp 00000000 08:03 2884109 /lib/i386-linux-gnu/librt-2.15.so
    b6e2b000-b6e2c000 r--p 00006000 08:03 2884109 /lib/i386-linux-gnu/librt-2.15.so
    b6e2c000-b6e2d000 rw-p 00007000 08:03 2884109 /lib/i386-linux-gnu/librt-2.15.so
    b6e2d000-b6fd1000 r-xp 00000000 08:03 2884118 /lib/i386-linux-gnu/libc-2.15.so
    b6fd1000-b6fd3000 r--p 001a4000 08:03 2884118 /lib/i386-linux-gnu/libc-2.15.so
    b6fd3000-b6fd4000 rw-p 001a6000 08:03 2884118 /lib/i386-linux-gnu/libc-2.15.so
    b6fd4000-b6fd7000 rw-p 00000000 00:00 0
    b6fd7000-b6fee000 r-xp 00000000 08:03 2884107 /lib/i386-linux-gnu/libpthread-2.15.so
    b6fee000-b6fef000 r--p 00016000 08:03 2884107 /lib/i386-linux-gnu/libpthread-2.15.so
    b6fef000-b6ff0000 rw-p 00017000 08:03 2884107 /lib/i386-linux-gnu/libpthread-2.15.so
    b6ff0000-b6ff2000 rw-p 00000000 00:00 0
    b6ff2000-b700e000 r-xp 00000000 08:03 2884219 /lib/i386-linux-gnu/libgcc_s.so.1
    b700e000-b700f000 r--p 0001b000 08:03 2884219 /lib/i386-linux-gnu/libgcc_s.so.1
    b700f000-b7010000 rw-p 0001c000 08:03 2884219 /lib/i386-linux-gnu/libgcc_s.so.1
    b7010000-b7011000 rw-p 00000000 00:00 0
    b7011000-b703b000 r-xp 00000000 08:03 2884113 /lib/i386-linux-gnu/libm-2.15.so
    b703b000-b703c000 r--p 00029000 08:03 2884113 /lib/i386-linux-gnu/libm-2.15.so
    b703c000-b703d000 rw-p 0002a000 08:03 2884113 /lib/i386-linux-gnu/libm-2.15.so
    b703d000-b7115000 r-xp 00000000 08:03 15207687 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
    b7115000-b7116000 ---p 000d8000 08:03 15207687 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
    b7116000-b711a000 r--p 000d8000 08:03 15207687 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
    b711a000-b711b000 rw-p 000dc000 08:03 15207687 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
    b711b000-b7122000 rw-p 00000000 00:00 0
    b7122000-b7125000 r-xp 00000000 08:03 2884117 /lib/i386-linux-gnu/libdl-2.15.so
    b7125000-b7126000 r--p 00002000 08:03 2884117 /lib/i386-linux-gnu/libdl-2.15.so
    b7126000-b7127000 rw-p 00003000 08:03 2884117 /lib/i386-linux-gnu/libdl-2.15.so
    b7127000-b713b000 r-xp 00000000 08:03 2884213 /lib/i386-linux-gnu/libz.so.1.2.3.4
    b713b000-b713c000 r--p 00013000 08:03 2884213 /lib/i386-linux-gnu/libz.so.1.2.3.4
    b713c000-b713d000 rw-p 00014000 08:03 2884213 /lib/i386-linux-gnu/libz.so.1.2.3.4
    b713d000-b72cf000 r-xp 00000000 08:03 2883700 /lib/i386-linux-gnu/libcrypto.so.1.0.0
    b72cf000-b72de000 r--p 00192000 08:03 2883700 /lib/i386-linux-gnu/libcrypto.so.1.0.0
    b72de000-b72e5000 rw-p 001a1000 08:03 2883700 /lib/i386-linux-gnu/libcrypto.so.1.0.0
    b72e5000-b72e9000 rw-p 00000000 00:00 0
    b72e9000-b7588000 r-xp 00000000 08:03 15204365 /usr/lib/i386-linux-gnu/libmysqlclient.so.18.0.0
    b7588000-b758b000 r--p 0029e000 08:03 15204365 /usr/lib/i386-linux-gnu/libmysqlclient.so.18.0.0
    b758b000-b7601000 rw-p 002a1000 08:03 15204365 /usr/lib/i386-linux-gnu/libmysqlclient.so.18.0.0
    b7601000-b7604000 rw-p 00000000 00:00 0
    b760e000-b7618000 rw-p 00000000 00:00 0
    b7618000-b7794000 r-xp 00000000 08:03 13238273 /home/wtfcolt/wow/bin/lib/libACE-5.8.3.so
    b7794000-b779d000 r--p 0017b000 08:03 13238273 /home/wtfcolt/wow/bin/lib/libACE-5.8.3.so
    b779d000-b77a0000 rw-p 00184000 08:03 13238273 /home/wtfcolt/wow/bin/lib/libACE-5.8.3.so
    b77a0000-b77a3000 rw-p 00000000 00:00 0
    b77a3000-b77a4000 r-xp 00000000 00:00 0 [vdso]
    b77a4000-b77c4000 r-xp 00000000 08:03 2884108 /lib/i386-linux-gnu/ld-2.15.so
    b77c4000-b77c5000 r--p 0001f000 08:03 2884108 /lib/i386-linux-gnu/ld-2.15.so
    b77c5000-b77c6000 rw-p 00020000 08:03 2884108 /lib/i386-linux-gnu/ld-2.15.so
    bfb98000-bfbb9000 rw-p 00000000 00:00 0 [stack]
    Aborted (core dumped)
    [/PHP]

    My source is ~4 days old, pulling, compiling, and trying again. I see there were some updates


    User Feedback

    Recommended Comments

    Hi there, would you be able to recompile with debugging info turned on and give it a go with valgrind as well please? To compile with debug info you would do something like:
    [code]
    cmake .. -DCMAKE_INSTALL_PREFIX=/la/la/bin -DDEBUG=1
    [/code]

    And to run it with valgrind you would do something like:
    [code]
    valgrind /path/to/mangosd
    [/code]

    Please copy the output that valgrind gives you as well as a normal run with debugging enabled to this thread and i should have something more to go on. Thanks!

    Link to comment
    Share on other sites

    Just noticed that this seems to be related to another bug mentioned in [url]https://www.getmangos.eu/help-amp-support/9957-zero-rel19-top-5-major-bugs.html[/url].

    Would you like to try with the following patch?
    [code]
    From 36a585caeca6c4f3080ea2f5bd6776a0e3170e0e Mon Sep 17 00:00:00 2001
    From: lfxgroove
    Date: Tue, 29 Jul 2014 12:47:06 +0000
    Subject: [PATCH 1/2] [Core/Realmd] Fix crash when database version doesn't
    match.

    The general gut feeling is that the Runnable shouldn't ref-count itself, but rather eg.
    ACE_Strong_Bound_Ptr should be used for that purpose to ensure deletion at the correct
    time. Comments?

    Also remove #define MANGOS as that's defined on the command line when building
    ---
    src/game/SharedDefines.h | 1 -
    src/shared/Threading.cpp | 4 +++-
    2 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
    index 7261229..b58cafc 100644
    --- a/src/game/SharedDefines.h
    +++ b/src/game/SharedDefines.h
    @@ -28,7 +28,6 @@
    #include "Platform/Define.h"
    #include

    -#define MANGOS
    #define CLASSIC

    enum Gender
    diff --git a/src/shared/Threading.cpp b/src/shared/Threading.cpp
    index 668aa43..bb7e21d 100644
    --- a/src/shared/Threading.cpp
    +++ b/src/shared/Threading.cpp
    @@ -191,7 +191,9 @@ void Thread::resume()

    ACE_THR_FUNC_RETURN Thread::ThreadTask(void* param)
    {
    - Runnable* _task = (Runnable*)param;
    + Runnable* _task = static_cast(param);
    + _task->incReference();
    +
    _task->run();

    // task execution complete, free referecne added at
    --
    2.0.1


    From 6d8d16c7b375708770949065c0f0d37d57196da4 Mon Sep 17 00:00:00 2001
    From: lfxgroove
    Date: Tue, 29 Jul 2014 12:58:48 +0000
    Subject: [PATCH 2/2] [Core] Revert part of last commit

    ---
    src/game/SharedDefines.h | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
    index b58cafc..17fae55 100644
    --- a/src/game/SharedDefines.h
    +++ b/src/game/SharedDefines.h
    @@ -28,6 +28,9 @@
    #include "Platform/Define.h"
    #include

    +#ifndef MANGOS
    +#define MANGOS
    +#endif /* MANGOS */
    #define CLASSIC

    enum Gender
    --
    2.0.1
    [/code]

    You can apply it with git apply or git am. See [url]https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/[/url] for some more info. Please reply back if it works.

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • 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