Raised This Month: $ Target: $400
 0% 

what is the best debug method to get the full error log (cs 1.6)


Post New Thread Reply   
 
Thread Tools Display Modes
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-17-2016 , 11:14   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #21

can you write start script exemple?
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-17-2016 , 11:19   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #22

What do you mean?

EDIT: Btw, I think you don't need to explicit gdb this way, if you're using hlds_run with -debug it should use gdb by default and outputting in debug.log.
__________________

Last edited by Arkshine; 07-17-2016 at 11:24.
Arkshine is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-17-2016 , 11:28   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #23

i mean server start command exemple
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-18-2016 , 20:07   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #24

debug.log always showing only the time of the crash and the start command...
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-19-2016 , 04:41   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #25

Looks like the script runs gdb on a core dump of the system. If it shows nothing, it means likely no core dump could be found.

The script should enable it by executing the command "ulimit -c 2000". You can try to type manually this in the machine console to see whether you get a permission error or something. if it fails, I don't know much about linux, but you can probably find a lot of resources on how to enable core dump for your linux distribution.

Or you can use directly gdb like I showed you, but it means you should launch manually your server (can use be used with "screen" too).
__________________

Last edited by Arkshine; 07-19-2016 at 08:23.
Arkshine is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-21-2016 , 14:17   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #26

what this log mean?

PHP Code:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./hlds_linux -game cstrike  -debug +port 270'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb6fdbdd0 in SV_SingleClipMoveToEntity (ent=0xb38bede8, start=0xb38be504, mins=0xb38be5d8, maxs=0xb38be5e4, end=0xbfe47cd0, trace=0xbfe479a8) at ../engine/world.c:965
#0  0xb6fdbdd0 in SV_SingleClipMoveToEntity (ent=0xb38bede8, start=0xb38be504, mins=0xb38be5d8, maxs=0xb38be5e4, end=0xbfe47cd0, trace=0xbfe479a8) at ../engine/world.c:965
#1  0xb6fdc75a in SV_ClipMoveToEntity (end=<optimized out>, maxs=<optimized out>, mins=<optimized out>, start=<optimized out>, ent=0xb38bede8) at ../engine/world.c:1089
#2  SV_ClipToLinks (node=0xb746f7c0 <sv_areanodes+256>, clip=0xbfe47bd0) at ../engine/world.c:1232
#3  0xb6fdc71d in SV_ClipToLinks (node=0xb746f6e0 <sv_areanodes+32>, clip=0xbfe47bd0) at ../engine/world.c:1254
#4  0xb6fdc71d in SV_ClipToLinks (node=0xb746f6c0 <sv_areanodes>, clip=0xbfe47bd0) at ../engine/world.c:1254
#5  0xb6fdd163 in SV_Move (start=0xb38be504, mins=0xb38be5d8, maxs=0xb38be5e4, end=0xbfe47da4, type=0, passedict=0xb38be47c, monsterClipBrush=false) at ../engine/world.c:1461
#6  0xb6fce164 in SV_PushEntity (ent=0xb38be47c, push=0xbfe47e80) at ../engine/sv_phys.c:537
#7  0xb6fd074a in SV_Physics_Toss (ent=0xb38be47c) at ../engine/sv_phys.c:1578
#8  0xb6fd1df8 in SV_Physics () at ../engine/sv_phys.c:2054
#9  0xb6fc9b26 in SV_Frame () at ../engine/sv_main.c:9236
#10 0xb6f91e92 in _Host_Frame (time=0.00125595904) at ../engine/host.c:1404
#11 0xb6f92252 in Host_Frame (time=0.00125595904, iState=1, stateInfo=0xbfe47fdc) at ../engine/host.c:1522
#12 0xb6fb68dc in CEngine::Frame (this=0xb704d6a0 <g_Engine>) at ../engine/sys_engine.cpp:245
#13 0xb6fb3c43 in RunFrame (this=<optimized out>) at ../engine/sys_dll2.cpp:1235
#14 CDedicatedServerAPI::RunFrame (this=0xb7048d00 <__g_CDedicatedServerAPI_singleton>) at ../engine/sys_dll2.cpp:1226
#15 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766
#16 0x08049472 in main (argc=18, argv=0xbfe48224) at ../dedicated/sys_ded.cpp:1146
offset = {1.4573504e-42, 0, 1}
start_l = {0, 0, 1.96181785e-44}
end_l = {1.40129846e-45, -4.76062354e-08, 1.40129846e-45}
hull = <optimized out>
pmodel = <error reading variable pmodel (Cannot access memory at address 0x30940)>
numhulls = <optimized out>
i = <optimized out>
rotated = <optimized out>
From        To          Syms Read   Shared Object Library
0xb76d7914  0xb771dc78  Yes         ./libstdc++.so.6
0xb7685a60  0xb7686a88  Yes (*)     /lib/libdl.so.2
0xb766e6a0  0xb767a778  Yes (*)     /lib/libpthread.so.0
0xb74e8b00  0xb7612c74  Yes (*)     /lib/libc.so.6
0xb74aa470  0xb74c4968  Yes (*)     /lib/libm.so.6
0xb7766830  0xb777e5cf  Yes (*)     /lib/ld-linux.so.2
0xb7493e04  0xb74a3490  Yes         ./libgcc_s.so.1
0xb6f78490  0xb6ffc24c  Yes         /home/jb/engine_i486.so
0xb6f1e5c0  0xb6f28d74  Yes (*)     ./libsteam_api.so
0xb6f148c0  0xb6f18668  Yes (*)     /lib/librt.so.1
0xb6efba00  0xb6f081b8  Yes         /home/jb/filesystem_stdio.so
0xb5eb0000  0xb6a70250  Yes (*)     ./steamclient.so
0xb5d20670  0xb5d96020  Yes (*)     ./crashhandler.so
0xb3421d00  0xb34c6ebc  Yes (*)     /home/jb/./cstrike/addons/metamod/dlls/metamod.so
0xb31c3370  0xb32e7370  Yes         /home/jb/cstrike/dlls/cs.so
0xb3084a00  0xb30e4768  Yes (*)     /home/jb/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xb3065c10  0xb3068c98  Yes (*)     cstrike/addons/amxmodx/modules/fun_amxx_i386.so
0xb30540d0  0xb305f478  Yes (*)     cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xb301bc50  0xb30484a8  Yes (*)     cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xb2ff90d0  0xb2ffe408  Yes (*)     cstrike/addons/amxmodx/modules/geoip_amxx_i386.so
0xb2f42220  0xb2f489d8  Yes (*)     cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xb2ecdd50  0xb2ed4658  Yes (*)     cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xb2e576c0  0xb2ec16d8  Yes (*)     cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xb2dcb9d0  0xb2df4618  Yes (*)     cstrike/addons/amxmodx/modules/orpheu_amxx_i386.so
0xb2db4dc0  0xb2dbcc58  Yes (*)     cstrike/addons/amxmodx/modules/roundcontrol_amxx_i386.so
0xb1f82350  0xb1f8afc8  Yes (*)     cstrike/addons/amxmodx/modules/regex_amxx_i386.so
0xb1dd3490  0xb1e63228  Yes (*)     cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xb1cd3490  0xb1cdad78  Yes (*)     cstrike/addons/amxmodx/modules/nvault_amxx_i386.so
0xb1c0ad30  0xb1c7d208  Yes (*)     cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so
0xb1be7500  0xb1bf2d98  Yes (*)     cstrike/addons/amxmodx/modules/cvar_util_amxx_i386.so
0xb1bdcd90  0xb1bddd08  Yes (*)     cstrike/addons/amxmodx/modules/sockets_amxx_i386.so
0xb1d7faa0  0xb1d87f88  Yes (*)     /lib/libnss_files.so.2
0xb1d77c00  0xb1d7b298  Yes (*)     /lib/libnss_dns.so.2
0xb1d5f6a0  0xb1d6eb88  Yes (*)     /lib/libresolv.so.2
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbfe47930:
 eip = 0xb6fdbdd0 in SV_SingleClipMoveToEntity (../engine/world.c:965); saved eip = 0xb6fdc75a
 called by frame at 0xbfe47a00
 source language c.
 Arglist at 0xbfe47850, args: ent=0xb38bede8, start=0xb38be504, mins=0xb38be5d8, maxs=0xb38be5e4, end=0xbfe47cd0, trace=0xbfe479a8
 Locals at 0xbfe47850, Previous frame's sp is 0xbfe47930
 Saved registers:
  ebx at 0xbfe4791c, ebp at 0xbfe47928, esi at 0xbfe47920, edi at 0xbfe47924, eip at 0xbfe4792c
End of crash report
---------------------------------------------- 
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !

Last edited by Old.School; 07-21-2016 at 14:17.
Old.School is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-21-2016 , 16:57   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #27

Hard to say. You had a collision with an entity and it crashed.

It seems to crash at line 965.
Looking at SV_SingleClipMoveEntity source code, the first line are:
Spoiler

Since function starts at line 948, crash happens at the start of function more or less.
The only relevant line which could crash is:
Code:
g_psv.models[ent->v.modelindex]->type
At this point, either the value of "modelindex" is out of bound (< 0 or >= 512, crash because of overflow) or "models" returns a null pointer (crash because accessing member with invalid address).
I don't know if it's possible to have a null pointer without getting a crash with a meaningful message before, so I would guess the value of "modelindex" is wrong and has been altered somehow.

Maybe you have a plugin altering this field or maybe you're using some weird model that engine doesn't like. I really don't know, it could be something else too.
But just with that, without context nor information, I can't really tell.
__________________
Arkshine is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-21-2016 , 17:15   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #28

thnx for your reply.
what informations do you need to found the problem ?
how i can find which plugin caused the crash?
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-27-2016 , 23:18   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #29

Quote:
Originally Posted by Old.School View Post
how i can find which plugin caused the crash?
There is a simple solution: Try and fix.

1) Disable one plugin, keeps running your server...
a) if do not crash as usually does, you find the bad plugin, go to step 2.
b) if it crash, bad lucky, keep the current plugin disabled, and go to step 1.

2) Enable all plugin except the last plugin you disabled.
a) if do not crash as usually does, you find the bad plugin.
b) if it crash, bad lucky, keep the current plugin disabled, and go to step 1.

The logic is simple, more than 1 plugin could be crashing. So do not enable again those ones
which you just disabled until you find out your server not crashing anymore. Then as soon as it stopped crashing,
you enable everything again, except the last plugin you disabled and stopped crashing. This last
step is to be sure that there is not any other plugin crashing the server, except the one you just find.

But first, would to be sure that it is not a problem on your AMXX install. To know it, just to disable
all plugin except the AMX Mod X default ones. If the server do not crash as it usually does,
you know that the problem is a plugin. If it crash, you know that may be it is a problem on the
AMX Mod X install. To fix it, would be nice a complete clean install, and re-test again for crashing
before to install other plugins beyond the AMX Mod X default ones.

I already solved on problem like this on my server, took me like a month enabling and disabling stuff.
On my case, was just to find out that this plugin was crashing the server. Why? I do not know and I am
not interested right now to know why. But sometime may be I may review that code to know what is
happening.


Update:

As @Arkshine said:
Quote:
Originally Posted by Arkshine View Post
The only relevant line which could crash is:
Code:
g_psv.models[ent->v.modelindex]->type
At this point, either the value of "modelindex" is out of bound (< 0 or >= 512, crash because of overflow) or "models" returns a null pointer (crash because accessing member with invalid address).
And also, when I have the same problem of a crashing server as yours, was a model plugin the problem (GHW_Weapon_Replacement.sma).
So, it is a good start targeting the plugins which does/handle model stuff on server.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 07-27-2016 at 23:28. Reason: update
addons_zz is offline
Old.School
Senior Member
Join Date: Sep 2015
Location: France
Old 07-28-2016 , 02:50   Re: what is the best debug method to get the full error log (cs 1.6)
Reply With Quote #30

this bug is fixed. the problem is i have new problem
this is the debug log

PHP Code:
---------------------------------------------- 
[New 
LWP 18675
[New 
LWP 18684
[New 
LWP 18688
[New 
LWP 18691
[New 
LWP 18771
[
Thread debugging using libthread_db enabled
Using host libthread_db library "/lib64/libthread_db.so.1"
Core was generated by `./hlds_linux -game cstrike -debug +port 27016 +sv_lan 0 +max'. 
Program terminated with signal SIGSEGV, Segmentation fault. 
#0  0xb6fc0688 in SV_ClearPacketEntities (frame=0xfe8d830) at ../engine/sv_main.c:528 
#0  0xb6fc0688 in SV_ClearPacketEntities (frame=0xfe8d830) at ../engine/sv_main.c:528 
#1  SV_ClearFrames (frames=0xb379aa68) at ../engine/sv_main.c:571 
#2  0xb6f99810 in Host_CheckDyanmicStructures () at ../engine/host.c:957 
#3  Host_ClearMemory (bQuiet=false) at ../engine/host.c:984 
#4  0xb6fcbaa3 in SV_SpawnServer (bIsDemo=false, server=0xbfad4ce0 "jail_nightcrew", startspot=0x0) at ../engine/sv_main.c:7392 
#5  0xb28d5c24 in ?? () from /home/jb/cstrike/addons/fix/nbex.so 
Backtrace stopped: previous frame inner to this frame (corrupt stack?) 
pack = 0xfe8f018 
From        To          Syms Read   Shared Object Library 
0xb76e0914  0xb7726c78  Yes         ./libstdc++.so.6 
0xb768da60  0xb768ea88  Yes (*)     /lib/libdl.so.2 
0xb76766a0  0xb7682778  Yes (*)     /lib/libpthread.so.0 
0xb74f0b00  0xb761ac74  Yes (*)     /lib/libc.so.6 
0xb74b2470  0xb74cc968  Yes (*)     /lib/libm.so.6 
0xb776f830  0xb77875cf  Yes (*)     /lib/ld-linux.so.2 
0xb749be04  0xb74ab490  Yes         ./libgcc_s.so.1 
0xb6f80490  0xb700424c  Yes         /home/jb/engine_i486.so 
0xb6f265c0  0xb6f30d74  Yes (*)     ./libsteam_api.so 
0xb6f1c8c0  0xb6f20668  Yes (*)     /lib/librt.so.1 
0xb6f03a00  0xb6f101b8  Yes         /home/jb/filesystem_stdio.so 
0xb5eb8000  0xb6a78250  Yes (*)     ./steamclient.so 
0xb5d28670  0xb5d9e020  Yes (*)     ./crashhandler.so 
0xb3429d00  0xb34ceebc  Yes (*)     /home/jb/./cstrike/addons/metamod/dlls/metamod.so 
0xb31cb370  0xb32ef370  Yes         /home/jb/cstrike/dlls/cs.so 
0xb308ca00  0xb30ec768  Yes (*)     /home/jb/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so 
0xb306dc10  0xb3070c98  Yes (*)     cstrike/addons/amxmodx/modules/fun_amxx_i386.so 
0xb305c0d0  0xb3067478  Yes (*)     cstrike/addons/amxmodx/modules/engine_amxx_i386.so 
0xb3023c50  0xb30504a8  Yes (*)     cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so 
0xb30010d0  0xb3006408  Yes (*)     cstrike/addons/amxmodx/modules/geoip_amxx_i386.so 
0xb2f4a220  0xb2f509d8  Yes (*)     cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so 
0xb2ed5d50  0xb2edc658  Yes (*)     cstrike/addons/amxmodx/modules/csx_amxx_i386.so 
0xb2e5f6c0  0xb2ec96d8  Yes (*)     cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so 
0xb2dd39d0  0xb2dfc618  Yes (*)     cstrike/addons/amxmodx/modules/orpheu_amxx_i386.so 
0xb2dbcdc0  0xb2dc4c58  Yes (*)     cstrike/addons/amxmodx/modules/roundcontrol_amxx_i386.so 
0xb2b0a510  0xb2b0b7c8  Yes (*)     /home/jb/cstrike/addons/fix/localizebugfix_mm_i386.so 
0xb288f6f0  0xb28bf0cc  Yes (*)     /home/jb/cstrike/addons/vtc/vtc.so 
0xb7692ca0  0xb7693f38  Yes (*)     /home/jb/cstrike/addons/uino/uino.so 
0xb275a920  0xb275b378  Yes (*)     /home/jb/cstrike/addons/fix/bsploaderfixer_i386.so 
0xb1f8b350  0xb1f93fc8  Yes (*)     cstrike/addons/amxmodx/modules/regex_amxx_i386.so 
0xb1ddc490  0xb1e6c228  Yes (*)     cstrike/addons/amxmodx/modules/mysql_amxx_i386.so 
0xb1cdc490  0xb1ce3d78  Yes (*)     cstrike/addons/amxmodx/modules/nvault_amxx_i386.so 
0xb1c14d30  0xb1c87208  Yes (*)     cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so 
0xb1bf1500  0xb1bfcd98  Yes (*)     cstrike/addons/amxmodx/modules/cvar_util_amxx_i386.so 
0xb1cc5aa0  0xb1ccdf88  Yes (*)     /lib/libnss_files.so.2 
(*): Shared library is missing debugging information. 
Stack level 0, frame at 0xbfad4ba0: 
 eip = 0xb6fc0688 in SV_ClearPacketEntities (../engine/sv_main.c:528); saved eip = 0xb6f99810 
 inlined into frame 1 
 source language c. 
 Arglist at unknown address. 
 Locals at unknown address, Previous frame's sp in esp 
End of crash report 
---------------------------------------------- 
__________________
You keep bringing B.R down .. He will rise again and kick Enemies asses !
Old.School is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode