Jump to content
  • 0

Segmentation fault while creating random bot


D Q

Question


Initializing AI Playerbot by ike3, based on the original Playerbot by blueboy
Creating new random bot for class 1
Segmentation fault (core dumped)

When I enable aiplayerbot, mangod would crash at startup as above.
I can't find anything useful from world-server.log.

backtrace from the coredump
 

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./mangosd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
74	../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
[Current thread is 1 (Thread 0x7f77cc2c2740 (LWP 80735))]
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
#1  0x0000559616345e55 in RandomPlayerbotFactory::CreateRandomBotName[abi:cxx11](unsigned char) ()
#2  0x0000559616346257 in RandomPlayerbotFactory::CreateRandomBot(unsigned char) ()
#3  0x0000559616348abf in RandomPlayerbotFactory::CreateRandomBots() ()
#4  0x0000559616336e35 in PlayerbotAIConfig::Initialize() ()
#5  0x00005596162a77f0 in World::SetInitialWorldSettings() ()
#6  0x0000559615fc0e91 in main ()

Do we have any known bug in this area?

Thanks

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

By reading the code, I used a workaround by setting random bot to 0. So that we don't run into the crashing code at all. But it would be fun to have som random bots :( 

AiPlayerbot.RandomBotAccountCount = 0

 

    for (int accountNumber = 0; accountNumber < sPlayerbotAIConfig.randomBotAccountCount; ++accountNumber)
    {
    	// ......

        RandomPlayerbotFactory factory(accountId);
        for (uint8 cls = CLASS_WARRIOR; cls < MAX_CLASSES; ++cls)
        {
            if (cls != 10 && cls != 6)
            {
                factory.CreateRandomBot(cls);       <==== crashing from here
            }
        }

 

Link to comment
Share on other sites

  • 0

hmm, the coredump itself is already 200+MB. And it doesn't make sense without the mangos binary(and probably the same server environment) I am using. So do you still need the whole thing?

I mean I can run gdb on my machine to get whatever you need.

Link to comment
Share on other sites

  • 0

The full traceback and crash dump have good details on what the core was doing before the crash and where the assert happened.

Don't need the binaries as the addresses change per startup. Just the traceback and coredump is needed.
~200mb file is rare, but you can upload that compressed; that would be awesome.

Once I have the files, I will start reviewing the issue or someone from the development team.

Link to comment
Share on other sites

  • 0

Anyway, I got it for you from my server.

(gdb) thread apply all bt

Thread 6 (Thread 0x7f77cb2a4640 (LWP 80744)):
#0  0x00007f77cc5337f8 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7f77cb2a3dd0, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x00007f77cc538677 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x00005596168aaeef in ACE_Based::Thread::Sleep(unsigned long) ()
#3  0x00005596168a185a in SqlDelayThread::run() ()
#4  0x00005596168aaa5d in ACE_Based::Thread::ThreadTask(void*) ()
#5  0x00007f77cc4e2ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f77cc574660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7f77bbfff640 (LWP 80747)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559619075af0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559619075af0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559619075af0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f77cc4e1a41 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559619075a90, cond=0x559619075ac8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559619075ac8, mutex=0x559619075a90) at ./nptl/pthread_cond_wait.c:627
#5  0x00005596168b84b5 in ACE_Condition<ACE_Thread_Mutex>::wait(ACE_Time_Value const*) ()
#6  0x00005596168b7842 in ACE_Activation_Queue::dequeue(ACE_Time_Value*) ()
#7  0x00005596168a9dc5 in DelayExecutor::svc() ()
#8  0x00005596168fa435 in ACE_Task_Base::svc_run(void*) ()
#9  0x0000559616915c9f in ACE_Thread_Adapter::invoke() ()
#10 0x00007f77cc4e2ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#11 0x00007f77cc574660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7f77c898a640 (LWP 80746)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559619075a--Type <RET> fo--Typ--Typ--Type <---Ty----Typ--Type --Ty----Ty--Type <RET> for more, q to quit, c to continue without paging--
f0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559619075af0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559619075af0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f77cc4e1a41 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559619075a90, cond=0x559619075ac8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559619075ac8, mutex=0x559619075a90) at ./nptl/pthread_cond_wait.c:627
#5  0x00005596168b84b5 in ACE_Condition<ACE_Thread_Mutex>::wait(ACE_Time_Value const*) ()
#6  0x00005596168b7842 in ACE_Activation_Queue::dequeue(ACE_Time_Value*) ()
#7  0x00005596168a9dc5 in DelayExecutor::svc() ()
#8  0x00005596168fa435 in ACE_Task_Base::svc_run(void*) ()
#9  0x0000559616915c9f in ACE_Thread_Adapter::invoke() ()
#10 0x00007f77cc4e2ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#11 0x00007f77cc574660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f77cc2a6640 (LWP 80738)):
#0  0x00007f77cc5337f8 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7f77cc2a5dd0, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x00007f77cc538677 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x00005596168aaeef in ACE_Based::Thread::Sleep(unsigned long) ()
#3  0x00005596168a185a in SqlDelayThread::run() ()
#4  0x00005596168aaa5d in ACE_Based::Thread::ThreadTask(void*) ()
#5  0x00007f77cc4e2ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f77cc574660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f77cbaa5640 (LWP 80741)):
#0  0x00007f77cc5337f8 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7f77cbaa4dd0, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x00007f77cc538677 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x00005596168aaeef in ACE_Based::Thread::Sleep(unsigned long) ()
#3  0x00005596168a185a in SqlDelayThread::run() ()
#4  0x00005596168aaa5d in ACE_Based::Thread::ThreadTask(void*) ()
#5  0x00007f77cc4e2ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f77cc574660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f77cc2c2740 (LWP 80735)):
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
#1  0x0000559616345e55 in RandomPlayerbotFactory::CreateRandomBotName[abi:cxx11](unsigned char) ()
#2  0x0000559616346257 in RandomPlayerbotFactory::CreateRandomBot(unsigned char) ()
#3  0x0000559616348abf in RandomPlayerbotFactory::CreateRandomBots() ()
#4  0x0000559616336e35 in PlayerbotAIConfig::Initialize() ()
#5  0x00005596162a77f0 in World::SetInitialWorldSettings() ()
#6  0x0000559615fc0e91 in main ()

Thread 1 should be the crashing thread.

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