Summary: | ASTERISK-11552: [patch] asterisk crash at reload chan_misdn.so | ||
Reporter: | Abhay Gupta (agupta) | Labels: | |
Date Opened: | 2008-03-01 04:46:03.000-0600 | Date Closed: | 2009-08-17 11:53:13 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_misdn |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) another_bt_full.txt ( 1) bt_full_chan_msidn.txt ( 2) bug12113.patch | |
Description: | Program terminated with signal 11, Segmentation fault. #0 0x08072612 in __ast_free_region (ptr=0x89ed6d8, file=0x813f573 "indications.c", lineno=438, func=0x813f7b7 "free_zone") at astmm.c:152 152 for (reg = regions[hash]; reg; reg = reg->next) { BT full is attached . ****** ADDITIONAL INFORMATION ****** This 1.4.18 is patched with the current updates including that of autoservice.c | ||
Comments: | By: Abhay Gupta (agupta) 2008-03-01 04:50:27.000-0600 MISDN version is 1_1_7_2 By: Abhay Gupta (agupta) 2008-03-01 04:58:21.000-0600 These are the messages in /var/log/messages [root@dellterisk1 ~]# tail /var/log/messages Mar 1 12:42:25 dellterisk1 kernel: l2 D-channel addr:40000101 frame wrong EA0/E A1 Mar 1 13:13:59 dellterisk1 kernel: mISDN: INTERNAL ERROR in /usr/src/mISDN-1_1_ 7_2/drivers/isdn/hardware/mISDN/stack.c:978 register duplicate 50130100 f4a67600 f4a67600 Mar 1 13:13:59 dellterisk1 kernel: mISDN: INTERNAL ERROR in /usr/src/mISDN-1_1_ 7_2/drivers/isdn/hardware/mISDN/stack.c:1152 Mar 1 13:13:59 dellterisk1 kernel: mISDNd: addr(f0000) prim(f1980) failed err(- 22) Mar 1 13:15:25 dellterisk1 kernel: Mar 1 13:16:29 dellterisk1 kernel: Mar 1 13:17:35 dellterisk1 last message repeated 6 times Mar 1 13:18:07 dellterisk1 last message repeated 2 times Mar 1 15:22:17 dellterisk1 kernel: l2mgr: addr:40000101 prim 23082 J Mar 1 15:22:21 dellterisk1 kernel: We got Message with Invalid Callref By: Abhay Gupta (agupta) 2008-03-03 02:55:49.000-0600 P[ 1] $$$ Set StackIND Err: -1 No space left on device -- mISDN/5-u687 is ringing P[ 1] bchannel_activate: Stack not found ![Mar 3 10:43:53] WARNING[28945]: chan_misdn.c:5654 chan_misdn_log: cb_log called with out-of-range port number! (-1366422693) [Mar 3 10:43:53] WARNING[28945]: chan_misdn.c:5666 chan_misdn_log: lib Got Prim: Addr 42000102 prim 30282 dinfo 300cd [Mar 3 10:43:53] WARNING[28945]: chan_misdn.c:5654 chan_misdn_log: cb_log called with out-of-range port number! (-1366422693) [Mar 3 10:43:53] WARNING[28945]: chan_misdn.c:5666 chan_misdn_log: Freeing Msg on prim:30282 -- mISDN/18-u689 is proceeding passing it to SIP/114-0899b200 P[ 0] Unhandled Message: prim 30282 len 116 from addr 42000102, dinfo 300ce on this port. P[ 0] Unhandled Message: prim 34582 len 119 from addr 42000102, dinfo 300cd on this port. [Mar 3 10:43:53] WARNING[780]: chan_misdn.c:5654 chan_misdn_log: cb_log called with out-of-range port number! (-1686445422) [Mar 3 10:43:53] WARNING[780]: chan_misdn.c:5666 chan_misdn_log: Sending :160 bytes 2 MISDN dellterisk1*CLI> Disconnected from Asterisk server [root@dellterisk1 ~]# /usr/sbin/safe_asterisk: line 111: 28915 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY} Asterisk ended with exit status 139 Asterisk exited on signal 11. By: Jason Parker (jparker) 2008-03-04 18:33:01.000-0600 That "No space left on device" error looks scary. Make sure you aren't out of disk space or something.. By: Abhay Gupta (agupta) 2008-03-07 02:28:39.000-0600 There is 9GB of HDD space left on harddisk . So it is certainly not a issue of free space of HDD . Also the entire install of OS and ASterisk is in a single partition . By: Abhay Gupta (agupta) 2008-03-13 12:23:36 Is somebody to help on these misdn issues ? By: crich (crich) 2008-04-17 16:19:42 sorry to have let you wait for so long. This internal Error Thing happens, when chan_misdn tries to reallocate a Bchannel Stack from mISDN, which was previously allocated. This often happens, when asterisk crashes and restarts fastly (there might be coredumps which are dated shortly before this Internal Error) then mISDN might remember previously activated B-Channels. When Asterisk is now started again, it thinks every channel is free and it just tries to get the next channel, this causes the Internal error. This scenario is the most common scenario to produce the Internal error, so the point is to remove the crash of asterisk, or in case of a crash to re-initialize the mISDN modules (reloading them). a short glimpse of your backtraces show very strange locatoins for a crash. what kind of distro/ compiler are you using? I saw the first crash once on a Suse System. A switch to debian, without touching the configs fixed the problem. By: Abhay Gupta (agupta) 2008-04-17 20:27:23 Thanks for your response crich . The OS used is RHEL4 and we are using gcc compiler with safe_asterisk script . There is always a possibility of asterisk crashing and surely will restart very fast . We have seen that we are mostly having this problem when we are trying to have more channels being attempted at times . Means that we have 30 B channels , there are times when we have say 32 people trying to access and dial numbers . This problems comes very frequently then . We are not seeing the problem with ZAP channel though on our other servers . By: Abhay Gupta (agupta) 2008-04-17 20:33:53 I Forgot to mention one thing , here in this bug it was specific that only on reload on asterisk CLI this problem was coming . By: Enrique Medrano (barboles) 2008-07-31 04:37:35 Hello, I have the same problem: mISDN: INTERNAL ERROR in /root/build/mISDN-OCT/work/src/mISDN-1_1_8-OCT/drivers/isdn/hardware/mISDN/stack.c:985 register duplicate 50020100 e5e21200 e5e21200 Jul 30 19:37:52 PBX-01 kernel: mISDN: INTERNAL ERROR in /root/build/mISDN-OCT/work/src/mISDN-1_1_8-OCT/drivers/isdn/hardware/mISDN/stack.c:1164 Jul 30 19:37:52 PBX-01 kernel: mISDNd: addr(f0000) prim(f1980) failed err(-22) Anyone knows the solution? By: Jeff Peeler (jpeeler) 2009-08-12 13:55:05 This bug appears to be complicated by the usage of safe_asterisk and possibly crashing before the given backtraces occurred. The only way I could get a crash was to specify more ports than were configured and then try reloading the module. Attached is the patch that solves this problem. If the issue is still not fixed, providing your misdn.conf file will be necessary. I'm using mISDN 1.1.9.1 as building the older releases require patching for modern kernels. By: Jeff Peeler (jpeeler) 2009-08-17 11:33:07 I'm going to go ahead and close this. Please open a new report if there continues to be any problems. By: Digium Subversion (svnbot) 2009-08-17 11:35:26 Repository: asterisk Revision: 212498 U branches/1.4/channels/misdn_config.c ------------------------------------------------------------------------ r212498 | jpeeler | 2009-08-17 11:35:25 -0500 (Mon, 17 Aug 2009) | 12 lines Fix segfault when reloading chan_misdn. If more ports were specified than configured in misdn.conf a reload would crash asterisk. The problem was the unconfigured port was using data from the previously configured port. When the data for an unconfigured port was freed a crash would result from the double free. (closes issue ASTERISK-11552) Reported by: agupta Patches: bug12113.patch uploaded by jpeeler (license 325) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=212498 By: Digium Subversion (svnbot) 2009-08-17 11:51:14 Repository: asterisk Revision: 212506 _U trunk/ U trunk/channels/misdn_config.c ------------------------------------------------------------------------ r212506 | jpeeler | 2009-08-17 11:51:14 -0500 (Mon, 17 Aug 2009) | 19 lines Merged revisions 212498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines Fix segfault when reloading chan_misdn. If more ports were specified than configured in misdn.conf a reload would crash asterisk. The problem was the unconfigured port was using data from the previously configured port. When the data for an unconfigured port was freed a crash would result from the double free. (closes issue ASTERISK-11552) Reported by: agupta Patches: bug12113.patch uploaded by jpeeler (license 325) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=212506 By: Digium Subversion (svnbot) 2009-08-17 11:52:05 Repository: asterisk Revision: 212507 _U branches/1.6.0/ U branches/1.6.0/channels/misdn_config.c ------------------------------------------------------------------------ r212507 | jpeeler | 2009-08-17 11:52:05 -0500 (Mon, 17 Aug 2009) | 26 lines Merged revisions 212506 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r212506 | jpeeler | 2009-08-17 11:50:45 -0500 (Mon, 17 Aug 2009) | 19 lines Merged revisions 212498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines Fix segfault when reloading chan_misdn. If more ports were specified than configured in misdn.conf a reload would crash asterisk. The problem was the unconfigured port was using data from the previously configured port. When the data for an unconfigured port was freed a crash would result from the double free. (closes issue ASTERISK-11552) Reported by: agupta Patches: bug12113.patch uploaded by jpeeler (license 325) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=212507 By: Digium Subversion (svnbot) 2009-08-17 11:52:41 Repository: asterisk Revision: 212508 _U branches/1.6.1/ U branches/1.6.1/channels/misdn_config.c ------------------------------------------------------------------------ r212508 | jpeeler | 2009-08-17 11:52:40 -0500 (Mon, 17 Aug 2009) | 26 lines Merged revisions 212506 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r212506 | jpeeler | 2009-08-17 11:50:45 -0500 (Mon, 17 Aug 2009) | 19 lines Merged revisions 212498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines Fix segfault when reloading chan_misdn. If more ports were specified than configured in misdn.conf a reload would crash asterisk. The problem was the unconfigured port was using data from the previously configured port. When the data for an unconfigured port was freed a crash would result from the double free. (closes issue ASTERISK-11552) Reported by: agupta Patches: bug12113.patch uploaded by jpeeler (license 325) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=212508 By: Digium Subversion (svnbot) 2009-08-17 11:53:12 Repository: asterisk Revision: 212509 _U branches/1.6.2/ U branches/1.6.2/channels/misdn_config.c ------------------------------------------------------------------------ r212509 | jpeeler | 2009-08-17 11:53:12 -0500 (Mon, 17 Aug 2009) | 26 lines Merged revisions 212506 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r212506 | jpeeler | 2009-08-17 11:50:45 -0500 (Mon, 17 Aug 2009) | 19 lines Merged revisions 212498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines Fix segfault when reloading chan_misdn. If more ports were specified than configured in misdn.conf a reload would crash asterisk. The problem was the unconfigured port was using data from the previously configured port. When the data for an unconfigured port was freed a crash would result from the double free. (closes issue ASTERISK-11552) Reported by: agupta Patches: bug12113.patch uploaded by jpeeler (license 325) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=212509 |