Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007587opensim[REGION] Script Functionspublic2015-05-23 05:162015-05-23 07:20
Assigned Tonebadon 
PlatformIntel Core i7Operating SystemUbuntuOperating System Version14.04
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007587: llCastRay V3 suffers mesh cache race condition
DescriptionllCastRay V3 sometimes reports:

2015-05-23 08:31:36,116 WARN - OpenSim.Region.Framework.Scenes.SceneGraph [SCENEGRAPH]: Problem processing action in ForEachSOG: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.UInt64,OpenMetaverse.Rendering.FacetedMesh].Add (UInt64 key, OpenMetaverse.Rendering.FacetedMesh value) [0x00000] in <filename unknown>:0
  at OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api+<llCastRayV3>c__AnonStorey10.<>m__0 (OpenSim.Region.Framework.Scenes.SceneObjectGroup group) [0x00632] in /home/opensim/git/opensim/opensim/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs:14341
  at OpenSim.Region.Framework.Scenes.SceneGraph.ForEachSOG (System.Action`1 action) [0x0001f] in /home/opensim/git/opensim/opensim/OpenSim/Region/Framework/Scenes/SceneGraph.cs:1158

This happens when several threads almost simultaneously creates and tries to add a missing geometry mesh to the mesh cache, so the mesh isn't in cache when they look for it but has been added before they have created and try to add it.
Steps To ReproduceSetup several llCastRay scripts to cast rays through the same prim, sculpt or mesh. Trigger them as simultaneously as possible, e.g. by restarting the sim. Often but not always the above error is reported then.
Additional InformationMono 3.12.1
TagsNo tags attached.
Git Revision or version number0.8.2 dev
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux32
Mono VersionOther
ViewerSingularity 1.8.6 OS X
Attached Filespatch file icon 0001-Fix-mesh-cache-race-condition-in-llCastRay-V3.patch [^] (1,810 bytes) 2015-05-23 05:16 [Show Content]

- Relationships
related to 0007546closednebadon llCastRay only partly implemented 
related to 0007575closednebadon llCastRay V3 performance improved by mesh caching 

-  Notes
Magnuz (reporter)
2015-05-23 05:17

Patch adds an extra check before trying to add a created mesh to the mesh cache. The option to keep the mesh cache locked while the mesh is created would risk holding up threads and degrade performance, so the extra check is probably preferred.
nebadon (administrator)
2015-05-23 05:38

patch applied : [^]
Magnuz (reporter)
2015-05-23 07:20

Verified code and function, so closing.

- Issue History
Date Modified Username Field Change
2015-05-23 05:16 Magnuz New Issue
2015-05-23 05:16 Magnuz File Added: 0001-Fix-mesh-cache-race-condition-in-llCastRay-V3.patch
2015-05-23 05:17 Magnuz Note Added: 0028436
2015-05-23 05:17 Magnuz Status new => patch included
2015-05-23 05:18 Magnuz Description Updated View Revisions
2015-05-23 05:20 Magnuz Relationship added related to 0007546
2015-05-23 05:20 Magnuz Relationship added related to 0007575
2015-05-23 05:38 nebadon Note Added: 0028437
2015-05-23 05:38 nebadon Status patch included => resolved
2015-05-23 05:38 nebadon Resolution open => fixed
2015-05-23 05:38 nebadon Assigned To => nebadon
2015-05-23 07:20 Magnuz Note Added: 0028438
2015-05-23 07:20 Magnuz Status resolved => closed
2015-05-23 07:20 Magnuz Fixed in Version => master (dev code)

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker