Re: [ecasound] Bug report: strange crash

From: S. Massy <lists@email-addr-hidden>
Date: Tue Apr 10 2012 - 01:36:41 EEST

On Mon, Apr 09, 2012 at 11:52:08PM +0300, Kai Vehmanen wrote:
> Hi,
> On Tue, 13 Mar 2012, S. Massy wrote:
> >A feature recently introduced in nama (single effect bypass) has brought
> >up some strange behaviour in ecasound. When the effect being bypassed is
> >removed, or around that event, ecasound segfaults. Here is the
> I think I've figured out what's going wrong:
> - cop-remove (and cop-add), which are used to implement
> single effect bypass in Nama, are not real-time safe calls;
> see full list in ecasound-iam(1)
> - when they are issues while engine is running, ecasound
> implements an automatic stop-reconfigure-restart process
> ... now the bad news is that this logic starts to fail when fed a
> lot of commands (from an app, versus a live person typing commands
> in interactive mode). Easiest way to reproduce is to take your
> example chainsetup, start it, and then copy'n'paste the following
> into ecasound's shell:
Right, so what we did in the mean-time is stop the engine to do the
bypass and restart afterwards: it gives a hickup on the audio, but at
least it works. An interesting aspect, though, is that there still seems
to be some timing issue, even when stopping, because cop-remove'ing to
close to stopping would still occasionally trigger the bug. So what we
do now is:
- stop
- sleep some
- perform the operation
- sleep some more
- start

Right now, we're sleeping about 0.02s before and 0.01s after, which we
very heuristically determined to be safe values.

Joel is exploring the possibility of implementing timestamped logging in
nama, which would help us track these things down more quickly. In the
meantime, perhaps we should have a look at the non-rt-safe commands and
make sure they're wrapped in the stop_do_start logic.

Thanks for looking at this.


For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
Ecasound-list mailing list
Received on Tue Apr 10 04:15:02 2012

This archive was generated by hypermail 2.1.8 : Tue Apr 10 2012 - 04:15:02 EEST