Re: [ecasound] Bug report: strange crash

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Mon Apr 09 2012 - 23:52:08 EEST


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:

c-select 9
cop-add -ea:100

The design limitations come even more apparent when one is a bit more

c-select 9
cop-add -ea:100
cop-add -ea:100
cop-add -ea:100
cop-add -ea:100
cop-add -ea:100
cop-add -ea:100

==> epic failure. :(

This needs to be fixed of course, but a not a trivial task I'm afraid. One
practical workaround is to explicitly stop and start the engine from the
app, before doing non-realtime-safe edits like cop-add/cop-remove. For
Nama specifically, adding real-time safe "cop-bypass" would be a nice
alternative as well.

> Perhaps most interestingly, I could not reproduce the segfault with the
> debugging option turned on which seems odd. Instead, with the debugging

To trigger the bug, you need to be able to queue commands when engine is
still processing the previous cmds (e.g. starting up disk i/o server which
may take time), so it figures why enabling debugging makes the bug go

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 00:15:03 2012

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