Re: [linux-audio-dev] SCHED_FIFO machine stalls

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] SCHED_FIFO machine stalls
From: Andy Lo A Foe (andy_AT_alsa-project.org)
Date: pe joulu  10 1999 - 16:48:55 EST


On Fri, 10 Dec 1999, Alexander [iso-8859-1] König wrote:

> Assuming it's a deadlock - does anybody know a good strategy to detect
> deadlocks? Errm, random deadlocks btw - stepping through it with a

AFAIK there is no good strategy other than designing your code to be
deadlock-free *grin*
The way to go is to make sure you got rid of all deadlocks before giving
the code SCHED_FIFO priority, this is kinda hard if the deadlocks only
occur under special (scheduling) circumstances, but hey, who said it was
easy? :)

> debugger wont help here - and btw I never managed to get gdb debug a
> pthreaded program properly.

Something that really helped me when debugging alsaplayer real-time
capabilities was the Sysreq keys. Whenever a deadlock occured in the
tight soundcard loop (which had SCHED_FIFO prior) I killed off the whole X
shebang with alt-shift-sysreq-k. It worked most of the time, allowed me to
recover without reboot/fsck. YMMV though...

Good luck,
Andy

PS. You can always try using the AlsaNode/AlsaSubscriber classes from
alsaplayer for your output needs. Gives you real-time capabilities coupled
to a straight forward interface (IMHO)

 


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST