Summary:ASTERISK-18757: mohmp3 crashes
Reporter:Paul Mathews (p_mathews)Labels:
Date Opened:2011-10-26 17:03:46Date Closed:2012-07-26 16:27:57
Status:Closed/CompleteComponents:Addons/format_mp3 Resources/res_musiconhold
Versions: Frequency of
Environment:centos 6Attachments:( 0) backtrace.txt
Description:Asterisk segfaults while playing music on hold. I have not been able to reproduce the problem while using streamed hold music from mpg123.

#0  0x00007f350a337739 in mp3_read (s=0x7f347800ace8, whennext=0x7f34f1c1094c) at format_mp3.c:215
#1  0x00000000004c6199 in read_frame (s=0x7f347800ace8, whennext=0x7f34f1c1094c) at file.c:709
#2  0x00000000004c6229 in ast_readframe (s=0x7f347800ace8) at file.c:730
#3  0x00007f350a12d6d7 in moh_files_readframe (chan=0x7f34d8024c28) at res_musiconhold.c:361
#4  0x00007f350a12d787 in moh_files_generator (chan=0x7f34d8024c28, data=0x7f3478003f60, len=0, samples=160) at res_musiconhold.c:379
#5  0x000000000046c342 in generator_force (data=0x7f34d8024c28) at channel.c:3061
#6  0x000000000046e17b in __ast_read (chan=0x7f34d8024c28, dropaudio=0) at channel.c:3815
#7  0x00000000004702e3 in ast_read (chan=0x7f34d8024c28) at channel.c:4252
#8  0x000000000046d571 in ast_waitfordigit_full (c=0x7f34d8024c28, ms=77, audiofd=-1, cmdfd=-1) at channel.c:3542
#9  0x000000000046d1f4 in ast_waitfordigit (c=0x7f34d8024c28, ms=1000) at channel.c:3475
#10 0x00007f34fcf25411 in wait_our_turn (qe=0x7f34f1c11000, ringing=0, reason=0x7f34f1c121f8) at app_queue.c:3994
#11 0x00007f34fcf2dd38 in queue_exec (chan=0x7f34d8024c28, data=0x7f34f1c14470 "8903,t,,") at app_queue.c:5950
#12 0x00000000004fd120 in pbx_exec (c=0x7f34d8024c28, app=0xf1d3870, data=0x7f34f1c14470 "8903,t,,") at pbx.c:1421
#13 0x0000000000506c03 in pbx_extension_helper (c=0x7f34d8024c28, con=0x0, context=0x7f34d8025180 "from-internal", exten=0x7f34d80251d0 "8903", priority=10, label=0x0, callerid=0x7f3478001fb0 "326", action=E_SPAWN,
   found=0x7f34f1c16b60, combined_find_spawn=1) at pbx.c:4119
#14 0x000000000050888b in ast_spawn_extension (c=0x7f34d8024c28, context=0x7f34d8025180 "from-internal", exten=0x7f34d80251d0 "8903", priority=10, callerid=0x7f3478001fb0 "326", found=0x7f34f1c16b60, combined_find_spawn=1) at pbx.c:4744
#15 0x00000000005092d9 in __ast_pbx_run (c=0x7f34d8024c28, args=0x0) at pbx.c:4842
#16 0x000000000050af55 in pbx_thread (data=0x7f34d8024c28) at pbx.c:5177
#17 0x0000000000560bbd in dummy_start (data=0x7f34d802a0d0) at utils.c:1004
#18 0x00007f353a4c87e1 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f353b1ae8ed in clone () from /lib64/libc.so.6
Comments:By: Leif Madsen (lmadsen) 2011-11-01 07:43:18.093-0500

Thank you for your bug report. In order to move your issue forward, we require a backtrace[1] from the core file produced after the crash. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

make install

After enabling, reproduce the crash, and then execute the backtrace[1] instructions. When complete, attach that file to this issue report.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

By: Leif Madsen (lmadsen) 2011-11-01 07:43:43.249-0500

Additionally, it is recommended that you use native MOH and not use mp3's for MOH.

By: Paul Mathews (p_mathews) 2011-11-02 16:29:55.105-0500

Backtrace attached.

By: Leif Madsen (lmadsen) 2011-11-03 14:08:53.592-0500

OK acknowledging the issue, but you can probably avoid the crashes in the meantime if you convert your MP3s to a native format can understand.

By: Leif Madsen (lmadsen) 2011-11-03 14:09:30.231-0500

My guess is the problem is in format_mp3.

By: Matt Jordan (mjordan) 2012-07-26 16:27:57.118-0500

Duplicate of ASTERISK-19761, now fixed.