With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: sparcdr, torhu, Tequila

game bug in dedicated

Postby Tequila » Thu Jan 15, 2009 12:20 am

Hi,

just to report a bug I observed on my dedicated server. Today a player connected on my server and just after he fallen the dedicated server shut down leaving a process running at 100% cpu.

The dedicated server was build against r102 and was running with sse2 support and qagame binary game activated. (I know that's riscky :D but I want to detect all possible bugs asap ;))

The running map was SteamBoat. And here is the last few line in the game log:
0:00 ------------------------------------------------------------
0:00 InitGame: \g_deathcam\0\g_splitChat\0\g_chaseonly\0\g_roundtime\4\du_forcetrio\0\du_enabletrio\0\scorelimit\10\duellimit\2\g_specsareflies\1\g_blueteamname\Les Truands\g_redteamname\Les Brutes\sv_hostname\^2smokinguns.fr^3-^1SA^3\sv_maxRate\30000\sv_minPing\0\sv_maxPing\0\sv_floodProtect\1\dmflags\0\fraglimit\25\timelimit\20\sv_maxclients\12\g_maxGameClients\0\g_allowVote\1\g_gametype\0\g_delagHitscan\1\g_allowVoteKick\0\br_teamrole\0\g_moneyrespawn\0\g_exp_shotgunpattern\0\version\SG 1.0 r102 linux-i386 Jan 14 2009\protocol\68\mapname\dm_steamboat\sv_privateClients\0\sv_allowDownload\0\bot_minplayers\2\Admin\Tequila\Email\tequila at smokinguns.fr\g_motd\Please visit http://forum.smokin-guns.org and make bug reports please !!!\sv_Location\France, http://www.smokinguns.fr\MOD_URL\forum.smokin-guns.org\IRC\#smokinguns @ irc.freenode.net\gamename\smokinguns\g_needpass\0\g_unlaggedVersion\2.0\g_redteamcount\0\g_blueteamcount\0\g_redteamscore\0\g_blueteamscore\0\sg_version\1.0 20081231 r102
0:00 ClientConnect: 1
0:00 ClientUserinfoChanged: 1 n\Tuco\t\0\model\wq_male3/blue\hc\100\w\0\l\0\skill\4.000000\tt\0\tl\0
0:00 ClientBegin: 1
0:00 ClientConnect: 2
0:00 ClientUserinfoChanged: 2 n\Clint\t\0\model\wq_male2/red\hc\100\w\0\l\0\skill\4.000000\tt\0\tl\0
0:00 ClientBegin: 2
0:00 Item: 2 item_boiler_plate bought ($15/$20)
0:00 Item: 1 weapon_schofield bought ($18/$20)
0:04 Item: 1 ammo_shells (0) picked up
24:43 ClientConnect: 0
24:43 ClientUserinfoChanged: 0 guid\BF5B919F0F304FFD283FB6FA7B12DEA8\n\sachse33\t\0\model\wq_male1/blue\g_redteam\Outlaws\g_blueteam\Lawmen\hc\100\w\0\l\0\tt\0\tl\0\v\
24:49 ClientUserinfoChanged: 0 guid\BF5B919F0F304FFD283FB6FA7B12DEA8\n\sachse33\t\0\model\wq_male1/blue\g_redteam\Les Brutes\g_blueteam\Les Truands\hc\100\w\0\l\0\tt\0\tl\0\v\
24:49 ClientBegin: 0
24:50 ClientDisconnect: 1
25:23 1523450: client:0 health:100 damage:35.0 where:head from:MOD_FALLING by:1022
25:56 ShutdownGame:
25:56 ------------------------------------------------------------


Then here is the log of the standard output:
broadcast: print "sachse33^7 entered the game\n"
ClientBegin: 0
broadcast: print "Tuco^7 was kicked\n"
ClientDisconnect: 1
Sending heartbeat to master.quake3arena.com
Sending heartbeat to master0.gamespy.com
1523450: client:0 health:100 damage:35.0 where:head from:MOD_FALLING by:1022
********************
ERROR: CM_AdjustAreaPortalState: negative reference count
********************
----- Server Shutdown -----
Sending heartbeat to master.quake3arena.com
Sending heartbeat to master0.gamespy.com
Sending heartbeat to master.quake3arena.com
Sending heartbeat to master0.gamespy.com
==== ShutdownGame ====
ShutdownGame:
------------------------------------------------------------
AAS shutdown.
---------------------------


I'm not sure if it's related the player or to the map...
Will do some tries.
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Tequila » Thu Jan 15, 2009 12:42 am

Btw that seems to be steamboat map related. I will remove this map from the cycle for the moment. Maybe it could happen on another map...
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Tequila » Thu Jan 15, 2009 1:08 am

That's definitively steamboat that is crashing the server when game is launched with qagame dll. It's not crashing while qagame in qvm is used (but I need to try a newer qvm to remove the case "game code has been broken since the release" ;)).

So I restarted my server with QVM game and kept Steamboat in the cycle. I will provide another server in binary dll mode without steamboat and with Joe new stuff activated.
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Tequila » Thu Jan 15, 2009 1:10 am

To reproduce the case in local, you just can start:
Code: Select all
./smokinguns_dedicated.x86_sse2 +set dedicated 1 +set vm_game 0 +set bot_minplayers 4 +map dm_steamboat

After you have compiled your own binaries of course
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby ReD NeCKersoN » Thu Jan 15, 2009 2:00 am

But Steamboat hasn't caused any problems untill now? :?
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Tequila » Thu Jan 15, 2009 8:41 am

You know that's only because I was running the game with binary dll. That was experimental of course as QVM is more tolerent in code execution. So that's just point some weird bug in the engine, maybe related to var signing or var size... This bug is proofing we can't just release binary dlls with the game... But it can help to find a way to improve it and then test the improvement.

Maybe there's something so different in Steamboat you can tell us ? Maybe that could help if SteamBoat is the only map using some exotic functionality... you should be the one knowing that ;)
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby L3th4l » Thu Jan 15, 2009 8:55 am

According to your console output, this "ERROR: CM_AdjustAreaPortalState: negative reference count" is what caused the error. SteamBoat has quite a few Area Portals and looks like one or more of them is causing the error..
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby ReD NeCKersoN » Thu Jan 15, 2009 9:18 am

True. There are quite a few area portals in steamboat. These block the engine from drawing certain sections of the map until a door is opened to that section. I can remove these, but performance will degrade. :|
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby L3th4l » Thu Jan 15, 2009 9:46 am

I would say remove them and test if it crashes again..
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby Joe Kari » Thu Jan 15, 2009 1:45 pm

Hmmm... I read everywhere that running Q3 with dll is not a good idea...
I know that it sounds very attractive because dll runs faster, but it has a cost: a loss of stability and compatibility.
However, the map can't be blame at all: map is not code, it's only data. If the game crash, it's relevant to the game code. At worst, a map can cause a clean shutdown.

And we have already experienced a lot of bad things with dll, hitscan bug for example.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby L3th4l » Thu Jan 15, 2009 7:00 pm

Joe Kari wrote:However, the map can't be blame at all: map is not code, it's only data. If the game crash, it's relevant to the game code. At worst, a map can cause a clean shutdown.
example.


I would have to respectfully disagree with that. If you put things in your map that are not supported or go beyond the limits of the engine (too many area portals), the map is then the cause of the problem.

I can make the game crash with that error even with the qvm buy adding improperly placed or too many Area Portals.

In Doom 3 or Quake 4 (which I also map for) just a leak in your map can cause the game to crash.

All depends on what way you look at it I suppose.
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby Tequila » Fri Jan 16, 2009 4:43 am

I still never compiled a map from source but is there a log of the map building which can help to debug any potentially map problem with the engine ? Maybe we just need to tune the engine a little for our needs.
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby ReD NeCKersoN » Fri Jan 16, 2009 6:17 am

Yes, there is a way to save the compile log with q3map2toolz. I'm pretty sure it could be done with a batch file too. I'll set up my spare pc for SG mapping tomorrow & start a new compile for steamboat (with areaportals?) & save the log. But it takes 3 days on my older pc for a full compile. :(

The .map file is on the ftp if you want to try it yourself, but you'll need to instal GTKRadiant & the mappers pack. The Beginner's Guide Tutorial is underway, but a work in progress.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Sat Jan 17, 2009 9:51 pm

@ ReD:
Ouch... Now I understand why it takes you 3 days to compile it: you have set "_blocksize" to 512 !
The only things that does "blocksize N", is to split the bsp every N units along X-axis, Y-axis, and Z-axis... It's just the same if you add huge hint-brush plane every N units. If you have placed area portal on all doors, you don't need this. Set it to the highest value (8192).
There is a lot of space between the boat and the skybox, just imagine how many useless clusters are created there for nothing (there is no geometry).
There is also good chance that most of block-split occurs unaligned with the map geometry.

IMO, blocksplit are totally useless. That was designed for mapper that was to lazy to make hintbrushes, and this was taking advantage of map style of Q3: only rooms and corridors.

If luck is on your side, having a light-weight PVS table will probably simplify things and remove the bug that happened with dll...

Another thing that come in my mind, I'm pretty sure that area portal should only split 2 clusters. Imagine that one of your block-split cut (cross) an area-portal... Maybe that's the reason why many area-portal don't work in Steamboat.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Breli » Sat Jan 17, 2009 10:01 pm

Joe Kari wrote:IMO, blocksplit are totally useless. That was designed for mapper that was to lazy to make hintbrushes, and this was taking advantage of map style of Q3: only rooms and corridors.


I use _blocksize 512 as well and never had problems with it. Smaller blocksize can help to gain a fps or two since the average set of visible clusters will be reduced as long as the size is kept to sensible levels.

I'd rather say that the areaportals are the problem ...

Cheers

Breli
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Next

Return to Code

Show Sidebar
Show Sidebar

User Control Panel

cron