aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
committerJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
commit41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf (patch)
treec3f55715685c213673697e09d234e82616f0dc9c /OpenSim/Region/CoreModules
parentMake LLUDP output queue refill thread active by default, since load tests hav... (diff)
downloadopensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.zip
opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.gz
opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.bz2
opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.xz
For monitoring purposes, start non-timeout tasks (which do not currently use a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout()
The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc. Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs3
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs5
6 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index f06d70d..9d6870f 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -43,6 +43,7 @@ using Mono.Addins;
43using OpenMetaverse; 43using OpenMetaverse;
44using OpenSim.Framework; 44using OpenSim.Framework;
45using OpenSim.Framework.Console; 45using OpenSim.Framework.Console;
46using OpenSim.Framework.Monitoring;
46using OpenSim.Region.Framework.Interfaces; 47using OpenSim.Region.Framework.Interfaces;
47using OpenSim.Region.Framework.Scenes; 48using OpenSim.Region.Framework.Scenes;
48using OpenSim.Services.Interfaces; 49using OpenSim.Services.Interfaces;
@@ -963,7 +964,8 @@ namespace OpenSim.Region.CoreModules.Asset
963 case "assets": 964 case "assets":
964 con.Output("Ensuring assets are cached for all scenes."); 965 con.Output("Ensuring assets are cached for all scenes.");
965 966
966 Util.RunThreadNoTimeout(delegate { 967 Watchdog.RunInThread(delegate
968 {
967 int assetReferenceTotal = TouchAllSceneAssets(true); 969 int assetReferenceTotal = TouchAllSceneAssets(true);
968 con.OutputFormat("Completed check with {0} assets.", assetReferenceTotal); 970 con.OutputFormat("Completed check with {0} assets.", assetReferenceTotal);
969 }, "TouchAllSceneAssets", null); 971 }, "TouchAllSceneAssets", null);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index d15703e..a5b5aa2 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -34,6 +34,7 @@ using System.Xml;
34using log4net; 34using log4net;
35using OpenMetaverse; 35using OpenMetaverse;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Monitoring;
37using OpenSim.Framework.Serialization; 38using OpenSim.Framework.Serialization;
38using OpenSim.Framework.Serialization.External; 39using OpenSim.Framework.Serialization.External;
39using OpenSim.Region.CoreModules.World.Archiver; 40using OpenSim.Region.CoreModules.World.Archiver;
@@ -356,7 +357,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
356 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, 357 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID,
357 options, ReceivedAllAssets); 358 options, ReceivedAllAssets);
358 359
359 Util.RunThreadNoTimeout(o => ar.Execute(), "AssetsRequest", null); 360 Watchdog.RunInThread(o => ar.Execute(), string.Format("AssetsRequest ({0})", m_scene.Name), null);
360 } 361 }
361 else 362 else
362 { 363 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index f80fab3..470ef02 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -33,6 +33,7 @@ using System;
33using System.Collections.Generic; 33using System.Collections.Generic;
34using System.Reflection; 34using System.Reflection;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Monitoring;
36using OpenSim.Data; 37using OpenSim.Data;
37using OpenSim.Server.Base; 38using OpenSim.Server.Base;
38using OpenSim.Region.Framework.Interfaces; 39using OpenSim.Region.Framework.Interfaces;
@@ -183,12 +184,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
183 // Protect ourselves against the caller subsequently modifying the items list 184 // Protect ourselves against the caller subsequently modifying the items list
184 List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items); 185 List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items);
185 186
186 Util.RunThreadNoTimeout(delegate 187 Watchdog.RunInThread(delegate
187 { 188 {
188 foreach (InventoryItemBase item in items) 189 foreach (InventoryItemBase item in items)
189 if (!string.IsNullOrEmpty(item.CreatorData)) 190 if (!string.IsNullOrEmpty(item.CreatorData))
190 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); 191 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
191 }, "GetFolderContent", null); 192 }, string.Format("GetFolderContent (user {0}, folder {1})", userID, folderID), null);
192 } 193 }
193 194
194 return invCol; 195 return invCol;
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index c8056d4..3e0c9f3 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -36,6 +36,7 @@ using System.Xml;
36using log4net; 36using log4net;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Monitoring;
39using OpenSim.Framework.Serialization; 40using OpenSim.Framework.Serialization;
40using OpenSim.Framework.Serialization.External; 41using OpenSim.Framework.Serialization.External;
41using OpenSim.Region.CoreModules.World.Terrain; 42using OpenSim.Region.CoreModules.World.Terrain;
@@ -371,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
371 // Start the scripts. We delayed this because we want the OAR to finish loading ASAP, so 372 // Start the scripts. We delayed this because we want the OAR to finish loading ASAP, so
372 // that users can enter the scene. If we allow the scripts to start in the loop above 373 // that users can enter the scene. If we allow the scripts to start in the loop above
373 // then they significantly increase the time until the OAR finishes loading. 374 // then they significantly increase the time until the OAR finishes loading.
374 Util.RunThreadNoTimeout(delegate(object o) 375 Watchdog.RunInThread(o =>
375 { 376 {
376 Thread.Sleep(15000); 377 Thread.Sleep(15000);
377 m_log.Info("[ARCHIVER]: Starting scripts in scene objects"); 378 m_log.Info("[ARCHIVER]: Starting scripts in scene objects");
@@ -386,7 +387,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
386 387
387 sceneContext.SceneObjects.Clear(); 388 sceneContext.SceneObjects.Clear();
388 } 389 }
389 }, "ReadArchiveStartScripts", null); 390 }, string.Format("ReadArchiveStartScripts (request {0})", m_requestId), null);
390 391
391 m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); 392 m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
392 393
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 448147a..803f24e 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -36,6 +36,7 @@ using System.Xml;
36using log4net; 36using log4net;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Monitoring;
39using OpenSim.Framework.Serialization; 40using OpenSim.Framework.Serialization;
40using OpenSim.Region.CoreModules.World.Terrain; 41using OpenSim.Region.CoreModules.World.Terrain;
41using OpenSim.Region.Framework.Interfaces; 42using OpenSim.Region.Framework.Interfaces;
@@ -199,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
199 m_rootScene.AssetService, m_rootScene.UserAccountService, 200 m_rootScene.AssetService, m_rootScene.UserAccountService,
200 m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); 201 m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets);
201 202
202 Util.RunThreadNoTimeout(o => ar.Execute(), "AssetsRequest", null); 203 Watchdog.RunInThread(o => ar.Execute(), "Archive Assets Request", null);
203 204
204 // CloseArchive() will be called from ReceivedAllAssets() 205 // CloseArchive() will be called from ReceivedAllAssets()
205 } 206 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 4f428c3..ec39bc0 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -33,6 +33,7 @@ using System.Timers;
33using log4net; 33using log4net;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Monitoring;
36using OpenSim.Framework.Serialization; 37using OpenSim.Framework.Serialization;
37using OpenSim.Framework.Serialization.External; 38using OpenSim.Framework.Serialization.External;
38using OpenSim.Services.Interfaces; 39using OpenSim.Services.Interfaces;
@@ -226,7 +227,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
226 finally 227 finally
227 { 228 {
228 if (timedOut) 229 if (timedOut)
229 Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", true); 230 Watchdog.RunInThread(PerformAssetsRequestCallback, "Archive Assets Request Callback", true);
230 } 231 }
231 } 232 }
232 233
@@ -295,7 +296,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
295 296
296 // We want to stop using the asset cache thread asap 297 // We want to stop using the asset cache thread asap
297 // as we now need to do the work of producing the rest of the archive 298 // as we now need to do the work of producing the rest of the archive
298 Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", false); 299 Watchdog.RunInThread(PerformAssetsRequestCallback, "Archive Assets Request Callback", false);
299 } 300 }
300 else 301 else
301 { 302 {