diff options
author | meta7 | 2010-08-10 09:07:17 -0700 |
---|---|---|
committer | meta7 | 2010-08-10 09:07:17 -0700 |
commit | 1ead2ed5eea379c500d2657e7bed8908b376e336 (patch) | |
tree | 30c510a0fa2fcd99b73a3527d0dffa17b7de3804 /OpenSim/Framework | |
parent | remoning debug messages (diff) | |
download | opensim-SC-1ead2ed5eea379c500d2657e7bed8908b376e336.zip opensim-SC-1ead2ed5eea379c500d2657e7bed8908b376e336.tar.gz opensim-SC-1ead2ed5eea379c500d2657e7bed8908b376e336.tar.bz2 opensim-SC-1ead2ed5eea379c500d2657e7bed8908b376e336.tar.xz |
Add a stack trace to the error output on the recursive read lock warning on my RWlocks. Whilst recursive locks are safe, coupled with other issues we're experiencing with the TaskInventoryDictionary it implies that somewhere the lock is not being freed possibly due to a merge error somewhere, and thus it needs to be looked into.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/TaskInventoryDictionary.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs index 4b9a509..6b65fba 100644 --- a/OpenSim/Framework/TaskInventoryDictionary.cs +++ b/OpenSim/Framework/TaskInventoryDictionary.cs | |||
@@ -30,6 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Threading; | 30 | using System.Threading; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Xml; | 32 | using System.Xml; |
33 | using System.Diagnostics; | ||
33 | using System.Xml.Schema; | 34 | using System.Xml.Schema; |
34 | using System.Xml.Serialization; | 35 | using System.Xml.Serialization; |
35 | using log4net; | 36 | using log4net; |
@@ -90,6 +91,19 @@ namespace OpenSim.Framework | |||
90 | if (m_itemLock.RecursiveReadCount > 0) | 91 | if (m_itemLock.RecursiveReadCount > 0) |
91 | { | 92 | { |
92 | m_log.Error("[TaskInventoryDictionary] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue."); | 93 | m_log.Error("[TaskInventoryDictionary] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue."); |
94 | try | ||
95 | { | ||
96 | StackTrace stackTrace = new StackTrace(); // get call stack | ||
97 | StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) | ||
98 | |||
99 | // write call stack method names | ||
100 | foreach (StackFrame stackFrame in stackFrames) | ||
101 | { | ||
102 | m_log.Error("[SceneObjectGroup.m_parts] "+(stackFrame.GetMethod().Name); // write method name | ||
103 | } | ||
104 | } | ||
105 | catch | ||
106 | {} | ||
93 | m_itemLock.ExitReadLock(); | 107 | m_itemLock.ExitReadLock(); |
94 | } | 108 | } |
95 | if (m_itemLock.RecursiveWriteCount > 0) | 109 | if (m_itemLock.RecursiveWriteCount > 0) |