aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/TaskInventoryDictionary.cs
diff options
context:
space:
mode:
authormeta72010-08-10 09:07:17 -0700
committermeta72010-08-10 09:07:17 -0700
commit1ead2ed5eea379c500d2657e7bed8908b376e336 (patch)
tree30c510a0fa2fcd99b73a3527d0dffa17b7de3804 /OpenSim/Framework/TaskInventoryDictionary.cs
parentremoning debug messages (diff)
downloadopensim-SC_OLD-1ead2ed5eea379c500d2657e7bed8908b376e336.zip
opensim-SC_OLD-1ead2ed5eea379c500d2657e7bed8908b376e336.tar.gz
opensim-SC_OLD-1ead2ed5eea379c500d2657e7bed8908b376e336.tar.bz2
opensim-SC_OLD-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 'OpenSim/Framework/TaskInventoryDictionary.cs')
-rw-r--r--OpenSim/Framework/TaskInventoryDictionary.cs14
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;
30using System.Threading; 30using System.Threading;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using System.Diagnostics;
33using System.Xml.Schema; 34using System.Xml.Schema;
34using System.Xml.Serialization; 35using System.Xml.Serialization;
35using log4net; 36using 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)