aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-15 00:20:47 +0000
committerJustin Clark-Casey (justincc)2012-03-19 21:29:34 +0000
commitb01c79354c4c9ca4e0f01fc4fef3ad4fb97f1c19 (patch)
tree795fe3c6702c573afdcd37089bd15e035d1d0230 /OpenSim/Region/Framework
parentAlleviate an issue where calling Thread.Abort() on script WorkItems can fail ... (diff)
downloadopensim-SC_OLD-b01c79354c4c9ca4e0f01fc4fef3ad4fb97f1c19.zip
opensim-SC_OLD-b01c79354c4c9ca4e0f01fc4fef3ad4fb97f1c19.tar.gz
opensim-SC_OLD-b01c79354c4c9ca4e0f01fc4fef3ad4fb97f1c19.tar.bz2
opensim-SC_OLD-b01c79354c4c9ca4e0f01fc4fef3ad4fb97f1c19.tar.xz
Fix a problem where multiple near simultaneous calls to llDie() from multiple scripts in the same linkset can cause unnecessary thread aborts.
The first llDie() could lock Scene.m_deleting_scene_object. The second llDie() would then wait at this lock. The first llDie() would go on to remove the second script but always abort it since the second script's WorkItem would not go away. Easiest solution here is to remove the m_deleting_scene_object since it's no longer justified - we no longer lock m_parts but take a copy instead. This also requires an adjustment in XEngine.OnRemoveScript not to use instance.ObjectID instead when firing the OnObjectRemoved event.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
1 files changed, 1 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a6f9250..0efcf72 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -219,8 +219,6 @@ namespace OpenSim.Region.Framework.Scenes
219 219
220 private int m_lastUpdate; 220 private int m_lastUpdate;
221 private bool m_firstHeartbeat = true; 221 private bool m_firstHeartbeat = true;
222
223 private object m_deleting_scene_object = new object();
224 222
225 private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; 223 private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
226 private bool m_reprioritizationEnabled = true; 224 private bool m_reprioritizationEnabled = true;
@@ -2006,15 +2004,8 @@ namespace OpenSim.Region.Framework.Scenes
2006 public void DeleteSceneObject(SceneObjectGroup group, bool silent) 2004 public void DeleteSceneObject(SceneObjectGroup group, bool silent)
2007 { 2005 {
2008// m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID); 2006// m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID);
2009
2010 //SceneObjectPart rootPart = group.GetChildPart(group.UUID);
2011 2007
2012 // Serialise calls to RemoveScriptInstances to avoid 2008 group.RemoveScriptInstances(true);
2013 // deadlocking on m_parts inside SceneObjectGroup
2014 lock (m_deleting_scene_object)
2015 {
2016 group.RemoveScriptInstances(true);
2017 }
2018 2009
2019 SceneObjectPart[] partList = group.Parts; 2010 SceneObjectPart[] partList = group.Parts;
2020 2011