Summary: | ASTERISK-09917: Segfault in do_monitor/ast_sched_runq | ||
Reporter: | Gregory Hinton Nietsky (irroot) | Labels: | |
Date Opened: | 2007-07-20 06:37:14 | Date Closed: | 2007-08-17 16:20:32 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Core was generated by `/usr/sbin/asterisk -f -vvvg -c'. Program terminated with signal 11, Segmentation fault. #0 0xb7f61324 in pthread_mutex_lock () from /lib/libpthread.so.0 (gdb) bt #0 0xb7f61324 in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0xb32fc47b in expire_register (data=0x8382960) at /mnt/x86_64/usr/src/voip/asterisk-1.4.8/include/asterisk/lock.h:532 #2 0x080eb60c in ast_sched_runq (con=0x8319fc0) at sched.c:359 #3 0xb32fcc85 in do_monitor (data=0x0) at chan_sip.c:15307 #4 0x080f67e9 in dummy_start (data=0x8318d58) at utils.c:545 ASTERISK-1 0xb7f5f554 in ?? () from /lib/libpthread.so.0 ASTERISK-2 0x08318d58 in ?? () ASTERISK-3 0xb34734a0 in ?? () ASTERISK-4 0xb34734a0 in ?? () ASTERISK-5 0xb34734a0 in ?? () ASTERISK-6 0xb34734a0 in ?? () ASTERISK-7 0x00000000 in ?? () ****** ADDITIONAL INFORMATION ****** #1 0xb32fc47b in expire_register (data=0x8382960) at /mnt/x86_64/usr/src/voip/asterisk-1.4.8/include/asterisk/lock.h:532 next = <value optimized out> found = (struct sip_peer *) 0x0 prev = <value optimized out> peer = <value optimized out> __PRETTY_FUNCTION__ = "expire_register" #2 0x080eb60c in ast_sched_runq (con=0x8319fc0) at sched.c:359 numevents = 0 res = <value optimized out> #3 0xb32fcc85 in do_monitor (data=0x0) at chan_sip.c:15307 prev = <value optimized out> res = 0 sip = (struct sip_pvt *) 0x0 t = 1184921379 fastrestart = 0 lastpeernum = -1 curpeernum = 55 reloading = <value optimized out> __PRETTY_FUNCTION__ = "do_monitor" #4 0x080f67e9 in dummy_start (data=0x8318d58) at utils.c:545 __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {137475384, 0, 0, -1287179160, -1454535190, 302374440}, __mask_was_saved = 0}}, __pad = { 0xb34734a0, 0x0, 0x1, 0xb7f6b11c}} __cancel_arg = (void *) 0xb3473ba0 not_first_call = <value optimized out> ret = <value optimized out> ASTERISK-1 0xb7f5f554 in ?? () from /lib/libpthread.so.0 No symbol table info available. ASTERISK-2 0x08318d58 in ?? () No symbol table info available. ASTERISK-3 0xb34734a0 in ?? () No symbol table info available. ASTERISK-4 0xb34734a0 in ?? () No symbol table info available. ASTERISK-5 0xb34734a0 in ?? () No symbol table info available. ASTERISK-6 0xb34734a0 in ?? () No symbol table info available. ASTERISK-7 0x00000000 in ?? () | ||
Comments: | By: Gregory Hinton Nietsky (irroot) 2007-07-20 06:53:12 looks like this is caused by MWI and registration expirery colideing ?? By: Joshua C. Colp (jcolp) 2007-07-23 08:55:43 Can you please provide a backtrace from an unoptimized build? This can be achieved by going into menuselect, Compiler Flags, and selecting DONT_OPTIMIZE. By: Gregory Hinton Nietsky (irroot) 2007-07-23 10:02:27 ill look out for it it has me stumped at the moment happend 2. close this one and ill post a un optomised np should it occour again ... By: Gregory Hinton Nietsky (irroot) 2007-07-27 04:26:00 ive upgraded all my sites to 1.4.9 with DONT_OPTIMIZE and it has not happend again yet ... it seems to happen 2/3 times a week accross 12 sites so certainaly not frequent. By: Gregory Hinton Nietsky (irroot) 2007-07-27 05:25:32 Here we go ... Core was generated by `/usr/sbin/asterisk -f -vvvg -c'. Program terminated with signal 11, Segmentation fault. #0 0xb7f5e324 in pthread_mutex_lock () from /lib/libpthread.so.0 #0 0xb7f5e324 in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0xb1c7a545 in ast_mutex_lock (pmutex=0x5c) at /mnt/x86_64/usr/src/voip/asterisk-1.4.8/include/asterisk/lock.h:532 #2 0xb1c94562 in expire_register (data=0xb1b7cd60) at chan_sip.c:7686 #3 0x080e97e5 in ast_sched_runq (con=0x837b740) at sched.c:359 #4 0xb1cb7f30 in do_monitor (data=0x0) at chan_sip.c:15315 ASTERISK-1 0x080f729a in dummy_start (data=0x837df78) at utils.c:545 ASTERISK-2 0xb7f5c554 in ?? () from /lib/libpthread.so.0 #0 0xb7f5e324 in pthread_mutex_lock () from /lib/libpthread.so.0 No symbol table info available. #1 0xb1c7a545 in ast_mutex_lock (pmutex=0x5c) at /mnt/x86_64/usr/src/voip/asterisk-1.4.8/include/asterisk/lock.h:532 No locals. #2 0xb1c94562 in expire_register (data=0xb1b7cd60) at chan_sip.c:7686 newcount = 0 peer = (struct sip_peer *) 0x0 __PRETTY_FUNCTION__ = "expire_register" #3 0x080e97e5 in ast_sched_runq (con=0x837b740) at sched.c:359 current = (struct sched *) 0xb1b7a180 tv = {tv_sec = 1185532429, tv_usec = 803774} numevents = 0 res = -1313868936 #4 0xb1cb7f30 in do_monitor (data=0x0) at chan_sip.c:15315 res = 0 sip = (struct sip_pvt *) 0x0 peer = (struct sip_peer *) 0x0 t = 1185532429 fastrestart = 0 lastpeernum = -1 curpeernum = 22 reloading = 0 __PRETTY_FUNCTION__ = "do_monitor" ASTERISK-1 0x080f729a in dummy_start (data=0x837df78) at utils.c:545 __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {-1208582156, 0, 0, -1313868696, -1369752900, 402373846}, __mask_was_saved = 0}}, __pad = { 0xb1aff4a0, 0x0, 0x0, 0x0}} __cancel_routine = (void (*)(void *)) 0x8068b07 <ast_unregister_thread> __cancel_arg = (void *) 0xb1affba0 not_first_call = 0 ret = (void *) 0x0 a = {start_routine = 0xb1cb78dc <do_monitor>, data = 0x0, name = 0x837df88 "do_monitor", ' ' <repeats 11 times>, "started at [15369] chan_sip.c restart_monitor()"} By: Russell Bryant (russell) 2007-08-06 16:41:06 Please try the patch over in issue 10391 and see if it helps By: Digium Subversion (svnbot) 2007-08-17 08:19:19 Repository: asterisk Revision: 79857 ------------------------------------------------------------------------ r79857 | russell | 2007-08-17 08:19:16 -0500 (Fri, 17 Aug 2007) | 5 lines Fix some crashes in chan_sip. This patch changes various places that add items to the scheduler to ensure that they don't overwrite the ID of a previously scheduled item. If there is one, it should be removed. (closes issue ASTERISK-10032, closes issue ASTERISK-9917, probably others, patch by me) ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-08-17 08:21:25 Repository: asterisk Revision: 79858 ------------------------------------------------------------------------ r79858 | russell | 2007-08-17 08:21:25 -0500 (Fri, 17 Aug 2007) | 13 lines Merged revisions 79857 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79857 | russell | 2007-08-17 08:37:08 -0500 (Fri, 17 Aug 2007) | 5 lines Fix some crashes in chan_sip. This patch changes various places that add items to the scheduler to ensure that they don't overwrite the ID of a previously scheduled item. If there is one, it should be removed. (closes issue ASTERISK-10032, closes issue ASTERISK-9917, probably others, patch by me) ........ ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-08-17 16:20:32 Repository: asterisk Revision: 79916 ------------------------------------------------------------------------ r79916 | file | 2007-08-17 16:20:31 -0500 (Fri, 17 Aug 2007) | 164 lines Merged revisions 79841,79858-79862,79885,79888,79894,79901,79903,79905,79907,79913,79915 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r79841 | crichter | 2007-08-17 05:29:56 -0300 (Fri, 17 Aug 2007) | 9 lines Merged revisions 79833 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79833 | crichter | 2007-08-17 10:22:36 +0200 (Fr, 17 Aug 2007) | 1 line sometimes we don't need to signal dtmf tones to asterisk, we just want them to go through as inband. Otherwise they might be generated by the other channel partner and then there is a double tone. ........ ................ r79858 | russell | 2007-08-17 10:39:17 -0300 (Fri, 17 Aug 2007) | 13 lines Merged revisions 79857 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79857 | russell | 2007-08-17 08:37:08 -0500 (Fri, 17 Aug 2007) | 5 lines Fix some crashes in chan_sip. This patch changes various places that add items to the scheduler to ensure that they don't overwrite the ID of a previously scheduled item. If there is one, it should be removed. (closes issue ASTERISK-10032, closes issue ASTERISK-9917, probably others, patch by me) ........ ................ r79859 | tilghman | 2007-08-17 10:40:11 -0300 (Fri, 17 Aug 2007) | 2 lines store and destroy implementations for realtime pgsql (closes issue ASTERISK-10015) ................ r79860 | tilghman | 2007-08-17 10:45:44 -0300 (Fri, 17 Aug 2007) | 2 lines store and destroy implementations for sqlite (closes issue ASTERISK-10078) and odbc (closes issue ASTERISK-10079) ................ r79861 | russell | 2007-08-17 11:07:44 -0300 (Fri, 17 Aug 2007) | 12 lines This commit adds a scheduler API call, ast_sched_replace that can be used in place of a very common construct. I also used it in a number of places in chan_sip. if (id > -1) ast_sched_del(sched, id); id = ast_sched_add(sched, ...); changes to: ast_sched_replace(id, sched, ...); ................ r79862 | russell | 2007-08-17 11:14:59 -0300 (Fri, 17 Aug 2007) | 2 lines Make use of ast_sched_replace() in some places in chan_iax2 ................ r79885 | tilghman | 2007-08-17 11:41:33 -0300 (Fri, 17 Aug 2007) | 2 lines Change this flag... might not otherwise unlock in an OOM situation ................ r79888 | qwell | 2007-08-17 12:27:19 -0300 (Fri, 17 Aug 2007) | 4 lines Correct the argument separator for a Dial statement in pbx_dundi. Closes issue ASTERISK-10107, patch by lunn ................ r79894 | qwell | 2007-08-17 13:04:20 -0300 (Fri, 17 Aug 2007) | 4 lines Fix Dial arguments in res_features. Closes issue ASTERISK-10108, patch by lunn. ................ r79901 | tilghman | 2007-08-17 13:39:41 -0300 (Fri, 17 Aug 2007) | 2 lines Documentation for '' in logger.conf, as suggested by jtodd (closes issue ASTERISK-10100) ................ r79903 | qwell | 2007-08-17 14:45:01 -0300 (Fri, 17 Aug 2007) | 13 lines Merged revisions 79902 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue ASTERISK-10109) ........ r79902 | qwell | 2007-08-17 12:44:22 -0500 (Fri, 17 Aug 2007) | 4 lines Re-add the setting of callerid name and number. Issue 10485, reported by and fix explained by paradise. ........ ................ r79905 | qwell | 2007-08-17 16:13:25 -0300 (Fri, 17 Aug 2007) | 20 lines Merged revisions 79904 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue ASTERISK-10065) ........ r79904 | qwell | 2007-08-17 14:12:19 -0500 (Fri, 17 Aug 2007) | 11 lines Don't send a semicolon over the wire in sip notify messages. Caused by fix for issue 9938. I basically took the code that existed before 9938 was fixed, and copied it into a new function - ast_unescape_semicolon There should be very few places this will be needed (pbx_config does NOT need this (see issue 9938 for details)) Issue 10430, patch by me, with help/ideas from murf (thanks murf). ........ ................ r79907 | mmichelson | 2007-08-17 16:16:51 -0300 (Fri, 17 Aug 2007) | 14 lines Merged revisions 79906 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79906 | mmichelson | 2007-08-17 14:14:05 -0500 (Fri, 17 Aug 2007) | 6 lines Patch allows for more seamless transition from file storage voicemail to ODBC storage voicemail. If a retrieval of a greeting from the database fails, but the file is found on the file system, then we go ahead an insert the greeting into the database. The result of this is that people who switch from file storage to ODBC storage do not need to rerecord their voicemail greetings. ........ ................ r79913 | russell | 2007-08-17 18:04:33 -0300 (Fri, 17 Aug 2007) | 12 lines Merged revisions 79912 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79912 | russell | 2007-08-17 16:01:43 -0500 (Fri, 17 Aug 2007) | 4 lines Avoid a crash in the handling of DTMF based Caller ID. It is valid for ast_read to return NULL in the case that the channel has been hung up. (crash reported by anonymouz666 on IRC in #asterisk-dev) ........ ................ r79915 | mmichelson | 2007-08-17 18:19:18 -0300 (Fri, 17 Aug 2007) | 3 lines I broke the build. Now I'm fixing it. ................ ------------------------------------------------------------------------ |