Re: [ecasound] Re: Bug#317900: ecasound freezes the computer under root with double buffering

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Tue Jul 12 2005 - 23:05:09 EEST

Hello all,

On Wed, 13 Jul 2005, Junichi Uekawa wrote:

> It sounds possible, considering the privilege it is running under,
> but nasty.
[...]
>> If ecasound runs with double buffering and under root, almost any kind
>> of termination of the process causes complete computer freeze:
>> /usr/bin/ecasound -b:4096 -z:db,661500 -r:99 -f:16,2,44100,i -i
>> alsahw,0,0 -o stdout

couple of notes:
- -r:99 is very extreme and dangerous, please use the default "-r"
   or just a lower value like "-r:40"
- -z:db,661500 is a _lot_ of buffering (15secs of audio at 44.1kHz),
    but might be needed on some machines

And then a couple of questions:

- which version of ecasound? (if old 2.0.x release, please upgrade
   to newer 2.2 (in sarge) and retry the tests, 2.0.x is really old
   and not supported anymore)
- which soundcard...? the problem description sounds like a driver
   problem (running with -r, i.e. SCHED_FIFO scheduling, can turn
   a minor driver bug into a system-freeze type of problem)

I've tested the above configuration myself on multiple machines and no
freezes so far, no matter what I try.

>> It exits properly, if I stop it as follows:
>> killall -STOP ecasound; killall -KILL ecasound
>>
>> Another way to stop ecasound safely is to run it with tee like this:
>> /usr/bin/ecasound -b:4096 -z:db,661500 -r:99 -f:16,2,44100,i -i
>> alsahw,0,0 -o stdout | tee audio.raw > /dev/null

Hmm, this is interesting. The signal handling has been changed
a few times since 2.0.x -- if you are running 2.0.x, that might
explain the problem. Otherwise further investigation is definitely
needed. The bad news is that tracking down SCHED_FIFO-triggere problems
can be very difficult.. :(

>> Looks like ecasound does not tolerate any signal when it is in system
>> call (read kernel mode) of any kind.

This should not be the case. The signal handler is designed to be
real-time safe, and should be able to cleanly shutdown the engine in all
possible cases. But, but, obviously something goes badly wrong in your
case...

-- 
  http://www.eca.cx
  Audio software for Linux!
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Jul 13 00:15:17 2005

This archive was generated by hypermail 2.1.8 : Wed Jul 13 2005 - 00:15:18 EEST