theAsmodai / metamod-r

Metamod is a plugin/DLL manager that sits between the Half-Life Engine and an HL Game mod, allowing the dynamic loading/unloading of mod-like DLL plugins to add functionality to the HL server or game mod. Metamod-r is improved version of metamod.
GNU General Public License v3.0
139 stars 35 forks source link

Some Help wanted with "Segmentation Fault" error and dumping core #42

Open Hembi opened 5 years ago

Hembi commented 5 years ago

Dear Asmodai,

I found this description: https://github.com/theAsmodai/metamod-r/wiki/Troubbleshouting I would like to download the "Fix It All" Metamod modul by Lev, because I got on my servers Segmentation Fault error and I would like to configure and test the creating of the core dump files. Could you please upload this module to an other file sharing site?

s1lentq commented 5 years ago

you can use this instead "Fix It All"

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    register_plugin("Crash", "1.0", "dev-cs.ru");

    // Generate exception code 0xC0000005
    set_task(1.0, "GenerateExceptionCode");
}

public GenerateExceptionCode()
{
    server_print("[Crash]: Executed segmentation fault! Exception code: 0xC0000005");

    // Put invalid pointer that will be generate access violation exception
    set_tr2(0xDEADBEEF, TR_InWater, true);
}
Hembi commented 5 years ago

Thank you silentq. The server generate the core dump and the log properly.

I would like to ask which gdb commands provide the most detailed crash log?

theAsmodai commented 5 years ago

backtrace

Hembi commented 5 years ago

Hmm and this is enough? Thank you for the answer. I have a few additional questions then please close this issue, thank you in advance for the answer.

How can this informs about the real problem? The backtrace command prints only these information after crashing the server with the code provided by silentq:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf2cd1ecf in ?? () from cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
#0  0xf2cd1ecf in ?? () from cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
#1  0x00000000 in ?? () 

So the server throws a SIGSEGV signal which means the program tried to modified an invalid memory address and the name of the .so file which tried to write to this invalid address. How can you figure out what exactly caused it?

stamepicmorg commented 5 years ago

Hello everybody :smile:

I am informing that i added at Troubbleshouting pages (rus\en) 111 mirrored links for zips from aghl forum. except of "fix it all", sorry. i will be mirror it too.. but later, if aghl up.


and @AEnimka will translate this page soon.


upd:

@Hembi, uploaded to github original fixitall plugin. link to docs already add. fixitall_mm.0.0.zip

Hembi commented 5 years ago

@stamepicmorg Thank you, I downloaded and used it. I am waiting for a response to my previous question.