Page 1 of 1

World Crash - Combat Process

Posted: Tue Aug 13, 2013 1:13 pm
by John Adams
If I were a more paranoid man, I would almost suspect sabotage. I haven't seen this many bugs/crashes since 2008.


Stack:
feeefeee()
> EQ2World.exe!ZoneServer::CombatProcess() Line 957 + 0xb bytes C++
EQ2World.exe!ZoneServer::SpawnProcess() Line 1009 C++
EQ2World.exe!SpawnLoop(void * tmp) Line 5074 + 0xa bytes C++
EQ2World.exe!_callthreadstart() Line 259 + 0x6 bytes C
EQ2World.exe!_threadstart(void * ptd) Line 241 + 0x5 bytes C
kernel32.dll!_BaseThreadStart@8() + 0x34 bytes

Code:

Code: Select all

bool ZoneServer::CombatProcess() {
	bool ret = true;
	MutexList<Spawn*>::iterator itr = spawn_list.begin();
	while (itr.Next()) {
==> here	if (itr->value->IsEntity())
			((Entity*)itr->value)->ProcessCombat();
	}
	return ret;
}

I may have reported this precise break before, but it's the console log that concerned me this time.

Console:
16:57:33 D Client : SendIgnoreList
16:58:08 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

16:58:08 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

16:58:40 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

16:58:40 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

16:58:41 D Items : Loading items for character 'Rage' (179)
16:58:41 D LUA : Found LUA Spell Script: 'Spells/Traditions/SprintintoBattle.lua'
16:58:41 D LUA : Found LUA Spell Script: 'Spells/Traditions/TundraEndurance.lua'
16:58:41 D Guilds : Updating Guild Member Info for Player: 179
16:58:42 D Guilds : Sent ALL guild Events (Guild::SendAllGuildEvents).
16:58:43 D Guilds : Guild Member logged in.
16:58:43 D Player : Getting current title index for player 'Rage'...
16:58:43 D Player : Getting current title index for player 'Rage'...
16:58:43 D Merchant : Loading Buyback - Player: 179
16:59:14 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

16:59:45 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

16:59:45 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:00:17 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:00:17 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:00:48 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:00:48 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:00:53 D World : Removing connection...
17:01:19 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:01:19 E Mutex : Read Timeout waiting for write lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:01:50 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::AddEnemyList (824)

17:02:22 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:02:53 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:03:24 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:03:56 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:04:17 E Mutex : Read Timeout waiting for write lock 'ZoneServer::dead_spawns'
The following functions had locks:
ZoneServer::Process (1162)

17:04:27 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:04:48 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

17:04:58 D Zone : Client is disconnecting in ZoneServer::ClientProcess (camping = false)
17:04:58 D Zone : Sending login equipment appearance updates...
17:04:58 D Login : Looking for Login Appearance Updates for char_id: 179
17:04:58 D Zone : Calling clients.Remove(client)...
17:04:58 D Guilds : Guild Member logged out.
17:04:58 D Zone : Removing client 'Rage' (179) due to LD/Exit...
17:04:58 I Zone : Scheduling client 'Rage' for removal.
17:04:58 D Player : Toggling Character OFFLINE!
17:04:58 D CClient : Client Disconnect...
17:05:32 E Mutex : Write Timeout waiting for read lock 'ZoneServer::npc_faction_list'
The following functions had locks:
ZoneServer::RemoveDeadEnemyList (767)

Re: World Crash - Combat Process

Posted: Tue Aug 13, 2013 1:22 pm
by John Adams
According to code, the call to that itr->value->IsEntity() should have been false. The itr appears there. and "value" has data.

Code: Select all

virtual bool IsEntity(){ return false; }
value.jpg
Sure would make my life easier if you could just log into EQ2TC and debug this yourself. These crashes are far too excessive for me to keep gathering all this half-ass information.

Re: World Crash - Combat Process

Posted: Tue Aug 13, 2013 1:27 pm
by Jabantiz
Console looks like a deadlock in npc_faction_list, stack looks like the pointer went invalid.

Re: World Crash - Combat Process

Posted: Tue Aug 13, 2013 1:35 pm
by Jabantiz
John Adams wrote:According to code, the call to that itr->value->IsEntity() should have been false. The itr appears there. and "value" has data.

Code: Select all

virtual bool IsEntity(){ return false; }
That is a virtual function so each class that inherits from spawn has its own that will overwrite that, Entity class inherits from spawn and overwrites that function to return true, NPC and Player classes both inherit from Entity so it would be true for both of them as well.

Most of the values in the pic look good except for the 4277075694 (0xFEEEFEEE) I wonder if the stack is screwed up due to the deadlock with the list, possibly on a different thread.