From 1547fe959eed6ad9343c65adf7fb7484732c90ca Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Mar 2012 16:06:35 +0000 Subject: [PATCH 1/3] Change OpenSim.ini.example to reflect how to actually enable prim limits, as opposed to how it was first designed. --- bin/OpenSim.ini.example | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 08a6194fb2..1f3cd0d554 100755 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -172,6 +172,7 @@ ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule ;; Permission modules to use, separated by comma. + ;; Possible modules are DefaultPermissionsModule, PrimLimitsModule ; permissionmodules = DefaultPermissionsModule ;# {serverside_object_permissions} {permissionmodules:DefaultPermissionsModule} {Activate permission handling by the sim?} {true false} true @@ -790,11 +791,6 @@ ; Enabled = false -[PrimLimitsModule] - ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false - ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior. - ; EnforcePrimLimits = false - [Architecture] ;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini From e0dd38f6722e891cfc91c8d795604b7b78c0bc81 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 12 Mar 2012 10:07:04 -0700 Subject: [PATCH 2/3] Rename the stream extension method WebUtil.CopyTo() to WebUtil.CopyStream(). .NET 4.0 added the method Stream.CopyTo(stream, bufferSize). For .NET 3.5 and before, WebUtil defined an extension method for Stream with the signature Stream.CopyTo(stream, maxBytesToCopy). The meaning of the second parameter is different in the two forms and depending on which compiler and/or runtime you use, you could get one form or the other. Crashes ensue. This change renames the WebUtil stream copy method to something that cannot be confused with the new CopyTo method defined in .NET 4.0. --- OpenSim/Data/MySQL/MySQLXAssetData.cs | 2 +- OpenSim/Framework/MultipartForm.cs | 2 +- OpenSim/Framework/WebUtil.cs | 7 ++++++- .../Connectors/SimianGrid/SimianAssetServiceConnector.cs | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs index 95ef72a09b..06fe55a9b3 100644 --- a/OpenSim/Data/MySQL/MySQLXAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs @@ -162,7 +162,7 @@ namespace OpenSim.Data.MySQL using (GZipStream decompressionStream = new GZipStream(new MemoryStream(asset.Data), CompressionMode.Decompress)) { MemoryStream outputStream = new MemoryStream(); - WebUtil.CopyTo(decompressionStream, outputStream, int.MaxValue); + WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); // int compressedLength = asset.Data.Length; asset.Data = outputStream.ToArray(); diff --git a/OpenSim/Framework/MultipartForm.cs b/OpenSim/Framework/MultipartForm.cs index 90c4007ddc..7a13e8b21c 100644 --- a/OpenSim/Framework/MultipartForm.cs +++ b/OpenSim/Framework/MultipartForm.cs @@ -119,7 +119,7 @@ namespace OpenSim.Framework // Copy the temporary stream to the network stream formDataStream.Seek(0, SeekOrigin.Begin); using (Stream requestStream = request.GetRequestStream()) - formDataStream.CopyTo(requestStream, (int)formDataStream.Length); + formDataStream.CopyStream(requestStream, (int)formDataStream.Length); } #endregion Stream Writing diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 77f3d9b733..ead8f463f7 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -510,8 +510,13 @@ namespace OpenSim.Framework /// /// Copying begins at the streams' current positions. The positions are /// NOT reset after copying is complete. + /// NOTE!! .NET 4.0 adds the method 'Stream.CopyTo(stream, bufferSize)'. + /// This function could be replaced with that method once we move + /// totally to .NET 4.0. For versions before, this routine exists. + /// This routine used to be named 'CopyTo' but the int parameter has + /// a different meaning so this method was renamed to avoid any confusion. /// - public static int CopyTo(this Stream copyFrom, Stream copyTo, int maximumBytesToCopy) + public static int CopyStream(this Stream copyFrom, Stream copyTo, int maximumBytesToCopy) { byte[] buffer = new byte[4096]; int readBytes; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 99523a1231..6bfc5cc4f2 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -477,7 +477,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // Grab the asset data from the response stream using (MemoryStream stream = new MemoryStream()) { - responseStream.CopyTo(stream, 4096); + responseStream.CopyStream(stream, Int32.MaxValue); asset.Data = stream.ToArray(); } } From 25592bbd852e9350bca25f240d6d54c7a54e28a0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 12 Mar 2012 21:16:05 +0000 Subject: [PATCH 3/3] Add max thread and min thread information to "xengine status" region console command --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 3 +++ OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index bc1902b992..4010167550 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -578,7 +578,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance return true; if (!m_InSelfDelete) + { +// m_log.ErrorFormat("[SCRIPT INSTANCE]: Aborting script {0} {1}", ScriptName, ItemID); result.Abort(); + } lock (m_EventQueue) { diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index b433430048..66349e3ac0 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -384,6 +384,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count); sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count); + sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads); + sb.AppendFormat("Min threads : {0}\n", m_ThreadPool.MinThreads); sb.AppendFormat("Allocated threads : {0}\n", m_ThreadPool.ActiveThreads); sb.AppendFormat("In use threads : {0}\n", m_ThreadPool.InUseThreads); sb.AppendFormat("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks);