Azerothcore-wotlk: [Crash] Issue with .player learn command when the player already know the spell in console+SOAP

Created on 6 Oct 2020  路  11Comments  路  Source: azerothcore/azerothcore-wotlk

Original thought:
I was thinking that after running several commands through soap this crashes the worldserver.

First update:
I found that it was related to the .player learn command and thought that the crash was due to a lot of commands running at the same time.

New update:
The worldserver crashes after running the .player learn command when the player already knows that spell. So it is not .send mail only when I run .player learn commands, I attached that this looks like is related to GetPlayer() method.

CURRENT BEHAVIOUR:

When I run the .player learn command and the player already knows a spell, this crashes the worldserver. I have a way to fix this using web code, but should not happen if running commands directly to the console.

Here is the crash log:

set logging on
set debug timestamp
run

433790.411171 [Thread debugging using libthread_db enabled]
433790.411205 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
433790.737338 [New Thread 0x7ffff49ed700 (LWP 65230)]
433790.745126 [New Thread 0x7ffff397f700 (LWP 65231)]
433790.793680 [New Thread 0x7ffff257f700 (LWP 65232)]
433809.295454 [New Thread 0x7fffb71ff700 (LWP 65281)]
433815.545749 [New Thread 0x7fffa13ff700 (LWP 65284)]
433815.546124 [New Thread 0x7fffa09fe700 (LWP 65285)]
433815.546483 [New Thread 0x7fff9f9ff700 (LWP 65286)]
433815.547661 [New Thread 0x7fff9f1fe700 (LWP 65287)]
433815.547703 [Thread 0x7fff9f9ff700 (LWP 65286) exited]
433815.548126 [New Thread 0x7fff9deab700 (LWP 65288)]
433815.548579 [New Thread 0x7fff9d1ff700 (LWP 65289)]
433815.548813 [New Thread 0x7fff9c7fe700 (LWP 65290)]

Thread 6 "worldserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa13ff700 (LWP 65284)]
0x00000000004f85bc in WorldSession::GetPlayer() const ()
gdb.txt:4: Error in sourced command file:
Undefined command: "bt433518".  Try "help".
EXPECTED BLIZZLIKE BEHAVIOUR:

This should return "player already know that spell" in the console and not crash.

STEPS TO REPRODUCE THE PROBLEM:
  • Connect to the worldserver.
  • Run .player learn $name 1
  • Run .player learn $name 1 again
  • Profit
EXTRA NOTES:

So, looks like the crash log is not related to this issue maybe? but I know it is because the .player learn command. This crashes on both, Windows and Ubuntu

AC HASH/COMMIT:

4406830e36fc16e2fd79354a70f7650756bf6257

OPERATING SYSTEM:

Ubuntu 18.04 + Windows 10

MODULES:

None.

OTHER CUSTOMIZATIONS:

No customizations

Most helpful comment

So finally had time to look at this
Will submit a PR for this soon :)!

Also, for debugging stuff like this, it would be beneficial if you compile it in Debug o RelWithDebInfo as it will show us more @asfo

All 11 comments

@FrancescoBorzi
@Helias
@Kitzunu
Forget the assignment, can you take a look at this?

@peti446

I mean, without a crashlog it would be hard to guess the issue as I dont use soap

Without a crash log its hard to guess yhea. I have been using a lot of soap lately especially for the pr 3420. I have never experienced any soap crash with it (send over 50K mails over a small amount of time) on windows.

I think this crash might be more related to Ubuntu then windows as I did once see a crash on Linux that might be related to soap, however it only happened to me once. I will do some more testing on this see if I can reproduce it more in windows and Linux.

I mean, without a crashlog it would be hard to guess the issue as I dont use soap

Can you share me how to get the crash log? (In Ubuntu btw)

Didn't find how in the wiki.

I'm going to test this again in Windows 10 and compare it to Ubuntu to check if its actually something related to Ubuntu and will add the results as soon as possible.

@asfo https://stackoverflow.com/questions/62910364/azerothcore-with-gdb-restarter-and-crashlog
TLDR; Compile with releasewithdebinfo then create gdb.txt with the following text:

set logging on
set debug timestamp
run
bt

Next to the binary and run it with:
gdb -x path/To/gdb.txt --batch path/to/worlderver

@asfo https://stackoverflow.com/questions/62910364/azerothcore-with-gdb-restarter-and-crashlog
TLDR; Compile with releasewithdebinfo then create gdb.txt with the following text:

set logging on
set debug timestamp
run
bt

Next to the binary and run it with:
gdb -x path/To/gdb.txt --batch path/to/worlderver

Thanks!, will do that and put the crashlog in the issue.

I updated the original issue with the crashlog, and I attach it here:

set logging on
set debug timestamp
run

433790.411171 [Thread debugging using libthread_db enabled]
433790.411205 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
433790.737338 [New Thread 0x7ffff49ed700 (LWP 65230)]
433790.745126 [New Thread 0x7ffff397f700 (LWP 65231)]
433790.793680 [New Thread 0x7ffff257f700 (LWP 65232)]
433809.295454 [New Thread 0x7fffb71ff700 (LWP 65281)]
433815.545749 [New Thread 0x7fffa13ff700 (LWP 65284)]
433815.546124 [New Thread 0x7fffa09fe700 (LWP 65285)]
433815.546483 [New Thread 0x7fff9f9ff700 (LWP 65286)]
433815.547661 [New Thread 0x7fff9f1fe700 (LWP 65287)]
433815.547703 [Thread 0x7fff9f9ff700 (LWP 65286) exited]
433815.548126 [New Thread 0x7fff9deab700 (LWP 65288)]
433815.548579 [New Thread 0x7fff9d1ff700 (LWP 65289)]
433815.548813 [New Thread 0x7fff9c7fe700 (LWP 65290)]

Thread 6 "worldserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa13ff700 (LWP 65284)]
0x00000000004f85bc in WorldSession::GetPlayer() const ()
gdb.txt:4: Error in sourced command file:
Undefined command: "bt433518".  Try "help".

I tried multiple times this, and the same issue. I think this is happening only in Ubuntu, maybe due the library it shows?...

Ok, I updated my original issue with the title and everything, hope this helps to fix this issue.

So finally had time to look at this
Will submit a PR for this soon :)!

Also, for debugging stuff like this, it would be beneficial if you compile it in Debug o RelWithDebInfo as it will show us more @asfo

So finally had time to look at this
Will submit a PR for this soon :)!

Also, for debugging stuff like this, it would be beneficial if you compile it in Debug o RelWithDebInfo as it will show us more @asfo

I did it 馃 or I tough I did it since in the "compilation options" after the CMake it showed "RelWithDebInfo" and that was the only information I was able to get :(

Thanks for your support!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CyberFoxHax picture CyberFoxHax  路  3Comments

cts17 picture cts17  路  3Comments

wowissues picture wowissues  路  3Comments

Franklampardst picture Franklampardst  路  4Comments

wampirr picture wampirr  路  3Comments