Segfaults are always bugs, and bugs always get reported to Jira -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Sebastian Kemper Sent: Tuesday, December 6, 2016 4:44 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Segfault when running tone2wav Hello list, I was testing tone2wav and it basically just segfaulted. I put the following line into file itu.tone: v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440) Then I ran: # tone2wav itu.wav itu.tone File: itu.wav generated... Please support: FreeSWITCH http://www.freeswitch.org ClueCon http://www.cluecon.com Segmentation fault # echo $? 139 # The WAV file is rather small (44 Bytes) and there's nothing audible. In dmesg I see: [ 9511.288341] tone2wav[28766]: segfault at 8 ip 00007f5566bc5fe5 sp 00007fff7b662d40 error 4 in libfreeswitch.so.1.0.0[7f556680a000+4a7000] I was initially testing tone2wav on a mips router with musl toolchain. Then I went to x86_64 with musl and had a segfault as well. Then I tried on a x86_64 laptop with glibc toolchain and it segfaulted also. I recompiled FS 1.6.13 with debug enabled and got the backtrace below. Should I file a JIRA for this? # gdb tone2wav GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.gentoo.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from tone2wav...Reading symbols from /usr/lib64/debug//usr/bin/tone2wav.debug...done. done. (gdb) run itu.wav itu.tone Starting program: /usr/bin/tone2wav itu.wav itu.tone [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff7f0f700 (LWP 28707)] [New Thread 0x7ffff410b700 (LWP 28710)] File: itu.wav generated... Please support: FreeSWITCH http://www.freeswitch.org ClueCon http://www.cluecon.com [Thread 0x7ffff410b700 (LWP 28710) exited] [Thread 0x7ffff7f0f700 (LWP 28707) exited] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7ab5fe5 in apr_pool_destroy (pool=0x0) at memory/unix/apr_pools.c:748 748 while (pool->child) (gdb) set logging on Copying output to gdb.txt. (gdb) thread apply all backtrace full Thread 1 (Thread 0x7ffff7fd7780 (LWP 28703)): #0 0x00007ffff7ab5fe5 in apr_pool_destroy (pool=0x0) at memory/unix/apr_pools.c:748 active = 0x7ffff7db1ae8 <runtime+40> allocator = 0x0 #1 0x00007ffff777ead4 in switch_core_perform_destroy_memory_pool (pool=0x7ffff7db21e8 <video_globals+8>, file=0x7ffff7b08243 "src/switch_core_media.c", func=0x7ffff7b0d7f0 <__func__.42791> "switch_core_media_deinit", line=11051) at src/switch_core_memory.c:439 __PRETTY_FUNCTION__ = "switch_core_perform_destroy_memory_pool" #2 0x00007ffff77dfdd6 in switch_core_media_deinit () at src/switch_core_media.c:11051 __func__ = "switch_core_media_deinit" #3 0x00007ffff77b3b11 in switch_core_destroy () at src/switch_core.c:2962 event = 0x0 __func__ = "switch_core_destroy" #4 0x0000000000401343 in main (argc=3, argv=0x7fffffffe278) at src/tone2wav.c:175 ts = {TONES = {{freqs = {0 <repeats 18 times>}} <repeats 35 times>, {freqs = {941, 1477, 0 <repeats 16 times>}}, {freqs = { 0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, { freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {941, 1209, 0 <repeats 16 times>}}, {freqs = { 0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, { freqs = {0 <repeats 18 times>}}, {freqs = {941, 1336, 0 <repeats 16 times>}}, {freqs = {697, 1209, 0 <repeats 16 times>}}, {freqs = { 697, 1336, 0 <repeats 16 times>}}, {freqs = {697, 1477, 0 <repeats 16 times>}}, {freqs = {770, 1209, 0 <repeats 16 times>}}, { freqs = {770, 1336, 0 <repeats 16 times>}}, {freqs = {770, 1477, 0 <repeats 16 times>}}, {freqs = {859, 1209, 0 <repeats 16 times>}}, { freqs = {859, 1336, 0 <repeats 16 times>}}, {freqs = {859, 1477, 0 <repeats 16 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = { 0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, { freqs = {0 <repeats 18 times>}}, {freqs = {0 <repeats 18 times>}}, {freqs = {697, 1633, 0 <repeats 16 times>}}, {freqs = {770, 1633, 0 <repeats 16 times>}}, {freqs = {859, 1633, 0 <repeats 16 times>}}, {freqs = {941, 1633, 0 <repeats 16 times>}}, {freqs = { 0 <repeats 18 times>}} <repeats 58 times>}, channels = 1, rate = 8000, duration = 2000, wait = 400, tmp_duration = -1, tmp_wait = -1, loops = 0, LOOPS = 0, decay_factor = 1, decay_direction = 0, decay_step = 0, volume = -7, debug = 0, debug_stream = 0x0, user_data = 0x7fffffff9820, buffer = 0x0, datalen = 0, samples = 0, dynamic = 1024, handler = 0x400d46 <teletone_handler>} file_flags = 10 r = 0 rate = 8000 file = 0x7fffffffe523 "itu.wav" script = 0x7fffffffe52b "itu.tone" fh = {file_interface = 0x0, flags = 14, fd = 0x0, samples = 0, samplerate = 8000, native_rate = 8000, channels = 1, real_channels = 1, format = 65538, sections = 0, seekable = 0, sample_count = 0, speed = 0, memory_pool = 0x0, prebuf = 0, interval = 0, private_info = 0x7ff1a0, handler = 0x0, pos = 0, audio_buffer = 0x0, sp_audio_buffer = 0x0, thresh = 0, silence_hits = 0, offset_pos = 0, samples_in = 0, samples_out = 0, vol = 0, resampler = 0x0, buffer = 0x0, dbuf = 0x0, dbuflen = 0, pre_buffer = 0x0, pre_buffer_data = 0x0, pre_buffer_datalen = 0, file = 0x40158b "src/tone2wav.c", func = 0x40161c <__func__.17033> "main", line = 153, file_path = 0x7ff190 "itu.wav", spool_path = 0x0, prefix = 0x0, max_samples = 0, params = 0x0, cur_channels = 0, cur_samplerate = 0, stream_name = 0x0, modname = 0x0, mm = {samplerate = 44100, channels = 1, keyint = 60, ab = 128, vb = 0, vw = 0, vh = 0, cbr = 0, fps = 0, source_fps = 0, vbuf = 0, vprofile = SWITCH_VIDEO_PROFILE_BASELINE, vencspd = SWITCH_VIDEO_ENCODE_SPEED_DEFAULT, try_hardware_encoder = 1 '\001'}, flag_mutex = 0x7ff140, duration = 0, vpos = 0} err = 0x7ffff7b0f7e5 "" verbose = SWITCH_FALSE i = 1 c = 1 help = 0 __func__ = "main" quit Kind regards, Sebastian _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org