Re: Bug report: strange crash

Kai Vehmanen <[email protected]>
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <[email protected]>
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:

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

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

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

==> 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 
away.

------------------------------------------------------------------------------
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!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Ecasound-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.