Summary: | ASTERISK-12726: 5277 Segmentation fault | ||
Reporter: | Jonn Taylor (jonnt) | Labels: | |
Date Opened: | 2008-09-12 22:23:24 | Date Closed: | 2008-09-19 10:33:50 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_agent |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 13476.patch ( 1) gdb.txt ( 2) gdb2.txt | |
Description: | home*CLI> core stop gracefully /usr/sbin/safe_asterisk: line 138: 5277 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} < /dev/${TTY} Asterisk ended with exit status 139 Asterisk exited on signal 11. home*CLI> core stop now home*CLI> Disconnected from Asterisk server Executing last minute cleanups [root@home asterisk]# Asterisk ended with exit status 0 Asterisk shutdown normally. | ||
Comments: | By: snuffy (snuffy) 2008-09-13 18:10:40 we need a backtrace.. follow the guidelines in doc/backtrace.txt By: Jonn Taylor (jonnt) 2008-09-14 08:51:57 Sorry missed the part about not uploading the cor file. Here is the gdb.txt By: snuffy (snuffy) 2008-09-14 17:41:54 Could you recompile your asterisk with 'dont optimize' under compiler options? See if you can also reproduce the crash? By: Jonn Taylor (jonnt) 2008-09-14 23:02:55 Recompiled and the same thing happened. home*CLI> stop gracefully home*CLI> Disconnected from Asterisk server Executing last minute cleanups [root@home asterisk]# /usr/sbin/safe_asterisk: line 138: 26347 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} < /dev/${TTY} Asterisk ended with exit status 139 Asterisk exited on signal 11. cat: /var/run/asterisk.pid: No such file or directory Automatically restarting Asterisk. By: Mark Michelson (mmichelson) 2008-09-17 16:47:11 It seems as though the agent device state subscription is NULL, and that causes a problem when we try to unsubscribe. I have made a patch which simply tests that the pointer is non-NULL prior to calling ast_event_unsubscribe. Please test 13476.patch to see if it fixes the problem. I created the patch against the the latest 1.6.0 subversion checkout, but the patch should also apply cleanly to the 1.6.0-rc6 tag as well. By: Jonn Taylor (jonnt) 2008-09-18 06:44:19 That fixed it. Clean shut down. By: Digium Subversion (svnbot) 2008-09-19 10:33:48 Repository: asterisk Revision: 143609 U trunk/channels/chan_agent.c ------------------------------------------------------------------------ r143609 | mmichelson | 2008-09-19 10:33:47 -0500 (Fri, 19 Sep 2008) | 11 lines We should only unsubscribe to the device state event subscription if we have previously subscribed. Otherwise a segfault will occur. (closes issue ASTERISK-12726) Reported by: jonnt Patches: 13476.patch uploaded by putnopvut (license 60) Tested by: jonnt ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=143609 |