Re: [AD] keyboard hang, linux, 4.1.8

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Confirmed, the bug disappears if the timer mutexes are disabled.

Thanks for working on this problem!

> Below is the gdb session of exgui after it hangs.  Thread 3 is the
> bg_man thread, which has locked the X display in order to process X
> events, and now is waiting to lock the timer mutex.  Thread 4 is the
> timer thread, which has previously locked the timer mutex and now is
> looking to lock the X display to redraw the mouse cursor.

A really nice deadlock! I wasn't aware that the bg_man thread holds a mutex 
for such a long time. Sorry :-(

> One possible fix is attached.  It merges the bg_man and ptimer threads,
> which might be a bit drastic but is probably a good thing anyway
> (because it gets us closer to interrupt behaviour, as less things can
> happen while timer callbacks are running).  It needs more testing.

Drastic indeed! Aren't you afraid that doing so might reduce timer accuracy ?

Would it not be feasible to make the bg_man thread hold the mutex only a very 
short time ?

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/