Summary: | ASTERISK-12782: ast_moh_free_class in res_musiconhold.c:195 | ||
Reporter: | Igor Marques Carneiro da Silva (igorcarneiro) | Labels: | |
Date Opened: | 2008-09-26 13:41:46 | Date Closed: | 2008-12-22 10:21:03.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_musiconhold |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) backtrace1.txt | |
Description: | Segment Fault on asterisk the back trace is: gdb /usr/sbin/asterisk /tmp/core.9128 ------------------------------------------------------------------------------ Core was generated by `/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c'. Program terminated with signal 11, Segmentation fault. #0 0x0016cd17 in ast_moh_free_class (mohclass=0xb7620068) at res_musiconhold.c:195 195 while ((member = AST_LIST_REMOVE_HEAD(&class->members, list))) ------------------------------------------------------------------------------ the function with problema is ast_moh_free_class section res_musiconhold.c:195 ------------------------------------------------------------------------------ static void ast_moh_free_class(struct mohclass **mohclass) { struct mohdata *member; struct mohclass *class = *mohclass; int i; while ((member = AST_LIST_REMOVE_HEAD(&class->members, list))) ast_free(member); if (class->thread) { pthread_cancel(class->thread); class->thread = 0; } if (class->filearray) { for (i = 0; i < class->total_files; i++) ast_free(class->filearray[i]); ast_free(class->filearray); } ast_free(class); *mohclass = NULL; } ------------------------------------------------------------------------------ | ||
Comments: | By: Sean Bright (seanbright) 2008-09-30 19:25:07 Could you please upload a full backtrace and attach it to this issue? (See doc/backtrace.txt for details). By: Igor Marques Carneiro da Silva (igorcarneiro) 2008-10-01 06:27:06 I can't upload core file, return to me this error: --------------------------------------------------------------------- APPLICATION ERROR ASTERISK-398 Consulta ao banco-de-dados falhou. Erro recebido do banco-de-dados foi ASTERISK-1147: "Got a packet bigger than 'max_allowed_packet' bytes" para a consulta: "INSERT INTO mantis_bug_file_table (bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content) VALUES --------------------------------------------------------------------- ls core.9128.tbz2 -all -rw-r--r-- 1 igor igor 1794390 2008-10-01 08:25 core.9128.tbz2 --------------------------------------------------------------------- By: Sean Bright (seanbright) 2008-10-01 07:06:47 Right, that is why I asked you to upload a backtrace, not a core file. Please see doc/backtrace.txt for details. By: Jeff Peeler (jpeeler) 2008-12-15 14:22:57.000-0600 Obviously a hangup was being done, but can you provide the scenario that led to the crash sometimes occurring? By: Russell Bryant (russell) 2008-12-19 09:23:32.000-0600 I'm working on a fix for this in a branch - team/russell/issue_13566 By: Digium Subversion (svnbot) 2008-12-22 08:45:23.000-0600 Repository: asterisk Revision: 166262 U branches/1.4/include/asterisk/strings.h U branches/1.4/res/res_musiconhold.c ------------------------------------------------------------------------ r166262 | russell | 2008-12-22 08:45:22 -0600 (Mon, 22 Dec 2008) | 7 lines Re-work ref count handling of MoH classes using astobj2 to resolve crashes. (closes issue ASTERISK-12782) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=166262 By: Digium Subversion (svnbot) 2008-12-22 08:52:31.000-0600 Repository: asterisk Revision: 166263 _U trunk/ ------------------------------------------------------------------------ r166263 | russell | 2008-12-22 08:52:30 -0600 (Mon, 22 Dec 2008) | 14 lines Blocked revisions 166262 via svnmerge ........ r166262 | russell | 2008-12-22 08:45:27 -0600 (Mon, 22 Dec 2008) | 7 lines Re-work ref count handling of MoH classes using astobj2 to resolve crashes. (closes issue ASTERISK-12782) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=166263 By: Russell Bryant (russell) 2008-12-22 09:45:00.000-0600 reopening until i finish the trunk/1.6 version By: Digium Subversion (svnbot) 2008-12-22 10:10:35.000-0600 Repository: asterisk Revision: 166273 U trunk/res/res_musiconhold.c ------------------------------------------------------------------------ r166273 | russell | 2008-12-22 10:10:35 -0600 (Mon, 22 Dec 2008) | 7 lines Re-work ref count handling of MoH classes using astobj2 to resolve crashes. (closes issue ASTERISK-12782) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=166273 By: Digium Subversion (svnbot) 2008-12-22 10:17:53.000-0600 Repository: asterisk Revision: 166276 _U branches/1.6.0/ U branches/1.6.0/res/res_musiconhold.c ------------------------------------------------------------------------ r166276 | russell | 2008-12-22 10:17:52 -0600 (Mon, 22 Dec 2008) | 15 lines Merged revisions 166273 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r166273 | russell | 2008-12-22 10:10:40 -0600 (Mon, 22 Dec 2008) | 7 lines Re-work ref count handling of MoH classes using astobj2 to resolve crashes. (closes issue ASTERISK-12782) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=166276 By: Digium Subversion (svnbot) 2008-12-22 10:21:02.000-0600 Repository: asterisk Revision: 166277 _U branches/1.6.1/ U branches/1.6.1/res/res_musiconhold.c ------------------------------------------------------------------------ r166277 | russell | 2008-12-22 10:21:02 -0600 (Mon, 22 Dec 2008) | 15 lines Merged revisions 166273 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r166273 | russell | 2008-12-22 10:10:40 -0600 (Mon, 22 Dec 2008) | 7 lines Re-work ref count handling of MoH classes using astobj2 to resolve crashes. (closes issue ASTERISK-12782) Reported by: igorcarneiro Tested by: russell Review: http://reviewboard.digium.com/r/106/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=166277 |