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=64680.7.5-pf-bulletsim
parent
235afebf03
commit
ae67435146
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue