freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

Playing a short mp3 to a conference member causes FreeSWITCH to crash

Open jerry2013 opened this issue 3 years ago • 3 comments

Describe the bug Playing a short mp3 to a conference member causes FreeSWITCH to crash.

To Reproduce Steps to reproduce the behavior:

  1. Dial into a conference via PSTN
  2. conference <name> play 'https://(nohead=true)something.s3.amazonaws.com/1sec.mp3 <id>
  3. FreeSWITCH crashes

mp3 file: 1sec.zip

Expected behavior Don't crash.

Package version or git hash

  • FreeSWITCH version: 1.10.7-release-19-883d2cb662~64bit (-release-19-883d2cb662 64bit)

backtrace from core file Full backtrace from the core file attached backtrace.log

jerry2013 avatar Apr 28 '22 15:04 jerry2013

I can confirm this behaviour with WAV files (but not all WAV files...).

The scenario where I can reproduce:

  • as originally posted, playback in conference with HTTAPI either on CLI or as a configured join event
  • FreeSWITCH segfaults, usually before playback but sometimes after playback succeeds
  • There is no error in console, loglevel 7 and httapi debug_on set

Interestingly, the following works properly:

  • playback the exact same file that caused the crash but from the cache location on file system
  • playback other than to the conference (uuid_broadcast) the same HTTP file

I am running 1.10.7 git~20211103T111237Z~06509a7527~64bit

The file in question:

Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:00:02.66 = 117209 samples = 199.335 CDDA sectors
File Size      : 469k
Bit Rate       : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

manticode avatar Jul 27 '22 16:07 manticode

I have some progress on this. This only occurs, in the above scenario, where the file is stereo. If I take the exact same file but in mono then this works.

@jerry2013 might be worth reencoding your file in mono and see if that helps?

manticode avatar Jul 28 '22 12:07 manticode

Thanks @manticode for checking and I'm quite surprised that mono vs stereo makes a difference.

I worked around the crash by not using short audio file and switching to silence/tone stream instead - that works for my purpose.

I do still hope signalwire would fix the crashing bugs soon.

jerry2013 avatar Jul 28 '22 13:07 jerry2013