[Tutorial] - how to get meaningful crash reports - linux server
#1

First install GDB - gnu debugger on your server.
Then create a runserver.sh file with these 3 lines:

Код:
echo 0 | gdb -batch-silent -ex "run" -ex "set logging overwrite on" -ex "set logging file last_crash.log" -ex "set logging on" -ex "set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo backtrace:\n" -ex "backtrace full" -ex "echo \n\nregisters:\n" -ex "info registers" -ex "echo \n\ncurrent instructions:\n" -ex "x/16i \$pc" -ex "echo \n\nthreads backtrace:\n" -ex "thread apply all backtrace" -ex "echo \n\nMemory map:\n" -ex "info files" -ex "set logging off" -ex "quit" samp03svr
date >> crash.log
cat last_crash.log >> crash.log
Mark the file as executable and run the .sh file instead of samp03svr directly:

Код:
user@host:~/samp03$ ./runserver
The server will run in GDB with a script that will generate EXCELLENT crash reports, you are encouraged to always use this method to run your server.

These crash reports will be greatly superior to anything else and will be of much more help when analyzing what happened when your server crashes and what caused it.

The script will generate last_crash.log and crash.log - crash.log contains a history of all crashes and last_crash contains the last crash report that happenes.

You can also add core dumps support by adding "-ex "generate-core-file"" before "-ex "set logging off"".
Core dumps can be a few-100 mb big but they allow you to do additional analysis of a crash by a skilled programmer after the crash had happened.
Reply


Messages In This Thread
[Tutorial] - how to get meaningful crash reports - linux server - by JernejL - 17.02.2014, 06:42
Re: [Tutorial] - how to get meaningful crash reports - linux server - by Kyle - 17.02.2014, 08:05
Re: [Tutorial] - how to get meaningful crash reports - linux server - by JernejL - 17.02.2014, 08:38
Re: [Tutorial] - how to get meaningful crash reports - linux server - by blackgangs - 15.03.2014, 09:13
Re: [Tutorial] - how to get meaningful crash reports - linux server - by Sublime - 19.03.2014, 12:05
Re: [Tutorial] - how to get meaningful crash reports - linux server - by JernejL - 13.09.2014, 06:13
Re: [Tutorial] - how to get meaningful crash reports - linux server - by Sublime - 13.09.2014, 07:57
Re: [Tutorial] - how to get meaningful crash reports - linux server - by ReD_DeVi - 13.09.2014, 08:50
Re: [Tutorial] - how to get meaningful crash reports - linux server - by TracerX - 13.09.2014, 09:16
Re: [Tutorial] - how to get meaningful crash reports - linux server - by nicholasramdhan - 16.01.2015, 23:02
Re: [Tutorial] - how to get meaningful crash reports - linux server - by ZcvDev - 30.01.2015, 12:00
Re: [Tutorial] - how to get meaningful crash reports - linux server - by MehranGta - 31.01.2015, 14:27
Re: [Tutorial] - how to get meaningful crash reports - linux server - by DeitY - 22.03.2015, 11:54
Re: [Tutorial] - how to get meaningful crash reports - linux server - by amirm3hdi - 25.04.2016, 07:47
Re: [Tutorial] - how to get meaningful crash reports - linux server - by dusk - 19.07.2016, 13:30
Re: [Tutorial] - how to get meaningful crash reports - linux server - by M1cr0S0ft - 21.07.2016, 10:45
Re: [Tutorial] - how to get meaningful crash reports - linux server - by TaylorGoron - 05.11.2016, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)