[Home]

Summary:ASTERISK-19188: asterisk crashes if there no confbridge-join file
Reporter:Dmitry Melekhov (slesru)Labels:
Date Opened:2012-01-11 10:55:27.000-0600Date Closed:2012-02-13 10:43:05.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_bridge
Versions:10.0.0 Frequency of
Occurrence
Constant
Related
Issues:
causesASTERISK-19899 Confbridge user number announcement segfaults for number > 2
Environment:Centos 5.7/x86Attachments:( 0) ASTERISK-19188.diff
Description:If file confbridge-join is not installed then when user joins conference asterisk segfaults.
always reproducable.
Not big problem, but not perfect ;-) just because warning is generated, not error.
Do you need backtrace?

Thank you!
Comments:By: Richard Mudgett (rmudgett) 2012-01-11 12:07:25.168-0600

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

Yes a backtrace is usually helpful for segfault issues. :)

By: Dmitry Melekhov (slesru) 2012-01-12 01:32:42.637-0600

Hello!

Unfortunately can't reproduce crash today (strange , but true), all I get today is warning on console:

[Jan 12 11:02:44] WARNING[19464]: file.c:1013 ast_streamfile: Unable to open confbridge-leave (format (slin)): No such file or directory
[Jan 12 11:02:44] WARNING[19464]: channel.c:2854 ast_hangup: Hard hangup called by thread -1265738864 on Bridge/0x9734588-output, while fd is blocked by thread -1259328624 in procedure ast_waitfor_nandfds!  Expect a failure


If file is in place, there is no such warning...


By: Matt Jordan (mjordan) 2012-01-12 08:30:48.187-0600

Dmitry - we'll keep this issue open for a bit.  If you do reproduce it, please attach the backtrace.  Thanks!

By: Dmitry Melekhov (slesru) 2012-01-13 21:47:37.619-0600

Hello!

Unfortunately, still can't reproduce, but this
[Jan 14 07:36:16] WARNING[15810]: channel.c:2854 ast_hangup: Hard hangup called by thread -1251562608 on Bridge/0xa51d068-output, while fd is blocked by thread -1253037168 in procedure ast_waitfor_nandfds!  Expect a failure

appears only if there is no confbridge-leave.gsm file.

So, I guess, this is almost the same problem.
I think it will be good if developer look into code :-)


Thank you!


By: Joshua C. Colp (jcolp) 2012-02-01 12:53:12.668-0600

I am attaching a change which improves things by not even trying to do playback at all within confbridge if the file does not exist. I think this is secondary to your issue though and may not actually be related, which is why I am uploading it here instead of putting it in. The log message you have provided indicates that the channel used to play into the conference is actually being used elsewhere, which should not be possible at the point of tearing down the conference bridge. If this still occurs after applying my patch can you please provide the complete console log when this occurs with debug (logger.conf - send it to console or a file, and type core set debug 9 on the console). Thank you.

By: Dmitry Melekhov (slesru) 2012-02-09 08:41:53.123-0600

Hello!

Sorry for late replay- I were on vacations, then several days after vacation with almost no time :-(

Thank you!

Patch solves problem.


By: Joshua C. Colp (jcolp) 2012-02-13 10:43:05.108-0600

Put into 10 as of revision 354938 and trunk as of revision 354939.

By: Florian Gilcher (skade) 2012-05-22 17:29:23.073-0500

This patch breaks the confbridge for more than 2 users if user numbers are announced.

play_sound_number calls play_sound_helper with (confbridge, NULL, say_number). This means that ast_fileexists is called with (NULL, NULL, NULL), leading to a crash. Backtrace:

#0  0x00007f05b0f0cb52 in strlen () from /lib64/libc.so.6
#1  0x00000000004bfc09 in ast_fileexists (filename=0x0, fmt=0x0, preflang=0x57118f "") at file.c:988
#2  0x00007f05a9b91d1a in play_sound_helper (conference_bridge=0x146e8e8, filename=0x0, say_number=2) at app_confbridge.c:1147
#3  0x00007f05a9b92132 in play_sound_number (say_number=<optimized out>, conference_bridge=<optimized out>) at app_confbridge.c:1205
#4  announce_user_count (conference_bridge=0x146e8e8, conference_bridge_user=0x0) at app_confbridge.c:615
#5  0x00007f05a9b9423f in post_join_unmarked (conference_bridge_user=<optimized out>, conference_bridge=<optimized out>) at app_confbridge.c:847
#6  join_conference_bridge (conference_bridge_user=<optimized out>, name=0x7f0594d0c260 "1234") at app_confbridge.c:1004
#7  confbridge_exec (chan=0x1512fe8, data=<optimized out>) at app_confbridge.c:1421
#8  0x0000000000500aeb in pbx_exec (c=0x1512fe8, app=0x130c3a0, data=0x7f0594d12770 "1234") at pbx.c:1551
#9  0x000000000050e480 in pbx_extension_helper (c=0x1512fe8, con=<optimized out>, context=0x15138b8 "default", exten=0x1513908 "5000",
   priority=<optimized out>, label=<optimized out>, callerid=0x14a2b00 "7591FA62-4C40-5A68-8D93-7685BDDD7BF6", action=E_SPAWN, found=0x7f0594d14dec,
   combined_find_spawn=1) at pbx.c:4390
#10 0x0000000000510f75 in ast_spawn_extension (found=<optimized out>, callerid=<optimized out>, priority=<optimized out>, exten=<optimized out>,
   context=<optimized out>, c=<optimized out>, combined_find_spawn=<optimized out>) at pbx.c:5053
#11 __ast_pbx_run (c=0x1512fe8, args=<optimized out>) at pbx.c:5146
#12 0x00000000005128ab in pbx_thread (data=0x0) at pbx.c:5486
#13 0x000000000055330b in dummy_start (data=<optimized out>) at utils.c:1010
#14 0x00007f05afff98c4 in start_thread () from /lib64/libpthread.so.0
#15 0x00007f05b0f611dd in clone () from /lib64/libc.so.6