[Home]

Summary:ASTERISK-13403: conference calling crashes Asterisk
Reporter:Hugh Messenger (cheesegrits)Labels:
Date Opened:2009-01-19 22:50:38.000-0600Date Closed:2009-01-22 10:54:23.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_meetme
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090122__bug14282.diff.txt
( 1) bt.txt
Description:I have a reproducible situation which crashes Asterisk. Conference calls can be started, but as soon as anyone leaves the conference, or anything else happens to initiate a soft hangup, it segmentation faults.

It's happening on both my test servers, running the following config:

Centos 5.2 (ISO's from centos.org, then fully yum updated)
Asterisk 1.6.0.3 AND latest SVN code (rev# 169479)
FreePBX 2.5.1
DAHDI 2.1.0.3 (installed from dahdi-linux-complete)

Everything is pretty much vanilla. A couple of extensions on each box, and an IAX2 trunk between the two. One VoIP line on one of the boxes as the main inbound/outbound route.

No telephony hardware, so it's using dahdi_dummy for timing. I've confirmed with dahdi_test that this seems to be functioning correctly, and lsmod and modprobe both look good.

I've tried doing a soft hangup from the CLI on regular calls, but that works fine, no errors. It only seems to be conference calls which have this issue.

This happens with any type of call in the conference, i.e. local extension, coming in thru the IAX2 trunk, or inbound routes.


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

Gdb on the core dump shows the stack thusly:

(gdb) backtrace
#0 0x003ba3a0 in pthread_mutex_lock () from /lib/libpthread.so.0
#1 0x003456c6 in pthread_mutex_lock () from /lib/libc.so.6
#2 0x0808b039 in ast_softhangup (chan=0x0, cause=32)
at /usr/local/src/asterisk/asterisk-1.6.0.3/include/asterisk/lock.h:770
#3 0x00a6bb5d in conf_free (conf=0x881dbf8) at app_meetme.c:1375
#4 0x00a7bf55 in conf_exec (chan=0x881e400, data=0xb7899ef8)
at app_meetme.c:1499
ASTERISK-1 0x080e6d64 in pbx_exec (c=0x881e400, app=0x87f67f0, data=0xb7899ef8)
at pbx.c:944
ASTERISK-2 0x080f294d in pbx_extension_helper (c=0x881e400, con=0x0,
context=0x881e588 "from-internal", exten=0x881e5d8 "STARTMEETME",
priority=1, label=0x0, callerid=0x8812c18 "301", action=E_SPAWN,
found=0xb789c338, combined_find_spawn=1) at pbx.c:3113
ASTERISK-3 0x080f4f46 in __ast_pbx_run (c=0x881e400) at pbx.c:3606
ASTERISK-4 0x080f679e in pbx_thread (data=0x881e400) at pbx.c:3956
ASTERISK-5 0x081308ab in dummy_start (data=0x8813198) at utils.c:917
ASTERISK-6 0x003b845b in start_thread () from /lib/libpthread.so.0
ASTERISK-7 0x00338e5e in clone () from /lib/libc.so.6
(gdb)
Comments:By: Mark Michelson (mmichelson) 2009-01-20 16:58:57.000-0600

When you start a new conference call, do you see a warning on the console that says "No channel type registered for 'DAHDI'" ? If you are seeing that, then what's the output of "module show like chan_dahdi.so" ?

My thinking here is that something has caused chan_dahdi.so to not load. I suspect that it did not load due to some error that occurred on startup, possibly when reading a configuration file. If chan_dahdi.so isn't loaded, try issuing the command "module load chan_dahdi.so" . If it fails, share what warning or error messages showed up on the console when you tried.

By: Mark Michelson (mmichelson) 2009-01-20 17:19:48.000-0600

I just deleted that last note I added. I meant to put it on a different issue and messed up.

By: Hugh Messenger (cheesegrits) 2009-01-21 11:47:43.000-0600

No warnings on the console, and chan_dahdi seems to be loaded OK:

pbx*CLI> module show like chan_dahdi.so
Module                         Description                              Use Count
chan_dahdi.so                  DAHDI Telephony                          0      
1 modules loaded

I'm uploading a more detailed stack / thread trace, see if that helps any.

By: Mark Michelson (mmichelson) 2009-01-21 12:39:50.000-0600

All right, so the problem is clearly a NULL pointer dereference. The underlying reason for the NULL channel isn't what I thought it was, so I'll need to investigate further to see what it was. Thanks for the upload.

By: Hugh Messenger (cheesegrits) 2009-01-21 12:57:12.000-0600

I can arrange ssh and SIP access to either of the boxes if you need it.

Thanks for your efforts so far.  If you need anything else, I'll be on #asterisk-bugs and #voipcoop for most of the day.  And of course monitoring this report.

By: Hugh Messenger (cheesegrits) 2009-01-21 16:24:42.000-0600

Just to confirm what you asked on IRC, I'm 99.99% sure that bt is from a vanilla 1.6.0.3.  Just let me know if you want one using latest SVN.  I've been flip-flopping between the two, testing things out.

By: Jonathan Hunter (jmhunter) 2009-01-21 17:19:00.000-0600

I am experiencing what could be the same issue.

I have one additional piece of information to add. For me, Asterisk crashes  only if I include the "I" flag to app_meetme.

extensions.conf:
exten => 5971,n,Meetme(,Is)    <---- will crash when I hang up
or
exten => 5971,n,Meetme(,is)    <---- will not crash when I hang up

Interestingly, the "i" flag does not behave as expected - I do not get prompted for my name. But, at least Asterisk does not crash.

I, too, have no dahdi hardware on this server - timing is from dahdi_dummy. Incoming calls are via SIP.

I am running stock 1.6.0.3:
*CLI> core show version
Asterisk 1.6.0.3 built by root @ myhostname on a i686 running Linux on 2009-01-17 13:58:02 UTC

(gdb) backtrace
#0  0x008fdb7a in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x002087a7 in pthread_mutex_lock () from /lib/libc.so.6
#2  0x08089d69 in ast_softhangup (chan=0x0, cause=32)
   at /usr/src/asterisk-1.6.0.3/include/asterisk/lock.h:770
#3  0x00d66f37 in conf_free (conf=0x907a560) at app_meetme.c:1375
#4  0x00d73e59 in conf_exec (chan=0x9078e78, data=0xb7cdffc8) at app_meetme.c:1499
ASTERISK-1  0x080dc3ea in pbx_exec (c=0x9078e78, app=0x905c5f8, data=0xb7cdffc8) at pbx.c:944
ASTERISK-2  0x080eb7ef in pbx_extension_helper (c=0x9078e78, con=0x0, context=0x9079000 "default-incoming",
   exten=0x9079050 "5971", priority=3, label=0x0, callerid=0x9079348 "5023", action=E_SPAWN,
   found=0xb7ce23d8, combined_find_spawn=1) at pbx.c:3113
ASTERISK-3  0x080edfb5 in __ast_pbx_run (c=0x9078e78) at pbx.c:3606
ASTERISK-4  0x080ef5be in pbx_thread (data=0x9078e78) at pbx.c:3956
ASTERISK-5  0x08124d19 in dummy_start (data=0x90798f8) at utils.c:917
ASTERISK-6 0x008fcbd4 in start_thread () from /lib/libpthread.so.0
ASTERISK-7 0x001fc4fe in clone () from /lib/libc.so.6

By: Hugh Messenger (cheesegrits) 2009-01-21 17:36:55.000-0600

Ah HAAA!  Confirmed - if I turn off "User Join/Leave" in FreePBX, no crash.  So I assume that FreepBX option adds/removes the "I" flag to MeetMe.

Well at least I now have functioning conferences, and I can live without username prompts / announcements for now.

Thank jmhunter!

By: Sean Bright (seanbright) 2009-01-22 10:01:06.000-0600

I've just uploaded a patch which I am thinking is not the correct fix but it should stop the crash from happening.

By: Joshua C. Colp (jcolp) 2009-01-22 10:08:19.000-0600

Can someone who has this issue see if they do not have a chan_dahdi.conf configuration file in /etc/asterisk ? I have a suspicion I see what the issue is.

By: Hugh Messenger (cheesegrits) 2009-01-22 10:17:20.000-0600

Indeed I do not have a chan_dahdi.conf

By: Joshua C. Colp (jcolp) 2009-01-22 10:19:04.000-0600

If you create a blank chan_dahdi.conf does it then work fine?

By: Digium Subversion (svnbot) 2009-01-22 10:50:32.000-0600

Repository: asterisk
Revision: 170147

U   branches/1.4/apps/app_meetme.c

------------------------------------------------------------------------
r170147 | file | 2009-01-22 10:50:31 -0600 (Thu, 22 Jan 2009) | 4 lines

If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
(closes issue ASTERISK-13403)
Reported by: cheesegrits

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

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

By: Digium Subversion (svnbot) 2009-01-22 10:51:59.000-0600

Repository: asterisk
Revision: 170148

_U  trunk/
U   trunk/apps/app_meetme.c

------------------------------------------------------------------------
r170148 | file | 2009-01-22 10:51:59 -0600 (Thu, 22 Jan 2009) | 11 lines

Merged revisions 170147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines
 
 If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
 (closes issue ASTERISK-13403)
 Reported by: cheesegrits
........

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

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

By: Digium Subversion (svnbot) 2009-01-22 10:52:49.000-0600

Repository: asterisk
Revision: 170149

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_meetme.c

------------------------------------------------------------------------
r170149 | file | 2009-01-22 10:52:49 -0600 (Thu, 22 Jan 2009) | 18 lines

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

................
 r170148 | file | 2009-01-22 12:52:21 -0400 (Thu, 22 Jan 2009) | 11 lines
 
 Merged revisions 170147 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines
   
   If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
   (closes issue ASTERISK-13403)
   Reported by: cheesegrits
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-01-22 10:54:22.000-0600

Repository: asterisk
Revision: 170150

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_meetme.c

------------------------------------------------------------------------
r170150 | file | 2009-01-22 10:54:22 -0600 (Thu, 22 Jan 2009) | 18 lines

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

................
 r170148 | file | 2009-01-22 12:52:21 -0400 (Thu, 22 Jan 2009) | 11 lines
 
 Merged revisions 170147 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines
   
   If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
   (closes issue ASTERISK-13403)
   Reported by: cheesegrits
 ........
................

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

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