On Tue, Feb 02, 2010 at 05:41:24PM +0000, Robert Osfield wrote: > Hi David, > > On Tue, Feb 2, 2010 at 5:29 PM, David Fries <[email protected]> wrote: > > nice -n 20 taskset -p 1 osgviewer > > /opt/src/OSG_CACHE/earth_bayarea/earth.ive --file-cache > > /opt/src/OSG_CACHE/earth_bayarea/ > > OK, add the "nice -n 20 taskset -p 1" and turning off vsync I'm able > to get over 10 thousands requests. The diagnostics I've added so far > show that the number of requests reports by the on screen stats is > consistent with the number of DatabaseRequest currently in memory. > > How on earth the DatabasePager is generating and maintaining so many > is my next question, it looks to me they must be orphaned from their > original PagedLOD nodes but still maintained by the pager. More > diagnostics are required... > > > With my changes the multiset needs to remove the request, update the > > sort variables, and insert it again. ?I had an assert in there to test > > if the request was found in the queue it locked the mutex for and was > > failing to find the request in the queue. ?This race condition happens > > more frequently when there are few requests in the queue. > > Do you see a crash with this race condition without adding the assert?
Not with the std::vector. It's modifying the request's data values holding the wrong lock at times, but other than it being bad behavior modifying data that isn't locked, it didn't seem to cause any fatal errors. The requestNodeFile section only needed the queue to get the lock, other than that it didn't use the queue. The std::multiset version requires it to remove and re-insert it from and to the correct queue. It would do whatever container.erase(container.end()) would do. The sorting would be incorrect if it wasn't in the list and I had to fix the locking to have the correct queue, I can't say I tried it without the assert before fixing the problem. -- David Fries <[email protected]> http://fries.net/~david/ (PGP encryption key available) _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
