From e36a54ee2ab7b9e8f9c9170610a942c261eb270c Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 5 Oct 2009 20:39:23 -0700
Subject: #if DEBBUG code for monitoring the ThreadPool.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 606135b..35e57e5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -962,6 +962,13 @@ namespace OpenSim.Region.Framework.Scenes
int maintc = 0;
while (!shuttingdown)
{
+#if DEBUG
+ int w = 0, io = 0, maxw=0, maxio=0;
+ ThreadPool.GetAvailableThreads(out w, out io);
+ ThreadPool.GetMaxThreads(out maxw, out maxio);
+ if ((maxw - w < 10) || (maxio - io < 10))
+ m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}({1}); io = {2}({3})", w, io, maxw, maxio);
+#endif
maintc = Environment.TickCount;
TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate;
--
cgit v1.1
From 0c46df973ad08381a7fcdb892e4525dfdb1d6ee4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 5 Oct 2009 21:02:10 -0700
Subject: Correction on the DEBUG code.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 35e57e5..d0dc021 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -963,11 +963,10 @@ namespace OpenSim.Region.Framework.Scenes
while (!shuttingdown)
{
#if DEBUG
- int w = 0, io = 0, maxw=0, maxio=0;
+ int w = 0, io = 0;
ThreadPool.GetAvailableThreads(out w, out io);
- ThreadPool.GetMaxThreads(out maxw, out maxio);
- if ((maxw - w < 10) || (maxio - io < 10))
- m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}({1}); io = {2}({3})", w, io, maxw, maxio);
+ if ((w < 10) || (io < 10))
+ m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}; io = {1}", w, io);
#endif
maintc = Environment.TickCount;
--
cgit v1.1
From 2a060136bd89174a3071de9458c25af133c01b64 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 6 Oct 2009 15:28:38 +0100
Subject: Lock the heartbeat against multiple invocations. May prevent
deadlocks and/or runaway thread use
---
OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d0dc021..c863c3b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -137,6 +137,8 @@ namespace OpenSim.Region.Framework.Scenes
protected IAssetService m_AssetService = null;
protected IAuthorizationService m_AuthorizationService = null;
+ private Object m_heartbeatLock = new Object();
+
public IAssetService AssetService
{
get
@@ -942,6 +944,9 @@ namespace OpenSim.Region.Framework.Scenes
///
private void Heartbeat(object sender)
{
+ if (!Monitor.TryEnter(m_heartbeatLock))
+ return;
+
try
{
Update();
@@ -952,6 +957,11 @@ namespace OpenSim.Region.Framework.Scenes
catch (ThreadAbortException)
{
}
+ finally
+ {
+ Monitor.Pulse(m_heartbeatLock);
+ Monitor.Exit(m_heartbeatLock);
+ }
}
///
--
cgit v1.1
From d4d060b57d380c9a19536bde79013b7634dbdf83 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 6 Oct 2009 07:49:05 -0700
Subject: Commenting the DEBUG code that I added yesterday, because it's
causing mono to fail with https://bugzilla.novell.com/show_bug.cgi?id=538854
---
OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d0dc021..df9b163 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -962,12 +962,12 @@ namespace OpenSim.Region.Framework.Scenes
int maintc = 0;
while (!shuttingdown)
{
-#if DEBUG
- int w = 0, io = 0;
- ThreadPool.GetAvailableThreads(out w, out io);
- if ((w < 10) || (io < 10))
- m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}; io = {1}", w, io);
-#endif
+//#if DEBUG
+// int w = 0, io = 0;
+// ThreadPool.GetAvailableThreads(out w, out io);
+// if ((w < 10) || (io < 10))
+// m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}; io = {1}", w, io);
+//#endif
maintc = Environment.TickCount;
TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate;
--
cgit v1.1
From 3db4d38645260b0299e082b47b010dddf569bf31 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 6 Oct 2009 09:54:15 -0700
Subject: Removing dependencies on System.Runtime.Remoting.
---
OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
index 44e850b..6c89ac8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
@@ -61,6 +61,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
private void OnRegionUp(GridRegion otherRegion)
{
+ // This shouldn't happen
+ if (otherRegion == null)
+ return;
+
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
m_scene.RegionInfo.RegionName, otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY);
--
cgit v1.1
From 77b4abaa251929a4d6079d766f041f997071dc46 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 6 Oct 2009 11:08:11 -0700
Subject: * Removed verbose debug message * Restored HG inventory access which
had been lost upon adding a 3rd argument to inventory and asset server
handlers * Fixed a stupid bug in the InventoryConnector which was making move
items do things twice
---
.../ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs | 2 +-
.../ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
index bb9a4b2..879cc70 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
m_log.Info("[RegionAssetService]: Starting...");
- Object[] args = new Object[] { m_Config, MainServer.Instance };
+ Object[] args = new Object[] { m_Config, MainServer.Instance, string.Empty };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
index c326818..54c6d89 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
m_log.Info("[RegionInventoryService]: Starting...");
- Object[] args = new Object[] { m_Config, MainServer.Instance };
+ Object[] args = new Object[] { m_Config, MainServer.Instance, String.Empty };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args);
}
--
cgit v1.1