Instead of locking SOG.Children when a group is being removed from the scene, iterate over an unlocked list instead
Previously, deadlock was possible because deleting a group took a SOG.Children lock then an m_entityUpdates.SyncRoot lock in LLClientView At the same time, a thread starting from LLClientView.ProcessEntityUpdates() could take an m_entityUpdates.SyncRoot lock then later attempt to take a SOG.Children lock in PermissionsModule.GenerateClientFlags() and later on Taking a children list in SOG appears to be a better solution than changing PermissionsModule to not relook up the prim. Going the permission modules root would require that all downstream modules not take a SOG.Children lock eitherviewer-2-initial-appearance
parent
8ed08a10d9
commit
16f296f489
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -1236,11 +1237,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="silent">If true then deletion is not broadcast to clients</param>
|
||||
public void DeleteGroup(bool silent)
|
||||
{
|
||||
List<SceneObjectPart> parts;
|
||||
|
||||
lock (m_parts)
|
||||
parts = m_parts.Values.ToList();
|
||||
|
||||
foreach (SceneObjectPart part in parts)
|
||||
{
|
||||
foreach (SceneObjectPart part in m_parts.Values)
|
||||
{
|
||||
// part.Inventory.RemoveScriptInstances();
|
||||
Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
if (avatar.ParentID == LocalId)
|
||||
|
@ -1257,7 +1260,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddScriptLPS(int count)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue