aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-07 02:44:13 +0100
committerJustin Clark-Casey (justincc)2012-06-07 02:44:13 +0100
commit98b46d48fefc7801b7c9e496000e9329f4266e5e (patch)
treee0236812dce3255874a4521993040c1753bd339c /OpenSim/Region/Application/OpenSim.cs
parentminor: Change log messages on Warp3DImageModule to show they are from this mo... (diff)
downloadopensim-SC_OLD-98b46d48fefc7801b7c9e496000e9329f4266e5e.zip
opensim-SC_OLD-98b46d48fefc7801b7c9e496000e9329f4266e5e.tar.gz
opensim-SC_OLD-98b46d48fefc7801b7c9e496000e9329f4266e5e.tar.bz2
opensim-SC_OLD-98b46d48fefc7801b7c9e496000e9329f4266e5e.tar.xz
Allow the thread watchdog to accept an alarm method that is invoked if the timeout is breached.
This alarm can then invoke this to log extra information. This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 76ac827..caba236 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -438,12 +438,16 @@ namespace OpenSim
438 } 438 }
439 } 439 }
440 440
441 private void WatchdogTimeoutHandler(System.Threading.Thread thread, int lastTick) 441 private void WatchdogTimeoutHandler(Watchdog.ThreadWatchdogInfo twi)
442 { 442 {
443 int now = Environment.TickCount & Int32.MaxValue; 443 int now = Environment.TickCount & Int32.MaxValue;
444 444
445 m_log.ErrorFormat("[WATCHDOG]: Timeout detected for thread \"{0}\". ThreadState={1}. Last tick was {2}ms ago", 445 m_log.ErrorFormat(
446 thread.Name, thread.ThreadState, now - lastTick); 446 "[WATCHDOG]: Timeout detected for thread \"{0}\". ThreadState={1}. Last tick was {2}ms ago. {3}",
447 twi.Thread.Name,
448 twi.Thread.ThreadState,
449 now - twi.LastTick,
450 twi.AlarmMethod != null ? string.Format("Data: {0}", twi.AlarmMethod()) : "");
447 } 451 }
448 452
449 #region Console Commands 453 #region Console Commands