Samp03svr with debugging symbols?
#1

Would it be possible to get a samp03svr linux executable with debugging symbols enabled? The reason is to help track down root causes of issues like this:

Quote:

Aug 11 20:49:35 ks307566 kernel: [69836.711847] samp03svr[1387]: segfault at 42c40010 ip 00000000f7578042 sp 00000000ff8fc6d4 error 6 in libc-2.9.so[f7505000+15c000]

I've ran strace/ltrace against both the pawn and network processes though it has gotten me nowhere.
Reply
#2

Run the program in gdb. When it segfaults, type> bt

Post the backtrace in this thread and I'll try and tell you what it is. If I don't notice this thread again you can PM me.
Reply
#3

Thanks. I'll give it a try.
Reply
#4

Kal,

An update on this:

I ran samp03svr under gdb with no success. The output from a 'bt' showed an array of memory addresses with nothing attached to them, just question marks. I decided to compile all the plugins that I use (8 in total) with debug symbols (compiled with -g -O0 -rdynamic) and run the server under gdb.

These 8 plugins are:

G-Stylez MySQL R5
Incognito Plugins (Streamer v2.5, DNS v2.4, IRC v1.3.6 SSL, GVars v1.3)
****** Plugins (Sscanf 2.0, Whirlpool 64-bit version)
Kalcor's MapAndreas v1.0 beta

Additionally, I added logging to every function, every callback, and every command (in-game and irc, both Zcmd-driven command systems). When the server does the libc segfault, it is always on a different function. This would lead me to believe the issue stems from something outside the script.

My server's specs are:
Kimsufi/OVH dedicated server
Intel Q6600 Quad-core CPU
4GB DDR2 Ram
1TB SATA2 (non-RAID)
100MB up/down
OS: Ubuntu Linux v9.04 64-bit

This is the output I got from the 'bt' output. With all plugins under debug, this is what I got after 2 successful 'bt' captures under gdb:

http://pawn.pastebin.com/N675w5ss

I initially assumed it was the streamer plugin though under debug I would have expected more output from gdb so I ran the server again under gdb.

My understanding is that Blacklite from SACNR has this exact same issue with libc segfaults under completely random functions. We've both run similar tests with little useful output from gdb/bt.

UPDATE: I found output that I had from an strace during one of the crashes: http://pawn.pastebin.com/w4UA7y1r. Here is one where it would commonly happen when a connection was made (prior to OnPlayerConnect firing), a known IP from a regular - not a malicious attacker: http://pawn.pastebin.com/EE2wuTcF. You can see my function execution logging in there.
Reply
#5

Quote:
Originally Posted by nemesis-
View Post
Kal,

An update on this:

I ran samp03svr under gdb with no success. The output from a 'bt' showed an array of memory addresses with nothing attached to them, just question marks. I decided to compile all the plugins that I use (8 in total) with debug symbols (compiled with -g -O0 -rdynamic) and run the server under gdb.

These 8 plugins are:

G-Stylez MySQL R5
Incognito Plugins (Streamer v2.5, DNS v2.4, IRC v1.3.6 SSL, GVars v1.3)
****** Plugins (Sscanf 2.0, Whirlpool 64-bit version)
Kalcor's MapAndreas v1.0 beta
I am using:

Adrenaline's MySQL plugin (that has been working for over a year)
A custom checkpoint streamer (been working for months)
Incognito's IRC plugin

All the plugins are compiled with -g -O0 -rdynamic.

Quote:
Originally Posted by nemesis-
View Post
Additionally, I added logging to every function, every callback, and every command (in-game and irc, both Zcmd-driven command systems). When the server does the libc segfault, it is always on a different function. This would lead me to believe the issue stems from something outside the script.
I also tried this, got the same result (no consistency).

Quote:
Originally Posted by nemesis-
View Post
My server's specs are:
Kimsufi/OVH dedicated server
Intel Q6600 Quad-core CPU
4GB DDR2 Ram
1TB SATA2 (non-RAID)
100MB up/down
OS: Ubuntu Linux v9.04 64-bit
Kimsufi/OVH dedicated server
Intel i7 Quad-core CPU
8GB DDR2 Ram
1TB SATA2 (non-RAID)
100MB up/down
OS: Debian Lenny v5.06 32-bit

Quote:
Originally Posted by nemesis-
View Post
This is the output I got from the 'bt' output. With all plugins under debug, this is what I got after 2 successful 'bt' captures under gdb:

http://pawn.pastebin.com/N675w5ss
http://pastebin.com/mcquK8qp

Quote:
Originally Posted by nemesis-
View Post
I initially assumed it was the streamer plugin though under debug I would have expected more output from gdb so I ran the server again under gdb.

My understanding is that Blacklite from SACNR has this exact same issue with libc segfaults under completely random functions. We've both run similar tests with little useful output from gdb/bt.
!
Reply
#6

Please?
Reply
#7

Quick update: I fixed the getarg bug, but I'm still having the libc one... I'll post another backtrace if I can get it.
Reply
#8

It looks like we(Blacklite and I) may have solved this LIBC bug. It appears using Kick(playerid) in OnPlayerUpdate is still an issue under 0.3b-R2. If you use Kick() in OnPlayerUpdate and someone shortly connects in and inherits the playerid of the person who was kicked, the server segfaults.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)