Crashing :( -
NeroX98 - 20.07.2013
Hi guys, i have problem, my server is crashing very often... (20-30 minutes)
I have VPS with CentOS 6 64bit.
I Use streamer, regex,
mysql, sscanf, crashdetect plugins...
When i start server with nohup i don't get any errors, I tried with crasdetect but nothing... But when i use ./samp03svr when server crashes i get Segmentation fault and there are still no errors from crashdetect and in server.log.
Any IDEAS ?
Re: Crashing :( -
AndreT - 20.07.2013
Luckily there are plenty ways to debug something, and the more often the crash happens, the higher are your chances of tracing it back after successful debugging.
On linux, you can try several things such as:
1) running the server in gdb - if you get to know something about the source of the error, recompile and link your plugin with -g to get more accurate feedback
2) attaching strace to the server process to see what happens right before the crash
Also maybe your crashdetect did not return anything useful because your scripts are not compiled with -d3 debug flag (in command line or in your pawn.cfg, search it up).
Good luck debugging!
Re: Crashing :( -
NeroX98 - 20.07.2013
Okay, so can i get quick tutorial for this debugging... I'm beginner with VPS and linux commands, i'm just interested in Pawno scripting but this is something that i must deal with
Can you give me some links where i can learn about this GDB and strace
Thanks, AndreT <3
Re: Crashing :( -
Tayab - 20.07.2013
Man, there are a lot of reasons why server crashes. Can you remember off top of your head that what did you last edit/appendage to the script.
Is there anything you type when your crash specifically or your just crash after some interval?
Re: Crashing :( -
NeroX98 - 20.07.2013
Tayab before this i had hosted samp server (NOT VPS) with no MySQL and with little players, after that i bought VPS and made a MySQL (mysql works perfect) and this segmentation fault problem appeared
Re: Crashing :( -
AndreT - 20.07.2013
Please ****** how to attach strace to a process (usually you have to install it, on CentOS that would be "yum install strace", then run the server, get its process ID and use "strace -p ID" to attach it - this will output all the data to your ssh console).
GDB needs to be launched (and before that, installed similarly as well) and the server needs to be ran in that interface. But since the SA-MP server itself does not come with debug flags, and neither do a lot of the plugins, I'm unsure about the quality of the information you'll retrieve through gdb (but most likely it'll determine the source of your crash).
Did you doublecheck whether your PAWN scripts are compiled with -d3 for maximal debugging chances with crashdetect?
Also, what would be a good idea is to have your script ready for debugging at any given moment, so everything required to turn on complete debugging is a simple recompile with different precompiler settings (perhaps #define DEBUG and your debug messages check #if defined DEBUG and then print something!). This would also get you closer to the source of the problems.
Do the current logs tell you anything?
Are there any similarities between different server runs in the logs just before the crash?