Crash - explaination

Ask questions and share info about GunGame 5

Crash - explaination

Postby .3lite » Tue Dec 29, 2009 3:22 pm

Hello folks,

gungame turbo mod is not working property sometimes on Linux, it removes "worldspawn" using es_xremove if triggered twice, so server crashes.


Removed weapon_m4a1(weapon_m4a1)
Removed worldspawn(worldspawn)
./srcds_run: line 344: 7758 Naruszenie ochrony pamięci $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem


That's something that need to be fixed fast, because I bet all Linux users have sometimes the same problem.
Last edited by .3lite on Wed Dec 30, 2009 3:07 pm, edited 3 times in total.
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

PostThis post was deleted by .3lite on Tue Dec 29, 2009 7:15 pm.

Postby .3lite » Wed Dec 30, 2009 11:34 am

bump
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Re: Crash

Postby .3lite » Wed Dec 30, 2009 2:48 pm

I've tried something like this (attachment), but still, happening the same:


L 12/30/2009 - 14:36:23: stripWeapon(gungamePlayer, playerHandle, 'secondary')
L 12/30/2009 - 14:36:23: GG TURBO REMOVE WEAPON 165
L 12/30/2009 - 14:36:23: GG TURBO REALLY REMOVING
Removed weapon_elite(weapon_elite)
L 12/30/2009 - 14:36:24: stripWeapon(gungamePlayer, playerHandle, 'secondary')
L 12/30/2009 - 14:36:24: GG TURBO REMOVE WEAPON 157
L 12/30/2009 - 14:36:24: GG TURBO REALLY REMOVING
Removed weapon_deagle(weapon_deagle)
L 12/30/2009 - 14:36:24: stripWeapon(gungamePlayer, playerHandle, 'secondary')
L 12/30/2009 - 14:36:24: GG TURBO REMOVE WEAPON 157
L 12/30/2009 - 14:36:24: GG TURBO REALLY REMOVING
Removed worldspawn(worldspawn)
./srcds_run: line 344: 9373 segmentation fault $HL_CMD


It deletes twice time the same thing.
Attachments
gg_turbo.py
(5.63 KiB) Downloaded 572 times
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby Warren » Wed Dec 30, 2009 5:22 pm

Is there any specific action that you have seen can cause this issue repeatedly?

We are very close to releasing the beta of GunGame5.1, and this will likely be resolved.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Re:

Postby .3lite » Wed Dec 30, 2009 5:35 pm

Warren wrote:Is there any specific action that you have seen can cause this issue repeatedly?

We are very close to releasing the beta of GunGame5.1, and this will likely be resolved.


I can tell you it happens very rarely, and it is caused by gg_turbo because of twice calling function es_xremove, which after one remove of specific entity id removes worldspawn which causes server crash (for example if there exists entity with 150 number and it is player weapon and need to be removed, gg_turbo removes it, but after calling again in short time the same function, entity 150 cointains worldspawn, so every entity deleted is replaced by worldspawn and can't be deleted again because crash will appear).

I though about blocking delete the same entity within 5 seconds, but I'm not sure if I understand problem correctly, so if you got an idea, please post it here, because it's very important.

Anyway, when 5.1 will be released?
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby satoon101 » Wed Dec 30, 2009 5:50 pm

I think it would be better to check, prior to removing, that the entity's classname is the weapon you are trying to remove. I'm not sure why it is even trying to remove it twice, though.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Huggs » Wed Dec 30, 2009 10:16 pm

Looks like the same thing I'm seeing on Windows -

viewtopic.php?f=12&t=1073




PCH
Huggs

Private
Private
User avatar
 
Posts: 77
Joined: Tue Dec 29, 2009 4:28 am
Location: NJ

Re:

Postby .3lite » Wed Dec 30, 2009 11:31 pm

Huggs wrote:Looks like the same thing I'm seeing on Windows -

viewtopic.php?f=12&t=1073




PCH


yeah, because worldspawn is entity which cannot be removed or crash will appear, the problem is that, after removing entity of id for example 150, worldspawn inherits that number so after somehow calling that function twice, worldspawn is removed.
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Re: Crash - explaination

Postby Huggs » Thu Dec 31, 2009 4:25 am

So, this is related to turbo mode?
I've taken that out of a few map configs that had it, but Deathmatch still turns it on.
Hopefully this will be fixed shortly.




PCH
I remember Todd - 'Let's Roll!'
Huggs

Private
Private
User avatar
 
Posts: 77
Joined: Tue Dec 29, 2009 4:28 am
Location: NJ

Re: Crash - explaination

Postby .3lite » Thu Dec 31, 2009 8:10 pm

satoon101 that didn't work either lol, I can't explain why, check this out (attachment) and log:

Removed weapon_sg552(weapon_sg552)
L 12/31/2009 - 16:57:33: stripWeapon(gungamePlayer, playerHandle, 'primary')
L 12/31/2009 - 16:57:33: GG TURBO REMOVE WEAPON 220
L 12/31/2009 - 16:57:33: GG TURBO REALLY REMOVING
Removed weapon_awp(weapon_awp)
L 12/31/2009 - 16:57:33: stripWeapon(gungamePlayer, playerHandle, 'primary')
L 12/31/2009 - 16:57:33: GG TURBO REMOVE WEAPON 220
L 12/31/2009 - 16:57:33: GG TURBO REALLY REMOVING
Removed worldspawn(worldspawn)
./srcds_run: line 344: 740 segmentation fault $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
czw, 31 gru 2009, 16:57:34 CET: Server restart in 10 seconds


And something more "interesting":

Removed weapon_p90(weapon_p90)
L 12/31/2009 - 17:14:56: stripWeapon(gungamePlayer, playerHandle, 'primary')
L 12/31/2009 - 17:14:56: GG TURBO REMOVE WEAPON 175
L 12/31/2009 - 17:14:56: GG TURBO REALLY REMOVING
Removed weapon_m4a1(weapon_m4a1)
L 12/31/2009 - 17:14:56: stripWeapon(gungamePlayer, playerHandle, 'primary')
L 12/31/2009 - 17:14:56: GG TURBO REMOVE WEAPON 171
L 12/31/2009 - 17:14:56: GG TURBO REALLY REMOVING
Removed weapon_awp(weapon_awp)
L 12/31/2009 - 17:14:56: stripWeapon(gungamePlayer, playerHandle, 'primary')
L 12/31/2009 - 17:14:56: GG TURBO REMOVE WEAPON 175
L 12/31/2009 - 17:14:56: GG TURBO REALLY REMOVING
Removed worldspawn(gg_dust_blocks)
./srcds_run: line 344: 4526 segmentation fault $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
czw, 31 gru 2009, 17:14:56 CET: Server restart in 10 seconds


Deleted two entities with the same index but delayed (a weapon removed between these ids) or just unexplainable function call?
Attachments
gg_turbo.py
(6.13 KiB) Downloaded 535 times
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Re: Crash - explaination

Postby .3lite » Fri Jan 01, 2010 4:14 pm

I believe I have found the solution, we will see tomorrow if crash appears by then.

Right now, online since yesterday 20:00, so like 20 hours by now.
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby .3lite » Mon Jan 04, 2010 7:47 pm

Ahhh no, still the same : / I mean most likely remove worldspawn also was one of the crash reasons, ,but still, something is missing because it crashes only after weapon update/change (gg turbo).
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Re: Crash - explaination

Postby .3lite » Tue Jan 05, 2010 4:12 pm

Ok, got some more information about this crash issue, I was working on it, but the only thing I manage to fix is that worldspawn isn't removed now just by changing value of gamethread.delayed(0.3, weaponCheck, (userid)) from 0.05 to 0.3 (delayed a bit more), so removing worldspawn was one of the issues but still, something is missing which I cannot find out by myself.

I have also added some logs inside of gg_turbo.py script, but I've got nothing, maybe you can see something (attachment - gg_turbo.py) and here are some server logs:

L 01/05/2010 - 04:23:24: World triggered "Round_Start"
L 01/05/2010 - 04:23:33: "Moe<505><BOT><TERRORIST>" killed "Wolf<504><BOT><CT>" with "m4a1" (headshot)
L 01/05/2010 - 04:23:33: give new weapon1
L 01/05/2010 - 04:23:33: ggt removing weapon: 117
L 01/05/2010 - 04:23:33: ggt removing by es_xremove
L 01/05/2010 - 04:23:33: ggt removed by es_xremove
Removed weapon_m4a1(weapon_m4a1)
L 01/05/2010 - 04:23:34: "Quintin<503><BOT><CT>" killed "Moe<505><BOT><TERRORIST>" with "famas" (headshot)
L 01/05/2010 - 04:23:35: give new weapon1
L 01/05/2010 - 04:23:35: ggt removing weapon: 110
L 01/05/2010 - 04:23:35: ggt removing by es_xremove
L 01/05/2010 - 04:23:35: ggt removed by es_xremove
Removed weapon_famas(weapon_famas)
Removed weapon_m4a1(weapon_m4a1)
Removed weapon_galil(weapon_galil)
L 01/05/2010 - 04:23:35: weaponcheck1
L 01/05/2010 - 04:23:35: ggt removing weapon: None
L 01/05/2010 - 04:23:35: weaponcheck1
L 01/05/2010 - 04:23:35: ggt removing weapon: None
L 01/05/2010 - 04:23:35: weaponcheck1
L 01/05/2010 - 04:23:35: ggt removing weapon: None
L 01/05/2010 - 04:23:36: weaponcheck1
L 01/05/2010 - 04:23:36: ggt removing weapon: None
L 01/05/2010 - 04:23:36: weaponcheck1
L 01/05/2010 - 04:23:36: ggt removing weapon: None
L 01/05/2010 - 04:23:36: weaponcheck1
L 01/05/2010 - 04:23:36: ggt removing weapon: None
L 01/05/2010 - 04:23:37: weaponcheck1
L 01/05/2010 - 04:23:37: ggt removing weapon: None
Removed weapon_galil(weapon_galil)
Removed weapon_ak47(weapon_ak47)
./srcds_run: line 344: 8194 Naruszenie ochrony pami뤩 $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
wto, 5 sty 2010, 04:24:35 CET: Server restart in 10 seconds


L 01/05/2010 - 05:43:40: World triggered "Round_Start"
L 01/05/2010 - 05:43:49: "Kyle<12><BOT><TERRORIST>" killed "Cliffe<10><BOT><CT>" with "usp" (headshot)
[4-way tie] Kyle has tied the leaders on level 18
Removed weapon_usp(weapon_usp)
==============================================================================
A GUNGAME EXCEPTION HAS BEEN CAUGHT
==============================================================================
...and logged in the error log. This file is available at:
-> addons/eventscripts/gungame/logs/errorlog 5.0.585.txt
==============================================================================
Report the following error at http://forums.gungame5.com in the respective
addon's topic, or as a GunGame bug.

The traceback is available below, the most recent call is at the end.
******************************************************************************
Traceback (most recent call last):
File "/home/cssserver/cstrike/addons/eventscripts/es.py", line 211, in tick
x()
File "/home/cssserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 178, in tick
_executenode(task)
File "/home/cssserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 155, in _executenode
function(*a, **kw)
File "/home/cssserver/cstrike/addons/eventscripts/gungame/included_addons/gg_earn_nade/gg_earn_nade.py", line 98, in earnNade
File "/home/cssserver/cstrike/addons/eventscripts/_libs/python/playerlib.py", line 82, in __getattr__
if hasattr(str, value) and not hasattr(ReturnValue, value):
NameError: global name 'ReturnValue' is not defined
******************************************************************************
L 01/05/2010 - 05:43:56: "Rip<13><BOT><CT>" killed "Kyle<12><BOT><TERRORIST>" with "glock"
Removed weapon_hegrenade(weapon_hegrenade)
./srcds_run: line 344: 26209 Naruszenie ochrony pami뤩 $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
wto, 5 sty 2010, 05:44:56 CET: Server restart in 10 seconds



L 01/05/2010 - 08:38:16: World triggered "Round_Start"
L 01/05/2010 - 08:38:21: "Wolf<22><BOT><TERRORIST>" killed "Stone<25><BOT><CT>" with "usp" (headshot)
[3-way tie] Wolf has tied the leaders on level 18
Removed weapon_usp(weapon_usp)
==============================================================================
A GUNGAME EXCEPTION HAS BEEN CAUGHT
==============================================================================
...and logged in the error log. This file is available at:
-> addons/eventscripts/gungame/logs/errorlog 5.0.585.txt
==============================================================================
Report the following error at http://forums.gungame5.com in the respective
addon's topic, or as a GunGame bug.

The traceback is available below, the most recent call is at the end.
******************************************************************************
Traceback (most recent call last):
File "/home/csserver/cstrike/addons/eventscripts/es.py", line 211, in tick
x()
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 178, in tick
_executenode(task)
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 155, in _executenode
function(*a, **kw)
File "/home/csserver/cstrike/addons/eventscripts/gungame/included_addons/gg_earn_nade/gg_earn_nade.py", line 98, in earnNade
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/playerlib.py", line 82, in __getattr__
if hasattr(str, value) and not hasattr(ReturnValue, value):
NameError: global name 'ReturnValue' is not defined
******************************************************************************
L 01/05/2010 - 08:38:30: "Moe<23><BOT><CT>" killed "Quade<24><BOT><TERRORIST>" with "glock" (headshot)
==============================================================================
A GUNGAME EXCEPTION HAS BEEN CAUGHT
==============================================================================
...and logged in the error log. This file is available at:
-> addons/eventscripts/gungame/logs/errorlog 5.0.585.txt
==============================================================================
Report the following error at http://forums.gungame5.com in the respective
addon's topic, or as a GunGame bug.

The traceback is available below, the most recent call is at the end.
******************************************************************************
Traceback (most recent call last):
File "/home/csserver/cstrike/addons/eventscripts/es.py", line 211, in tick
x()
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 178, in tick
_executenode(task)
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/gamethread.py", line 155, in _executenode
function(*a, **kw)
File "/home/csserver/cstrike/addons/eventscripts/gungame/included_addons/gg_earn_nade/gg_earn_nade.py", line 98, in earnNade
File "/home/csserver/cstrike/addons/eventscripts/_libs/python/playerlib.py", line 82, in __getattr__
if hasattr(str, value) and not hasattr(ReturnValue, value):
NameError: global name 'ReturnValue' is not defined
******************************************************************************
Removed weapon_usp(weapon_usp)
./srcds_run: line 344: 27986 Naruszenie ochrony pami뤩 $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
wto, 5 sty 2010, 08:39:30 CET: Server restart in 10 seconds




L 01/05/2010 - 10:08:42: World triggered "Round_Start"
L 01/05/2010 - 10:08:48: "Zed<33><BOT><CT>" killed "Rip<31><BOT><TERRORIST>" with "ak47" (headshot)
L 01/05/2010 - 10:08:48: give new weapon1
L 01/05/2010 - 10:08:48: ggt removing weapon: 110
L 01/05/2010 - 10:08:48: ggt removing by es_xremove
L 01/05/2010 - 10:08:48: ggt removed by es_xremove
Removed weapon_ak47(weapon_ak47)
L 01/05/2010 - 10:08:52: "Quade<34><BOT><TERRORIST>" killed "Zed<33><BOT><CT>" with "m4a1" (headshot)
L 01/05/2010 - 10:08:52: give new weapon1
L 01/05/2010 - 10:08:52: ggt removing weapon: 113
L 01/05/2010 - 10:08:52: ggt removing by es_xremove
L 01/05/2010 - 10:08:52: ggt removed by es_xremove
Removed weapon_m4a1(weapon_m4a1)
Removed weapon_ak47(weapon_ak47)
L 01/05/2010 - 10:08:52: weaponcheck1
L 01/05/2010 - 10:08:52: ggt removing weapon: None
L 01/05/2010 - 10:08:52: weaponcheck1
L 01/05/2010 - 10:08:52: ggt removing weapon: None
L 01/05/2010 - 10:08:53: weaponcheck1
L 01/05/2010 - 10:08:53: ggt removing weapon: None
L 01/05/2010 - 10:08:53: weaponcheck1
L 01/05/2010 - 10:08:53: ggt removing weapon: None
L 01/05/2010 - 10:08:53: weaponcheck1
L 01/05/2010 - 10:08:53: ggt removing weapon: None
L 01/05/2010 - 10:08:54: weaponcheck1
L 01/05/2010 - 10:08:54: ggt removing weapon: None
L 01/05/2010 - 10:08:54: weaponcheck1
L 01/05/2010 - 10:08:54: ggt removing weapon: None
Removed weapon_ak47(weapon_ak47)
Removed weapon_m4a1(weapon_m4a1)
Removed weapon_famas(weapon_famas)
./srcds_run: line 344: 31984 Naruszenie ochrony pami뤩 $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
wto, 5 sty 2010, 10:09:51 CET: Server restart in 10 seconds



Sorry for lot of logs but I'm out of ideas right now, maybe you can do something with it.
Attachments
gg_turbo.py
(5.95 KiB) Downloaded 502 times
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby XE_ManUp » Fri Jan 08, 2010 9:00 pm

In GunGame5.1, we are using SPE to remove entities. This can be achieved by using spe.removeEntityByIndex(), which will not allow WorldSpawn removal. However, one would need to replace ALL instances of es_xremove throughout ALL scripts in order to achieve the full benefits of a "safety net."

On the same note, I have been working closely with your-name-here in adding new features to SPE which will aid in using in future versions of GunGame.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Re: Crash - explaination

Postby .3lite » Fri Jan 08, 2010 9:22 pm

Thanks, anyway, is spe.removeEntityByIndex(weaponIndex) says "Removed X(X)"?

Because I have changed the gg_turbo with this function, but I have noticed really strange thing:

L 01/08/2010 - 20:03:52: "LEON<19><STEAM_0:0:19513644><TERRORIST>" killed "[-NTNG-]REDRACKET<51><STEAM_0:1:17158204><CT>" with "fiveseven" (headshot)
L 01/08/2010 - 20:03:52: Safely removed entity
L 01/08/2010 - 20:03:57: "vrL*<80><STEAM_0:1:20853713><CT>" killed "LEON<19><STEAM_0:0:19513644><TERRORIST>" with "famas" (headshot)
L 01/08/2010 - 20:03:57: Safely removed entity
L 01/08/2010 - 20:03:59: "FoD| MasterShoot<57><STEAM_0:0:27661625><TERRORIST>" killed "vrL*<80><STEAM_0:1:20853713><CT>" with "scout" (headshot)
Removed weapon_scout(weapon_scout)
L 01/08/2010 - 20:04:02: "ҒŗŗĕQ<17><STEAM_0:1:19891452><CT>" killed " [-NTNG-]SŁOŃ<47><STEAM_0:1:22175077><TERRORIST>" with "usp"
ҒŗŗĕQ is now leading on level 18
Removed weapon_usp(weapon_usp)


Safely removed entity because of in gg_turbo.py function:

if spe.removeEntityByIndex(weaponIndex):
es.log('Safely removed entity')
else:
es.log('Tried to remove invalid entity')


But why did it use remove within the next two?
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby XE_ManUp » Sat Jan 09, 2010 12:47 am

No, the would be the output of es_xremove (removed weapon_usp(weapon_usp)).

This would need to be changed in all scripts that use es_xremove (including gungamelib.py, gg_dead_strip.py, etc.)
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Re:

Postby .3lite » Sat Jan 09, 2010 12:53 am

XE_ManUp wrote:No, the would be the output of es_xremove (removed weapon_usp(weapon_usp)).

This would need to be changed in all scripts that use es_xremove (including gungamelib.py, gg_dead_strip.py, etc.)


Ok, I will change everything tomorrow, we will see then.

Anyway, is only es_xremove used? Or maybe es_remove aswell?
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Postby XE_ManUp » Sat Jan 09, 2010 12:57 am

I believe it was only es_xremove, because it is slightly faster, and the fact that we could use python to format the command strings with the appropriate userids, which would mean no need for es_remove's variable expansion.

If you need help, I am in live IRC support (link at the top near the search).
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Re: Crash - explaination

Postby .3lite » Sat Jan 09, 2010 12:46 pm

Will meet you there.
.3lite

Private
Private
 
Posts: 45
Joined: Fri Dec 26, 2008 9:06 pm

Next


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests