Re: [AD] Alsa midi deadlock under Linux using three finger combo. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2005-10-09 at 13:55 +0200, Grzegorz Adam Hankiewicz wrote:
> >From the looks of the "info threads" command, it seems my system has
> a terribly messed up midi configuration. Indeed, Allegro's miditest
> reports I have ALSA rawMIDI, but I don't "hear" anything. Digital
> sound plays fine though.
>
> I'm not sure how valid this bug report is. The problem seems to be
> a misconfigured midi being autodetected. Putting midi_card = 0 in
> the configuration file works like a charm. Configuring alsa properly
> would surely work too. On the other hand, maybe the deadlock during
> the three finger combo could be avoided?
>
> The miditest program doesn't seem to hog the CPU and drop framerates,
> but then, it's not doing much, sitting there idle for the user to
> play the piano.
>
Does DIGMID work?
My experience with alsa midi always is similiar to what you describe,
but I always blamed it on my installation.
About the deadlock.. do you see in the backtraces what exactly
deadlocks?
Thread 1 seems locked on something, and thread 2 is spitting out some
error messages.. but not sure what is going on.
The ctrl-alt-end combo does this, in src/x/xkeyboard.c:
/* Detect Ctrl-Alt-End. */
if (keycode == KEY_END && (_key_shifts & KB_CTRL_FLAG) &&
(_key_shifts & KB_ALT_FLAG)) {
#ifndef HAVE_LIBPTHREAD
if (_unix_bg_man == &_bg_man_sigalrm)
_sigalrm_request_abort();
else
#endif
kill(main_pid, SIGTERM);
}
So, it just calls "kill", since most likely you have pthreads. Does it
help if you put:
XUNLOCK();
before the kill? I'm not really sure if any allegro code is supposed to
get executed after its process gets the kill signal - so the lock
shouldn't matter, but i don't know.
--
Elias Pschernig