From ae67435146d65e1241c15677952f7d4a05ee794c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Dec 2012 01:51:30 +0000 Subject: Disable UDPPacketBuffer pooling for now to resolve an issue on Windows of interference between incoming packets. On Windows, concurrent multi-threaded processing of inbound UDP somehow allows different data input processing to interfere with each other. Possibly the endpoint reference is being switched, though I don't yet know the mechanism. Not seen on Mono. Also resolveable by setting RecyclePackets = false or RecycleBaseUDPPackets = false in [PacketPool] Or async_packet_handling = false in [ClientStack.LindenUDP] For now, will simply disable this particular pooling though will revisit this issue. In response to http://opensimulator.org/mantis/view.php?id=6468 --- OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 3f7ca2b..f143c32 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -208,9 +208,12 @@ namespace OpenMetaverse { UDPPacketBuffer buf; - if (UsePools) - buf = Pool.GetObject(); - else + // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other + // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux. + // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation. +// if (UsePools) +// buf = Pool.GetObject(); +// else buf = new UDPPacketBuffer(); if (IsRunningInbound) @@ -291,8 +294,8 @@ namespace OpenMetaverse catch (ObjectDisposedException) { } finally { - if (UsePools) - Pool.ReturnObject(buffer); +// if (UsePools) +// Pool.ReturnObject(buffer); // Synchronous mode waits until the packet callback completes // before starting the receive to fetch another packet -- cgit v1.1