Change default script stop method to co-op instead of abort.

co-op should be more stable as it doesn't abort threads, which can trigger virtual machine instability
This change will be invisible to users as script DLLs are recompiled automatically where necessary, though the change won't take affect until the next simulator restart.
This change has no effect on existing script state.
If you want to continue using abort, set ScriptStopStrategy = abort in the [XEngine] section of OpenSim.ini
bullet-2.82
Justin Clark-Casey (justincc) 2014-07-16 22:58:38 +01:00
parent d62acc7e37
commit 8cd7ca568d
2 changed files with 9 additions and 4 deletions

View File

@ -86,6 +86,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
/// </summary> /// </summary>
private int m_StartDelay; private int m_StartDelay;
/// <summary>
/// Are we stopping scripts co-operatively by inserting checks in them at C# compile time (true) or aborting
/// their threads (false)?
/// </summary>
private bool m_coopTermination; private bool m_coopTermination;
private int m_IdleTimeout; private int m_IdleTimeout;
@ -242,7 +246,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_ScriptConfig = configSource.Configs["XEngine"]; m_ScriptConfig = configSource.Configs["XEngine"];
m_ConfigSource = configSource; m_ConfigSource = configSource;
string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "abort"); string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "coop");
m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy); m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy);

View File

@ -1427,12 +1427,13 @@
; DeleteScriptsOnStartup = false ; DeleteScriptsOnStartup = false
; Controls whether scripts are stopped by aborting their threads externally (abort) ; Controls whether scripts are stopped by aborting their threads externally (abort)
; or by co-operative checks inserted by OpenSimulator into compiled script (co-op) ; or by co-operative checks inserted by OpenSimulator into compiled script (co-op).
; co-op will be more stable but this option is currently experimental. ; co-op will be more stable as aborting threads can cause instability.
; abort was the default option in OpenSimulator 0.8 and before.
; If this setting is changed between co-op and abort, then existing scripts will automatically be recompiled if necessary. ; If this setting is changed between co-op and abort, then existing scripts will automatically be recompiled if necessary.
; However, the setting change will not take affect until the next time you restart the simulator. ; However, the setting change will not take affect until the next time you restart the simulator.
; Setting changes will not affect state information stored for scripts. ; Setting changes will not affect state information stored for scripts.
;ScriptStopStrategy = abort ScriptStopStrategy = co-op
; Rate to poll for asynchronous command replies (ms) ; Rate to poll for asynchronous command replies (ms)
; currently unused ; currently unused