Finally hunted down the Parallel deadlock. Packets were being handled asynchronously (filling up the threadpool with handlers), which would turn around and try to do parallel operations on the starved threadpool. The solution for now is to disable Parallel.cs operations until we can gracefully handle parallel operations with a potentially starved threadpool
parent
b498693cff
commit
3a1ee79ee4
|
@ -120,7 +120,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
|
||||
private int m_incrementsof15seconds;
|
||||
private volatile bool m_backingup;
|
||||
private bool m_useAsyncWhenPossible = true;
|
||||
private bool m_useAsyncWhenPossible;
|
||||
|
||||
private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>();
|
||||
private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>();
|
||||
|
@ -480,7 +480,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
IConfig startupConfig = m_config.Configs["Startup"];
|
||||
|
||||
// Should we try to run loops synchronously or asynchronously?
|
||||
m_useAsyncWhenPossible = startupConfig.GetBoolean("use_async_when_possible", true);
|
||||
m_useAsyncWhenPossible = startupConfig.GetBoolean("use_async_when_possible", false);
|
||||
|
||||
//Animation states
|
||||
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
|
||||
|
@ -4261,10 +4261,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void ForEachClient(Action<IClientAPI> action, bool doAsynchronous)
|
||||
{
|
||||
if (doAsynchronous)
|
||||
m_clientManager.ForEach(action);
|
||||
else
|
||||
m_clientManager.ForEachSync(action);
|
||||
// FIXME: Asynchronous iteration is disabled until we have a threading model that
|
||||
// can support calling this function from an async packet handler without
|
||||
// potentially deadlocking
|
||||
//if (doAsynchronous)
|
||||
// m_clientManager.ForEach(action);
|
||||
//else
|
||||
// m_clientManager.ForEachSync(action);
|
||||
}
|
||||
|
||||
public bool TryGetClient(UUID avatarID, out IClientAPI client)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
; in parallel. Running in parallel should increase performance
|
||||
; on a multi-core system, but will make debugging more
|
||||
; difficult if something deadlocks or times out
|
||||
use_async_when_possible = true
|
||||
use_async_when_possible = false
|
||||
|
||||
; Max threads to allocate on the FireAndForget thread pool
|
||||
; when running with the SmartThreadPool option above
|
||||
|
|
Loading…
Reference in New Issue