[Home]

Summary:ASTERISK-16010: startup fails with libspeex.so.1.2.0
Reporter:Sean Darcy (seandarcy)Labels:
Date Opened:2010-04-23 20:01:38Date Closed:2010-06-02 12:31:53
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Codecs/codec_speex
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I'm upgrading from 1.6.1.18 to 1.6.2.6. configure, make, make menuselect, and make install all work without error. I've rm'd /usr/lib/asterisk/modules. On startup 1.6.2.6 (and 1.6.2.7-rc2) hangs here:

   -- CODEC SPEEX: Setting preprocessor Dereverb Level to 0.300000
 == Registered translator 'speextolin' from format speex to slin, cost 1

I can asterisk -r, but it's just hung. You can't even shut it down:

CLI> core stop now
No such command 'core stop now'

Deselecting speex func and codec in menuselect makes it work.

****** ADDITIONAL INFORMATION ******

Maybe asterisk someplace began requiring a newer speex than the one I have (this is an old ubuntu feisty box)? If so, a check in configure may be appropriate.  
Comments:By: Paul Belanger (pabelanger) 2010-04-23 20:37:35

Sounds like a lock (see below)
---
Debugging deadlocks:

Please select DEBUG_THREADS and DONT_OPTIMIZE in the Compiler Flags section of menuselect. Recompile and install Asterisk (i.e. make install)

This will then give you the console command:

core show locks

When the symptoms of the deadlock present themselves again, please provide output of the deadlock via:

# asterisk -rx \"core show locks\" | tee /tmp/core-show-locks.txt

# gdb -se \"asterisk\" <pid of asterisk> | tee /tmp/backtrace.txt

gdb> bt
gdb> bt full
gdb> thread apply all bt

Then attach the core-show-locks.txt and backtrace.txt files to this issue. Thanks!

By: Leif Madsen (lmadsen) 2010-04-26 12:56:17

Set to feedback while we await output requested by pabelanger.

By: Sean Darcy (seandarcy) 2010-04-30 17:31:44

Well I didn't do that,but I now know what is the problem.

codecs.conf for speex:

the deadlock will occur if preproccessing is set to true AND pp_vad is set to true.

This works with 1.6.2.7-rc3:

;enable preprocessor [true / false]
; allows dsp functionality below but incurs CPU overhead
preprocess => true

; preproc voice activity detection [true / false]
; more advanced equivalent of DTX, based on voice frequencies
pp_vad => false

I've no clue why pp_vad  worked with 1.16.1.17, but not 1.6.2.7-rc3. In any event, I suggest pp_vad be hard-wired to false.

By: Paul Belanger (pabelanger) 2010-05-01 11:32:32

Without a backtrace showing the deadlock, we cannot triage this issue further.  If you can, please upload one after you reproduced the issue.

By: Sean Darcy (seandarcy) 2010-05-01 15:22:43

It works for me sufficiently. You can't replicate this? It works for you on 1.6.2.[67]?

This is a production server, so running a backtrace when it now works is highly unlikely. I'll ask though.

By: Leif Madsen (lmadsen) 2010-05-04 15:32:20

I'm going to acknowledge this for now. If someone has the ability to reproduce this and upload a backtrace that would be ideal, but I understand the workaround has allowed the production server to run unabated.

By: Digium Subversion (svnbot) 2010-06-02 12:29:36

Repository: asterisk
Revision: 267065

U   trunk/include/asterisk/slin.h

------------------------------------------------------------------------
r267065 | jpeeler | 2010-06-02 12:29:35 -0500 (Wed, 02 Jun 2010) | 12 lines

Fix infinite loop when loading codec speex

This changes the sample slinear frame data to contain non-zero data so that
translation calculations for speex works when preprocessing and VAD is turned
on. The encoder expects samples to be returned, but when attempted with the
mentioned two options and silent sample frames everything was discarded.

(closes issue ASTERISK-16010)
Reported by: seandarcy

Review: https://reviewboard.asterisk.org/r/682/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=267065

By: Digium Subversion (svnbot) 2010-06-02 12:31:52

Repository: asterisk
Revision: 267073

_U  branches/1.6.2/
U   branches/1.6.2/include/asterisk/slin.h

------------------------------------------------------------------------
r267073 | jpeeler | 2010-06-02 12:31:52 -0500 (Wed, 02 Jun 2010) | 19 lines

Merged revisions 267065 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r267065 | jpeeler | 2010-06-02 12:29:35 -0500 (Wed, 02 Jun 2010) | 12 lines
 
 Fix infinite loop when loading codec speex
 
 This changes the sample slinear frame data to contain non-zero data so that
 translation calculations for speex works when preprocessing and VAD is turned
 on. The encoder expects samples to be returned, but when attempted with the
 mentioned two options and silent sample frames everything was discarded.
 
 (closes issue ASTERISK-16010)
 Reported by: seandarcy
 
 Review: https://reviewboard.asterisk.org/r/682/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=267073