Server crashing because of sampvoice, but no backt...
# support-forum
p
Hello, I have made voice chat communication between players when they are in call and everything works fine, but after some time, like 2-3 hours of server running it randomly just crash and there's nothing in server.log. I just get fcnpc-crash log but it's happening because of sampvoice filterscript. When I disable voice communication on mobile it works fine. FCNPC Crash log :
Copy code
=========================== FCNPC Exception Handler ============================
Signal 11 (Segmentation fault), address is 20 from f1939ac0

Backtrace:
  #0 in plugins/FCNPC.so(_ZN17CExceptionHandler24ExceptionHandlerCallbackEiP9siginfo_tPv+0x126) [0xf21ada36]
  #1 in linux-gate.so.1(__kernel_rt_sigreturn+0) [0xf7f980a0]
  #2 in plugins/sampvoice.so(_ZNK6Stream10HasSpeakerEt+0x20) [0xf1939ac0]
  #3 in plugins/sampvoice.so(_ZN2SV11PawnHandler20SvHasSpeakerInStreamEP6Streamt+0x1e) [0xf194183e]
  #4 in plugins/sampvoice.so(_ZN4Pawn22n_SvHasSpeakerInStreamEP6tagAMXPi+0x62) [0xf19313a2]
  #5 in ./samp03svr() [0x80950e4]
  #6 in plugins/crashdetect.so(_ZN18CrashDetectHandler15ProcessCallbackEiPiS0_+0x4bb) [0xf7ab4b9b]
  #7 in plugins/crashdetect.so(+0x1cfc2) [0xf7ab8fc2]
  #8 in plugins/crashdetect.so(amx_Exec+0xdc7) [0xf7abdbc7]

Information:
  System: GNU/Linux
  SA-MP: 0.3.7 R2
  FCNPC: 2.0.0

Functions:
  FUNC_CPlayerPool__DeletePlayer: 0x80d0a90
  FUNC_CPlayer__Kill: 0x80cb220
  FUNC_CPlayer__EnterVehicle: 0x80cc1c0
  FUNC_CPlayer__ExitVehicle: 0x80cc340
  FUNC_CPlayer__SpawnForWorld: 0x80ccfc0
  FUNC_GetVehicleModelInfo: 0x80d5d30
  FUNC_CConsole__GetIntVariable: 0x80a0070
  FUNC_ClientJoin_RPC: 0x80b0030

Pointers:
  VAR_ServerAuthentication: 0x81aa8a8
  VAR_NetVersion: 0xfd9

Offsets:
  OFFSET_RemoteSystemManager: 0x334
  OFFSET_RemoteSystemSize: 0xc69
  OFFSET_RemoteSystem__ConnectMode: 0xc62
  OFFSET_RemoteSystem__Unknown: 0xc67
=========================== FCNPC Exception Handler ============================
server.cfg :
Copy code
plugins crashdetect.so samp-precise-timers.so discord-connector.so sscanf.so streamer.so mysql.so pawncmd.so mapandreas.so FCNPC.so SKY.so libserver.so socket.so sampvoice.so
Is there any way to force crashdetect to provide me more informations about crash ? I tried with trace options in server.cfg but it's not readable at all because there are players on server and it provide a very big log
r
TFW FCNPC does a better reporting job than crashdetect
Either way, start your server in gdb, and use
bt
when it crashes, hopefully that'll give us more info ; not that the bt above is unclear but there's not much to go from other than assuming the stream got invalidated somehow
Which could be for any number of reasons but really sound like a sampvoice bug in the first place anyway
p
gdb is option in crashdetect ?
r
also FYI plugin order matters if you didn't know, so there's that, try moving it around
gdb is a separate program that you'll have to install on your linux machine
then start samp with gdb ./samp03svr
p
okay, i'm going to do it, what about bt ?
r
possibly remove crashdetect altogether although it doesn't seem to be hurting here
type that command inside gdb when your server crashes
it will give you a traceback, post it here
p
It's running currently on server, players are online and I told them to force talking more
Copy code
[Thread 0xe5d6ab40 (LWP 2573) exited]

Thread 1 "samp03svr" received signal SIGSEGV, Segmentation fault.
0xf1939ac0 in Stream::HasSpeaker(unsigned short) const () from plugins/sampvoice.so
(gdb) bt
#0  0xf1939ac0 in Stream::HasSpeaker(unsigned short) const () from plugins/sampvoice.so
#1  0xf194183e in SV::PawnHandler::SvHasSpeakerInStream(Stream*, unsigned short) () from plugins/sampvoice.so
#2  0xf19313a2 in Pawn::n_SvHasSpeakerInStream(tagAMX*, int*) () from plugins/sampvoice.so
#3  0x080950e4 in ?? ()
#4  0xf7af1b9b in CrashDetectHandler::ProcessCallback(int, int*, int*) () from plugins/crashdetect.so
#5  0xf7af5fc2 in (anonymous namespace)::ProcessCallback(tagAMX*, int, int*, int*) () from plugins/crashdetect.so
#6  0xf7afabc7 in amx_Exec () from plugins/crashdetect.so
#7  0xf7af241c in CrashDetectHandler::ProcessExec(int*, int) () from plugins/crashdetect.so
#8  0xf7af60d0 in (anonymous namespace)::ProcessExec(tagAMX*, int*, int) () from plugins/crashdetect.so
#9  0xf455a932 in _sampgdk_amxhooks_Exec () from plugins/streamer.so
#10 0xf193684c in Pawn::OnPlayerActivationKeyReleaseForAll(unsigned short, unsigned char) () from plugins/sampvoice.so
#11 0xf193ee7e in ProcessTick () from plugins/sampvoice.so
#12 0x080d1ce2 in ?? ()
#13 0x080aef3a in ?? ()
#14 0x080aa13a in ?? ()
#15 0xf7b38fa1 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
#16 0x0804b4e1 in ?? ()
@red-potato-31200
r
The bit of ?? in the middle is strange ; other than that, it definitely looks like voice plugin itself is faulty
Have you tried updating it? Or conversely, did you update it recently, and it started causing issues?
All I can say is that either you should try other versions, or you need to get 1°) a reliable way to reproduce the issue and 2°) some interest in C++
p
It’s running on the latest version, I’ll try to make it working
r
Possibly try an older version then
Like I mentioned, it seems like voice itself is faulty, and if the fault was recently introduced another version might work better
3 Views