[Home]

Summary:ASTERISK-02937: Reload from CLI while using MeetMe causes crash
Reporter:Andrew Lindh (andrew)Labels:
Date Opened:2004-12-07 22:09:43.000-0600Date Closed:2011-06-07 14:00:40
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_meetme
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:A "reload" from the asterisk CLI causes an immediate crash (even if no conf changes have been made) when there are active MeetMe users.


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

(gdb) bt full
# 0  0x401e485a in poll () from /lib/libc.so.6
No symbol table info available.
# 1  0x0805d830 in ast_waitfor_nandfds (c=0xbd7fa504, n=1, fds=0xbd7fa4e4,
   nfds=1, exception=0x0, outfd=0xbd7fa490, ms=0xbd7fa48c) at channel.c:1011
start = {tv_sec = 0, tv_usec = 135741256}
end = {tv_sec = 2, tv_usec = 0}
pfds = (struct pollfd *) 0xbd7fa148
res = 1073891673
rms = -1
x = 1
y = 8
max = 4
spoint = 4
now = 0
whentohangup = 0
havewhen = 0
diff = 8
winner = (struct ast_channel *) 0x0
# 2  0x4071f777 in conf_run (chan=0x8169f68, conf=0x8180150, confflags=9312)
   at app_meetme.c:756
prev = (struct ast_conference *) 0x0
cur = (struct ast_conference *) 0x8180150
user = (struct ast_conf_user *) 0x81d0298
fd = 68
ztc = {chan = 16, confno = 1014, confmode = 516}
f = (struct ast_frame *) 0x81ed8f0
c = (struct ast_channel *) 0x0
fr = {frametype = 2, subclass = 64, datalen = 320, samples = 160,
 mallocd = 0, offset = 64, src = 0x0, data = 0xbd7fa264, delivery = {
   tv_sec = 0, tv_usec = 0}, prev = 0x0, next = 0x0}
outfd = -99999
ms = -1
nfds = 1
res = 320
flags = 2
retryzap = -7
origfd = 63
musiconhold = 0
firstpass = 1
origquiet = 64
ret = -1
x = 1
menu_active = 0
using_pseudo = 1
app = (struct ast_app *) 0x8180150
agifile = 0x40725550 "|\224"
agifiledefault = 0x4072338e "conf-background.agi"
meetmesecs = '\0' <repeats 29 times>
exitcontext = '\0' <repeats 79 times>
dtmf = 134865010
bi = {txbufpolicy = 0, rxbufpolicy = 0, numbufs = 4, bufsize = 160,
 readbufs = 0, writebufs = 0}
__buf = "(¾\016\b\000\000\000½\000\000\000\000Hm\002@8¾\016\b\201\016\r\bàû\177½ÿÿÿÿÌ_X@hC\030\bl¢\177½×\217\005\b(¾\016\bÙçW@\201\016\r\bÌ_X@", '\0' <repeats 319 times>
buf = 0xbd7fa264 ""
# 3  0x40721986 in conf_exec (chan=0x8169f68, data=0xbd7fd814)
   at app_meetme.c:1428
res = -1
u = (struct localuser *) 0x813ce50
confno = "page@netplex", '\0' <repeats 67 times>
allowretry = 0
retrycnt = 0
cnf = (struct ast_conference *) 0x8180150
confflags = 9312
dynamic = 1
empty = 0
empty_no_pin = 0
notdata = 0xbd7fd814 "page@netplex|tdqxA"
info = 0x0
inflags = 0xbd7fa529 "tdqxA"
inpin = 0x0
the_pin = '\0' <repeats 79 times>
# 4  0x0807864b in pbx_exec (c=0x8169f68, app=0x81d70b8, data=0xbd7fd814,
   newstack=1) at pbx.c:475
res = 135700328
saved_c_appl = 0x0
saved_c_data = 0x0
execute = (int (*)(struct ast_channel *,
   void *)) 0x40720c56 <conf_exec>
# 5  0x0807ac99 in pbx_extension_helper (c=0x8169f68, con=0x0,
   context=0x816a0b4 "netplex-inside2", exten=0x816a1a8 "400", priority=1,
   label=0x0, callerid=0x81d0c10 "311", action=1) at pbx.c:1271
e = (struct ast_exten *) 0x40813db0
app = (struct ast_app *) 0x81d70b8
sw = (struct ast_switch *) 0x0
data = 0x0
newstack = 1
res = 0
status = 5
incstack = {0x40814ac8 "netplex-inside2", 0x4080f208 "e911",
 0x810b3e8 "parkedcalls", 0x40816590 "netplex-ext",
 0x40812908 "netplex-intercom", 0x40811f18 "netplex-forcedmail",
 0x0 <repeats 11 times>, 0x4023eb60 "", 0x0 <repeats 18 times>,
 0x40245550 "`ô\022", 0xbd7ffbe0 "àû\177½", 0xbd7ff954 "\001",
 0xbd7ff8cc "lù\177½È!\t\bÈ\225\026\b\f£\026\b\037",
 0x401658f4 "\213]ü\211ì]Ã\220\220\220\220\220U\211å\215E\020\203ì\020\211D$\b\213E\f\211]üè\005cüÿ\201Ã8ü\r", 0xbd7ff904 "\"Andrew\" <311>",
 0x50 <Address 0x50 out of bounds>, 0x81695c8 "1102476276.0",
 0xbd7ffbe0 "àû\177½", 0xbd7ff954 "\001",
 0xbd7ff96c "Üú\177½3Ã\a\bh\237\026\b´ \026\b¨¡\026\b\001",
 0x80921c8 "\213E\b\213\200à\003", 0x81695c8 "1102476276.0",
 0x816a30c "1102476276.0", 0x1f <Address 0x1f out of bounds>,
 0x81ccc60 "Andrew", 0x81d0c10 "311", 0x40245fc0 "",
 0xbd7ff92c "¸p\035\b°=\201@",
 0x40187ce8 "\213Eð\203À\\\211EØ\213Uð\213MØ\213Rh\211Uä9Ê\017\204¥",
 0x40245fc0 "", 0x0, 0x100b3ff <Address 0x100b3ff out of bounds>,
 0x80daa04 "<unknown>", 0x646e4122 <Address 0x646e4122 out of bounds>,
 0x22776572 <Address 0x22776572 out of bounds>,
 0x31333c20 <Address 0x31333c20 out of bounds>,
 0x3e31 <Address 0x3e31 out of bounds>}
passdata = "page@netplex|tdqxA", '\0' <repeats 8173 times>
stacklen = 6
tmp = "\033[1;36;40mMeetMe\033[0;37;40m\0007;40m", '\0' <repeats 47 times>
tmp2 = "\033[1;35;40mSIP/311a-ef64\033[0;37;40m", '\0' <repeats 46 times>
tmp3 = "\033[1;35;40mpage@netplex|tdqxA\033[0;37;40m\0000m", '\0' <repeats 8150 times>
# 6  0x0807bf14 in ast_spawn_extension (c=0x8169f68,
   context=0x816a0b4 "netplex-inside2", exten=0x816a1a8 "400", priority=1,
   callerid=0x81d0c10 "311") at pbx.c:1814
No locals.
# 7  0x0807c333 in ast_pbx_run (c=0x8169f68) at pbx.c:1876
firstpass = 0
digit = 0 '\0'
exten = '\0' <repeats 255 times>
pos = 0
waittime = 0
res = 0
# 8  0x0807cece in pbx_thread (data=0x8169f68) at pbx.c:2059
c = (struct ast_channel *) 0x8169f68
# 9  0x40025e51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
# 10 0x401ed69a in clone () from /lib/libc.so.6
No symbol table info available.
Comments:By: Brian West (bkw918) 2004-12-07 23:18:01.000-0600

Something else is wrong here.. can you post your configs or a short config showing what you're doing?  Because I just reloaded 10 times while in a meetme on my box no biggie.

bkw

By: twisted (twisted) 2004-12-07 23:20:34.000-0600

with the same flags no less... I was the guinea pig for bkw's little experiment..

By: Andrew Lindh (andrew) 2004-12-08 00:36:26.000-0600

I've tried 4 different SIP phones (Polycom, Cisco, Grandstream, Seano) with the same results, so I'll say it's not the phone.

I did another test with just this in the extensions.conf (just the one context):
[netplex-inside]
exten => 444,1,MeetMe(1000,d)
exten => 444,2,Hangup()

sip.conf sets the phone's context to netplex-inside.

I also tried sip.conf with just the ONE phone friend in it.....same result.


It's very consistent....same problem every time...

By: Mark Spencer (markster) 2004-12-08 01:27:59.000-0600

Are you sure you did a make clean ; make install?  Might also be handy to rm -rf /usr/lib/asterisk/modules to be on the safe side.

By: Russell Bryant (russell) 2004-12-08 01:34:03.000-0600

Also, can you verify that your code is not patched in any way?

I would also like to note that app_meetme doesn't even have a reload function ...

By: Mark Spencer (markster) 2004-12-08 01:34:16.000-0600

I would like to add that this bug registers very highly on the bogosity meter given that meetme does not even have a reload function.  Given the recent mods to the ast_channel structure, this seems very likely a compile issue.

By: Andrew Lindh (andrew) 2004-12-08 07:27:08.000-0600

rm -fr asterisk zaptel libpri /usr/lib/asterisk/modules
cvs -d:pserver:anoncvs@cvs.digium.com:/usr/cvsroot co asterisk
cvs -d:pserver:anoncvs@cvs.digium.com:/usr/cvsroot co zaptel
cvs -d:pserver:anoncvs@cvs.digium.com:/usr/cvsroot co libpri
cd libpri ; make clean ; make install
cd zaptel ; make clean ; make install
cd asterisk ; make clean ; make valgrind ; make install

Reboot machine
Make sure Asterisk started, make the call, reload....crash.

gdb asterisk core.13310
(gdb) bt full
# 0  0x401e6414 in ioctl () from /lib/libc.so.6
No symbol table info available.
# 1  0x40834823 in careful_write (fd=39, data=0x8176978 "H", len=320)
   at app_meetme.c:167
       res = 135751944
       x = 10
# 2  0x408370ca in conf_run (chan=0x4061a988, conf=0x81a5458, confflags=0)
   at app_meetme.c:955
       prev = (struct ast_conference *) 0x0
       cur = (struct ast_conference *) 0x81a5458
       user = (struct ast_conf_user *) 0x8199080
       fd = 39
       ztc = {chan = 9, confno = 1021, confmode = 772}
       f = (struct ast_frame *) 0x8176908
       c = (struct ast_channel *) 0x4061a988
       fr = {frametype = 2, subclass = 64, datalen = 320, samples = 160,
 mallocd = 0, offset = 64, src = 0x0, data = 0xbd7fa274, delivery = {
   tv_sec = 0, tv_usec = 0}, prev = 0x0, next = 0x0}
       outfd = -99999
       ms = -1
       nfds = 1
       res = 320
       flags = 2
       retryzap = -7
       origfd = 29
       musiconhold = 0
       firstpass = 1
       origquiet = 0
       ret = -1
       x = 1
       menu_active = 0
       using_pseudo = 1
       app = (struct ast_app *) 0x81a5458
       agifile = 0x4083c550 "|\224"
       agifiledefault = 0x4083a38e "conf-background.agi"
       meetmesecs = '\0' <repeats 29 times>
       exitcontext = '\0' <repeats 79 times>
       dtmf = 134865010
       bi = {txbufpolicy = 0, rxbufpolicy = 0, numbufs = 4, bufsize = 160,
 readbufs = 0, writebufs = 0}
       __buf = "(¾\016\b\000\000\000½\000\000\000\000Hm\002@8¾\016\b\201\016\r\bàû\177½ÿÿÿÿÌ\237X@°\017\026\b|¢\177½×\217\005\b(¾\016\bÙ'X@\201\016\r\bÌ\237X@", '\0' <repeats 319 times>
       buf = 0xbd7fa274 ""
# 3  0x40838986 in conf_exec (chan=0x4061a988, data=0xbd7fd814)
   at app_meetme.c:1428
       res = -1
       u = (struct localuser *) 0x8173310
       confno = "1000", '\0' <repeats 75 times>
       allowretry = 0
       retrycnt = 0
       cnf = (struct ast_conference *) 0x81a5458
       confflags = 0
       dynamic = 1
       empty = 0
       empty_no_pin = 0
       notdata = 0xbd7fd814 "1000|d"
       info = 0x0
       inflags = 0xbd7fa531 "d"
       inpin = 0x0
       the_pin = '\0' <repeats 79 times>
# 4  0x0807864b in pbx_exec (c=0x4061a988, app=0x811cbf8, data=0xbd7fd814,
   newstack=1) at pbx.c:475
       res = 1080142216
       saved_c_appl = 0x0
       saved_c_data = 0x0
       execute = (int (*)(struct ast_channel *,
   void *)) 0x40837c56 <conf_exec>
# 5  0x0807ac99 in pbx_extension_helper (c=0x4061a988, con=0x0,
   context=0x4061aad4 "netplex-inside2", exten=0x4061abc8 "444", priority=1,
   label=0x0, callerid=0x4061a818 "301", action=1) at pbx.c:1271
       e = (struct ast_exten *) 0x81995b8
       app = (struct ast_app *) 0x811cbf8
       sw = (struct ast_switch *) 0x0
       data = 0x0
       newstack = 1
       res = 0
       status = 5
       incstack = {0x8135670 "netplex-inside2", 0x81707b0 "e911",
 0x810b3c8 "parkedcalls", 0x8139ad8 "netplex-ext",
 0x8132628 "netplex-intercom", 0x8131aa0 "netplex-forcedmail",
 0x0 <repeats 11 times>, 0x4023eb60 "", 0x0 <repeats 18 times>,
 0x40245550 "`ô\022", 0xbd7ffbe0 "àû\177½", 0xbd7ff954 "\001",
 0xbd7ff8cc "lù\177½È!\t\b`\\\031\b,­a@\037",
 0x401658f4 "\213]ü\211ì]Ã\220\220\220\220\220U\211å\215E\020\203ì\020\211D$\b\213E\f\211]üè\005cüÿ\201Ã8ü\r", 0xbd7ff904 "\"Andrew\" <301>",
 0x50 <Address 0x50 out of bounds>, 0x8195c60 "1102512028.0",
 0xbd7ffbe0 "àû\177½", 0xbd7ff954 "\001",
 0xbd7ff96c "Üú\177½3Ã\a\b\210©a@Ôªa@È«a@\001",
 0x80921c8 "\213E\b\213\200à\003", 0x8195c60 "1102512028.0",
 0x4061ad2c "1102512028.0", 0x1f <Address 0x1f out of bounds>,
 0x4061a828 "Andrew", 0x4061a818 "301", 0x40245fc0 "",
 0xbd7ff92c "øË\021\b¸\225\031\b",
 0x40187ce8 "\213Eð\203À\\\211EØ\213Uð\213MØ\213Rh\211Uä9Ê\017\204¥",
 0x40245fc0 "", 0x0, 0x803c1 <Address 0x803c1 out of bounds>,
 0x80daa04 "<unknown>", 0x646e4122 <Address 0x646e4122 out of bounds>,
 0x22776572 <Address 0x22776572 out of bounds>,
 0x30333c20 <Address 0x30333c20 out of bounds>,
 0x3e31 <Address 0x3e31 out of bounds>}
       passdata = "1000|d", '\0' <repeats 8185 times>
       stacklen = 6
       tmp = "\033[1;36;40mMeetMe\033[0;37;40m\0007;40m", '\0' <repeats 47 times>
       tmp2 = "\033[1;35;40mSIP/301a-7183\033[0;37;40m", '\0' <repeats 46 times>
       tmp3 = "\033[1;35;40m1000|d\033[0;37;40m\00044|1\033[0;37;40m", '\0' <repeats 8150 times>
# 6  0x0807bf14 in ast_spawn_extension (c=0x4061a988,
   context=0x4061aad4 "netplex-inside2", exten=0x4061abc8 "444", priority=1,
   callerid=0x4061a818 "301") at pbx.c:1814
No locals.
# 7  0x0807c333 in ast_pbx_run (c=0x4061a988) at pbx.c:1876
       firstpass = 0
       digit = 0 '\0'
       exten = '\0' <repeats 255 times>
       pos = 0
       waittime = 0
       res = 0
# 8  0x0807cece in pbx_thread (data=0x4061a988) at pbx.c:2059
       c = (struct ast_channel *) 0x4061a988
# 9  0x40025e51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
# 10 0x401ed69a in clone () from /lib/libc.so.6
No symbol table info available.

By: Brian West (bkw918) 2004-12-08 12:59:43.000-0600

do the make without make valgrind please.  Then make install.

bkw

By: Mark Spencer (markster) 2004-12-08 13:33:16.000-0600

"make valgrind" definitely makes debugging easier, so I would still like to see you keep it.  Can you figure out just which module being reloaded causes the failure?  For example, try "reload chan_zap.so" and "reload chan_sip.so" and see if they do it individually.

By: Andrew Lindh (andrew) 2004-12-08 14:44:14.000-0600

Crash when I do "reload chan_zap.so"

Seems to make sense....meetme uses a virtual zap channel. I reloaded all of them one at a time and chan_zap.so is the only one that causes the crash. I also tried making a local call (FXO port) then reload and it does not crash.

FYI:
gcc 3.3.4
Debian with Kernel 2.6.7-1-686-smp

By: Mark Spencer (markster) 2004-12-08 16:11:32.000-0600

Also, can you please post your zapata.conf ?

By: Andrew Lindh (andrew) 2004-12-08 17:08:05.000-0600

That's it...I was playing with it and had added some unexpected stuff.
At the end of the zapata.conf I have:

context=default
group=
channel => pseudo

If I comment them out it does not crash! It's a bug I don't think anyone else will hit, but it still should not crash...sorry it's just a minor trouble after all that...

edited on: 12-08-04 17:08

By: Brian West (bkw918) 2004-12-09 10:17:06.000-0600

channel => pseudo  <-- this should never be listed as a channel..

becuase when you were doing a reload chan_zap would close the fd for that and it would all come crashing down right?

bkw

By: Mark Spencer (markster) 2004-12-10 19:04:49.000-0600

Please try latest CVS head and confirm if that fixes the problem.  Thanks.

By: Andrew Lindh (andrew) 2004-12-11 15:58:55.000-0600

It's happy now.

By: Digium Subversion (svnbot) 2008-01-15 15:16:13.000-0600

Repository: asterisk
Revision: 4421

U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r4421 | markster | 2008-01-15 15:16:12 -0600 (Tue, 15 Jan 2008) | 2 lines

Reload fixes (bug ASTERISK-2937)

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

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