Jump to content

Recommended Posts

I have a problem sometimes with my server, the channel 1 crash.

I debugged the game.core and this is the results:

 

With gdb:

bt

Core was generated by `./core_1'.
Program terminated with signal SIGABRT, Aborted.
#0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
[Current thread is 1 (LWP 100495)]
(gdb) bt
#0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
#1  0x28cf0b3b in raise () from /usr/lib32/libc.so.7
#2  0x28cf0a9f in abort () from /usr/lib32/libc.so.7
#3  0x2864ef75 in __gnu_cxx::__verbose_terminate_handler ()
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/vterminate.cc:95
#4  0x2864bc15 in __cxxabiv1::__terminate (
    handler=0x2864ede0 <__gnu_cxx::__verbose_terminate_handler()>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:47
#5  0x2864bcac in std::terminate ()
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:57
#6  0x2864bf07 in __cxxabiv1::__cxa_throw (obj=0x299c8860,
    tinfo=0x286e1c00 <typeinfo for std::bad_alloc>,
    dest=0x286499c0 <std::bad_alloc::~bad_alloc()>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_throw.cc:84
#7  0x2864d4d2 in operator new (sz=<optimized out>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/new_op.cc:54
#8  0x080dda31 in CHARACTER_MANAGER::CreateCharacter (this=0xffffc5cc,
    name=0xf9eb611d "Salbatic devotat", dwPID=0) at char_manager.cpp:84
#9  0x080de056 in CHARACTER_MANAGER::SpawnMob (this=0xffffc5cc, dwVnum=502,
    lMapIndex=43, x=857352, y=269470, z=0, bSpawnMotion=true, iRot=-1,
    bShow=true) at char_manager.cpp:415
#10 0x080de6c6 in CHARACTER_MANAGER::SpawnMobRange (this=0xffffc5cc,
    dwVnum=502, lMapIndex=43, sx=855616, sy=268838, ex=857616, ey=270838,
--Type <RET> for more, q to quit, c to continue without paging--
    eption=true, bSpawnMotion=true, bAggressive=false)
    at char_manager.cpp:466
#11 0x080de89a in CHARACTER_MANAGER::SpawnGroup (this=0xffffc5cc, dwVnum=502,
    lMapIndex=43, sx=855616, sy=268838, ex=857616, ey=270838, pkRegen=0x0,
    bAggressive_=false, pDungeon=0x0) at char_manager.cpp:596
#12 0x080f871d in CHARACTER::__StateIdle_Stone (this=0xe5e0f800)
    at char_state.cpp:413
#13 0x0808e698 in CHARACTER::UpdateStateMachine (this=0xe5e0f800,
    dwPulse=15766990) at char.cpp:5017
#14 0x080e03c4 in std::mem_fun1_t<void, CHARACTER, unsigned int>::operator() (
    __x=<optimized out>, __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/4.2/bits/stl_function.h:656
#15 std::binder2nd<std::mem_fun1_t<void, CHARACTER, unsigned int> >::operator()
    (__x=<optimized out>, this=<optimized out>)
    at /usr/include/c++/4.2/bits/stl_function.h:446
#16 std::for_each<__gnu_cxx::__normal_iterator<CHARACTER**, std::vector<CHARACTER*, std::allocator<CHARACTER*> > >, std::binder2nd<std::mem_fun1_t<void, CHARACTER, unsigned int> > > (__first=..., __last=..., __f=...)
    at /usr/include/c++/4.2/bits/stl_algo.h:159
#17 0x080dfe21 in CHARACTER_MANAGER::Update (this=0xffffc5cc, iPulse=15766990)
    at char_manager.cpp:695
#18 0x082acc38 in idle () at main.cpp:962
#19 0x082ae326 in main (argc=1, argv=0xffffdbc8) at main.cpp:628

 

bt full

#0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
No symbol table info available.
#1  0x28cf0b3b in raise () from /usr/lib32/libc.so.7
No symbol table info available.
#2  0x28cf0a9f in abort () from /usr/lib32/libc.so.7
No symbol table info available.
#3  0x2864ef75 in __gnu_cxx::__verbose_terminate_handler ()
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#4  0x2864bc15 in __cxxabiv1::__terminate (
    handler=0x2864ede0 <__gnu_cxx::__verbose_terminate_handler()>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:47
No locals.
#5  0x2864bcac in std::terminate ()
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:57
No locals.
#6  0x2864bf07 in __cxxabiv1::__cxa_throw (obj=0x299c8860,
    tinfo=0x286e1c00 <typeinfo for std::bad_alloc>,
    dest=0x286499c0 <std::bad_alloc::~bad_alloc()>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_throw.cc:84
        header = <optimized out>
#7  0x2864d4d2 in operator new (sz=<optimized out>)
    at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/new_op.cc:54
        handler = <optimized out>
        p = 0x0
#8  0x080dda31 in CHARACTER_MANAGER::CreateCharacter (this=0xffffc5cc,
    name=0xf9eb611d "Salbatic devotat", dwPID=0) at char_manager.cpp:84
        dwVID = <optimized out>
        ch = <optimized out>

Now I know that is from mob 502, but I don't know what problem...I looked to regen and mob_proto and looks fine....

Thanks in advanced.

 

Link to comment
Share on other sites

  • Honorable Member

It crashed when calling the new operator, which means it failed to allocate more memory over a 4gb of process (the limit of 32bit apps).

Metin2 processes take 4gb of ram only when they have memory leaks.

Most of the times, the memory leak comes from fetched mysql queries that didn't get freed.

  • Sad 1
  • Love 3
Link to comment
Share on other sites

1 hour ago, martysama0134 said:

It crashed when calling the new operator, which means it failed to allocate more memory over a 4gb of process (the limit of 32bit apps).

Metin2 processes take 4gb of ram only when they have memory leaks.

Most of the times, the memory leak comes from fetched mysql queries that didn't get freed.

Thank you. Can I find out where this memory leak is from? My knowledge is quite small...

Link to comment
Share on other sites

  • Honorable Member
4 hours ago, Adrian1997 said:

Thank you. Can I find out where this memory leak is from? My knowledge is quite small...

Check each DBManager::instance().DirectQuery if they are either wrapped in smart pointers (auto_ptr/unique_ptr), or freed using delete.
Most of the times, it's this.

  • Love 1
Link to comment
Share on other sites

  • 10 months later...
En 13/1/2019 a las 4:33 PM, martysama0134 dijo:

Check each DBManager::instance().DirectQuery if they are either wrapped in smart pointers (auto_ptr/unique_ptr), or freed using delete.
Most of the times, it's this.

I have the same problem, I am using a base that belongs to your author (Metin2rage) and the same problem happens to me the game.core is regenaro and with a weight of 3GB, I need help

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.