Jump to content
  • SQL code faulty somewhere...


    Xenithar
    • Status: Completed
      Main Category: Core / Mangos Daemon
      Sub-Category: Core Crash
      Version: 21.0 Milestone: 21 Priority: New
      Implemented Version: 21.5.x

    SQL code faulty somewhere...

    Somewhere there is a bug in our SQL code for updating DK's in Zero. It is passing parameters and apparently should not be. I haven't dug into this yet but it happens once in a while and brings the server completely down. I will look into it after I do my first PR for the quest text corrections if nobody else has before me.
    [code]
    GameEvent 61 "Stormwind City - Stockades Jail Break" removed.
    Next game event check in 1200 seconds.
    Map::GetHitPosition vmaps corrects gained with static objects! new dest coords are X:-10585.604492 Y:-1194.846802 Z:28.749500
    Map::GetHitPosition vmaps corrects gained with static objects! new dest coords are X:-10585.529297 Y:-1196.285278 Z:28.749500
    Map::GetHitPosition vmaps corrects gained with static objects! new dest coords are X:-10585.487305 Y:-1195.507568 Z:28.749500
    Map::GetHitPosition vmaps corrects gained with static objects! new dest coords are X:-10585.888672 Y:-1194.150635 Z:28.749500
    Map::GetHitPosition vmaps corrects gained with static objects! new dest coords are X:-10585.835938 Y:-1192.843262 Z:28.749500
    GameEvent 61 "Stormwind City - Stockades Jail Break" started.
    Next game event check in 600 seconds.
    SQL ERROR: wrong amount of parameters (2 instead of 0)
    SQL ERROR: statement: UPDATE characters SET stored_dishonorable_kills = stored_dishonorable_kills + %u WHERE guid = %u
    /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68: Error: Assertion in Execute failed: false
    Stack Trace:
    /home/username/zero/bin/mangosd(_ZN9ObjectMgr15FlushRankPointsEj+0x27d) [0xaa9a93]
    /home/username/zero/bin/mangosd(_ZN5World22ServerMaintenanceStartEv+0x68) [0xd638a2]
    /home/username/zero/bin/mangosd(_ZN5World6UpdateEj+0x378) [0xd622d6]
    /home/username/zero/bin/mangosd(_ZN13WorldRunnable3runEv+0x64) [0xa395a4]
    /home/username/zero/bin/mangosd(_ZN9ACE_Based6Thread10ThreadTaskEPv+0x37) [0xeb4e51]
    /usr/lib/libACE-6.0.3.so(_ZN21ACE_OS_Thread_Adapter6invokeEv+0xa6) [0x7ffff7745636]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50) [0x7ffff5edab50]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ffff5c2495d]
    mangosd: /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68: bool SqlStatement::Execute(): Assertion `"false" && 0' failed.

    Program received signal SIGABRT, Aborted.
    [Switching to Thread 0x7fffefa75700 (LWP 2214)]
    0x00007ffff5b7b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    (gdb) backtrace
    #0 0x00007ffff5b7b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1 0x00007ffff5b7e3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2 0x00007ffff5b74311 in __assert_fail ()
    from /lib/x86_64-linux-gnu/libc.so.6
    #3 0x0000000000e99ce4 in SqlStatement::Execute (this=0x7fffefa74d20)
    at /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68
    #4 0x0000000000acb254 in SqlStatement::PExecute (this=0x7fffefa74d20, param1=1, param2=2)
    at /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.h:512
    #5 0x0000000000aa9a93 in ObjectMgr::FlushRankPoints (this=0x162e4f0,
    dateTop=42322)
    at /usr/src/zero/server/src/game/Object/ObjectMgr.cpp:2760
    #6 0x0000000000d638a2 in World::ServerMaintenanceStart (this=0x162d8c0)
    at /usr/src/zero/server/src/game/WorldHandlers/World.cpp:1965
    #7 0x0000000000d622d6 in World::Update (this=0x162d8c0, diff=51)
    at /usr/src/zero/server/src/game/WorldHandlers/World.cpp:1554
    #8 0x0000000000a395a4 in WorldRunnable::run (this=0x69e17d0)
    at /usr/src/zero/server/src/mangosd/WorldRunnable.cpp:70
    #9 0x0000000000eb4e51 in ACE_Based::Thread::ThreadTask (param=0x69e17d0)
    at /usr/src/zero/server/src/shared/Threading/Threading.cpp:197
    #10 0x00007ffff7745636 in ACE_OS_Thread_Adapter::invoke() ()
    from /usr/lib/libACE-6.0.3.so
    #11 0x00007ffff5edab50 in start_thread ()
    from /lib/x86_64-linux-gnu/libpthread.so.0
    #12 0x00007ffff5c2495d in clone () from /lib/x86_64-linux-gnu/libc.so.6
    #13 0x0000000000000000 in ?? ()
    (gdb)
    [/code]
    This seems to happen randomly though, not regularly. I had earned at least one DK on each of my characters a week ago to see if it would happen after the first time. It did not until last night while I was asleep and my server was empty. The only fix is to truncate the honor table. The server will no longer start after this crash.


    User Feedback

    Recommended Comments

    This is still happening. It did not happen last week and I did not update (lack of time, but I am about to have three paid weeks off) and it happened today. I am doing a fresh clone and build, and we will see if it starts. Currently I cannot start the server at all, so after this build finishes, if the bug is fixed, I SHOULD be able to start it up. Below is a dump from this morning.
    [code]
    WORLD: Sent SMSG_QUESTGIVER_STATUS for Creature (Entry: 6929 Guid: 4661)
    WORLD: Received opcode CMSG_QUESTGIVER_STATUS_QUERY - for Player Tyree (Guid: 7) to Creature (Entry: 5611 Guid: 706)
    WORLD: Sent SMSG_QUESTGIVER_STATUS for Creature (Entry: 5611 Guid: 706)
    WORLD: Received opcode CMSG_QUESTGIVER_STATUS_QUERY - for Player Tyree (Guid: 7) to Creature (Entry: 13418 Guid: 53618) WORLD: Sent SMSG_QUESTGIVER_STATUS for Creature (Entry: 13418 Guid: 53618)
    WORLD: Received opcode CMSG_QUESTGIVER_STATUS_QUERY - for Player Tyree (Guid: 7) to Creature (Entry: 9550 Guid: 46973)
    WORLD: Sent SMSG_QUESTGIVER_STATUS for Creature (Entry: 9550 Guid: 46973)
    WORLD: Received opcode CMSG_QUESTGIVER_STATUS_QUERY - for Player Tyree (Guid: 7) to Creature (Entry: 15188 Guid: 6504)
    WORLD: Sent SMSG_QUESTGIVER_STATUS for Creature (Entry: 15188 Guid: 6504) Got packet, opcode 02, size 24
    STORAGE_SIZE: 24 02 11 00 F3 ED A1 1C 01 | 53 83 5E 03 E9 E9 00 74
    25 E9 E9 E9 E9 E9 E9 E9 Handle data CHECKSUM IS VALID ServerTicks 116404702, RequestTicks 116367402, CLientTicks 56525651 Waittime 37300
    RESULT MODULE_CHECK passed CheckId 769 account Id 4
    RESULT MODULE_CHECK passed CheckId 768 account Id 4 RESULT MEM_CHECK passed CheckId 638 account Id 4 RESULT PAGE_CHECK passed CheckId 669 account Id 4
    RESULT PAGE_CHECK passed CheckId 668 account Id 4 RESULT PAGE_CHECK passed CheckId 667 account Id 4
    RESULT PAGE_CHECK passed CheckId 666 account Id 4
    RESULT PAGE_CHECK passed CheckId 665 account Id 4
    RESULT PAGE_CHECK passed CheckId 664 account Id 4 RESULT PAGE_CHECK passed CheckId 663 account Id 4
    WORLD: Received opcode CMSG_GOSSIP_HELLO
    WORLD: Sent SMSG_GOSSIP_MESSAGE from Creature (Entry: 13420 Guid: 53620)
    WORLD: CMSG_GOSSIP_SELECT_OPTION
    [SD3]: Gossip selection, sender: 0, action: 3
    WORLD: Sent SMSG_LIST_INVENTORY
    [ ] 0%
    [ ] 0%
    SQL ERROR: wrong amount of parameters (2 instead of 0)
    SQL ERROR: statement: UPDATE characters SET stored_dishonorable_kills = stored_dishonorable_kills + %u WHERE guid = %u
    /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68: Error: Assertion in Execute failed: false
    Stack Trace:
    /home/ryana/zero/bin/mangosd(_ZN9ObjectMgr15FlushRankPointsEj+0x27d) [0xaa9a93]
    /home/ryana/zero/bin/mangosd(_ZN5World22ServerMaintenanceStartEv+0x68) [0xd638a2]
    /home/ryana/zero/bin/mangosd(_ZN5World6UpdateEj+0x378) [0xd622d6]
    /home/ryana/zero/bin/mangosd(_ZN13WorldRunnable3runEv+0x64) [0xa395a4]
    /home/ryana/zero/bin/mangosd(_ZN9ACE_Based6Thread10ThreadTaskEPv+0x37) [0xeb4e51]
    /usr/lib/libACE-6.0.3.so(_ZN21ACE_OS_Thread_Adapter6invokeEv+0xa6) [0x7ffff7745636]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50) [0x7ffff5edab50]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ffff5c2495d]
    mangosd: /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68: bool SqlStatement::Execute(): Assertion `"false" && 0' failed.

    Program received signal SIGABRT, Aborted.
    [Switching to Thread 0x7fffefa75700 (LWP 25120)]
    0x00007ffff5b7b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    (gdb) backtrace
    #0 0x00007ffff5b7b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1 0x00007ffff5b7e3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2 0x00007ffff5b74311 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
    #3 0x0000000000e99ce4 in SqlStatement::Execute (this=0x7fffefa74d20)
    at /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.cpp:68#4 0x0000000000acb254 in SqlStatement::PExecute (
    this=0x7fffefa74d20, param1=1, param2=3)
    at /usr/src/zero/server/src/shared/Database/SqlPreparedStatement.h:512
    #5 0x0000000000aa9a93 in ObjectMgr::FlushRankPoints (this=0x162e4f0,
    dateTop=42350) at /usr/src/zero/server/src/game/Object/ObjectMgr.cpp:2760
    #6 0x0000000000d638a2 in World::ServerMaintenanceStart (this=0x162d8c0)
    at /usr/src/zero/server/src/game/WorldHandlers/World.cpp:1965
    #7 0x0000000000d622d6 in World::Update (this=0x162d8c0, diff=50)
    at /usr/src/zero/server/src/game/WorldHandlers/World.cpp:1554
    #8 0x0000000000a395a4 in WorldRunnable::run (this=0x69e44e0)
    at /usr/src/zero/server/src/mangosd/WorldRunnable.cpp:70
    #9 0x0000000000eb4e51 in ACE_Based::Thread::ThreadTask (param=0x69e44e0)
    at /usr/src/zero/server/src/shared/Threading/Threading.cpp:197
    #10 0x00007ffff7745636 in ACE_OS_Thread_Adapter::invoke() ()
    from /usr/lib/libACE-6.0.3.so
    #11 0x00007ffff5edab50 in start_thread ()
    from /lib/x86_64-linux-gnu/libpthread.so.0
    #12 0x00007ffff5c2495d in clone () from /lib/x86_64-linux-gnu/libc.so.6
    #13 0x0000000000000000 in ?? ()
    (gdb) next
    Single stepping until exit from function raise,
    which has no line number information.
    [Thread 0x7fffee272700 (LWP 25123) exited]
    [Thread 0x7fffeea73700 (LWP 25122) exited]
    [Thread 0x7fffefa75700 (LWP 25120) exited]
    [Thread 0x7ffff0276700 (LWP 25119) exited]
    [Thread 0x7ffff209f700 (LWP 25118) exited]
    [Thread 0x7ffff493a700 (LWP 25117) exited]
    [Thread 0x7ffff513b700 (LWP 25116) exited]
    [Thread 0x7ffff5b48700 (LWP 25115) exited]
    [Thread 0x7ffff7fed720 (LWP 25111) exited]

    Program terminated with signal SIGABRT, Aborted.
    The program no longer exists.
    (gdb)
    [/code]
    Any attempt to start the server results in the same crash. Again, I will see if rebuilding fixes this.

    Link to comment
    Share on other sites

    This statement is defined in file : \src\game\Object\ObjectMgr.cpp Line 2779

    SqlStatement stmt = CharacterDatabase.CreateStatement(updDishonorable, " = (stored_dishonorable_kills + ?) WHERE guid = ?");

    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