Hi Paul,

On 8/29/07, Paul Melis <[EMAIL PROTECTED]> wrote:
> After just updating to 2.1.8 and compiling I noticed that osgviewer will
> hang when exiting most of the time. This only happens when statistics
> are shown when escape is pressed (which mode of statistics doesn't seem
> to matter). Using strace shows that osgviewer is blocked on a futex(...,
> FUTEX_WAIT) call.
> I tried the different threading models and only seem to get the lockup
> with --DrawThreadPerContext (is this the default?).
>
> Paul
>
> PS This is on a FC4 system, with a hyperthreaded Xeon.

Curious... I have no clue what a futex(..) is, it must be something
implemented deep down on pthreads or the c library.  Could you get a
full stack trace?

W.r.t the default, the threading model is chosen at runtime, if you
have just a single core then it'll plump to SingleThreaded, if you
have two cores and one context it'll choose DrawThreadPerContext, one
my quad core system with two cards it chooses
CullPerCameraDrawThreadPerContext.

On you system most likely it'll be choosing DrawThreadPerContext.
DrawThreadPerContext and CullPerCameraDrawThreadPerContext use the
osg::DeleteHandler to cache deleted objects to prevent them from being
deleted while still being rendered. I have noticed occasional problems
with exit due to the DeleteHandler changing the final deletion order,
so am reviewing what to do about this class and how to manage
DrawThreadPerContext and CullPerCameraDrawThreadPerContext without
needing the services of DeleteHandler.

For the time being you can force the threading model to single threaded via:

  export OSG_THREADING=SingleThreaded

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to