Summary: | ASTERISK-14946: [patch] Crash on Pickup or Transfer | ||
Reporter: | ciscofreak (ciscofreak) | Labels: | |
Date Opened: | 2009-10-06 11:04:28 | Date Closed: | 2009-11-17 07:53:37.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 16027_1.4.diff ( 1) backtrace.txt ( 2) viewcore.txt | |
Description: | I am not able to reproduce this crash and I do not know when it happens. It seems to happen when a SIP-User pickups or transfers a call. I had this problem also under 1.4.25 and some 1.6 version (I used up to 1.6.0.5, then I decided to use 1.4 in productive Situations). It does not happen very often, but sometimes I find core Files on our PBX. I should mention that I use a Patch for SNOM Pickup: http://www.net-performer.de/asterisk/asterisk-1.4.22-pickup-by-call-id.patch The last line of full-Log is: NOTICE[4783] chan_sip.c: Ignoring this INVITE with replaces in a stupid way. I will attach a backtrace and the output of viewcore (I have found that on http://www.voip-info.org/wiki/view/Asterisk+debugging ) OS is Debian Lenny i386. uname -a: Linux 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux Asterisk Version is 1.4.26.2. Thanks in advance. | ||
Comments: | By: ciscofreak (ciscofreak) 2009-10-06 11:28:58 I think my backtrace is not complete. The /tmp directory was 100% full, it is only a tmpfs. Sorry. By: Leif Madsen (lmadsen) 2009-10-06 12:47:59 No problem. When you get another core file and create a new backtrace, then go ahead and attach it here. More information is in the doc/backtrace.txt file of your Asterisk source directory. By: David Vossel (dvossel) 2009-10-06 16:50:49 I uploaded a patch that may resolve this issue. By: ciscofreak (ciscofreak) 2009-10-07 07:31:59 Thanks for the patch. I have patched chan_sip.c from Asterisk 1.4.26.2 manually. I did not insert the line "*nounlock = 1;" because gcc gave an error. So I only set the "if (!c) {}" before the "if (ignore) {}" Block. I will test the patch and give feedback. It will take some weeks because the crash did not happen very often. If it crashes again, I will post a complete backtrace. By: Leif Madsen (lmadsen) 2009-10-07 09:19:33 Setting this as Ready for Testing while we await feedback. Can you please report if you have no crashes on this issue by mid-November to keep us in the loop so this gets committed? Thanks! By: Digium Subversion (svnbot) 2009-10-07 12:44:39 Repository: asterisk Revision: 222542 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r222542 | dvossel | 2009-10-07 12:44:39 -0500 (Wed, 07 Oct 2009) | 8 lines crash on transfer handle_invite_replaces() attempts to uplock a pvt's owner channel without first verifing that it exists. (issue ASTERISK-14946) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222542 By: David Vossel (dvossel) 2009-10-07 12:46:42 I believe the patch I just uploaded may be a better option for this bug. If you're using 1.4.26.2, just take out the ast_channel_unlock(c) entirely from that if block. If it exists it will should be unlocked later by handle_request_do(), and if it didn't than it shouldn't be unlocked to begin with. By: Digium Subversion (svnbot) 2009-10-07 12:48:11 Repository: asterisk Revision: 222543 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r222543 | dvossel | 2009-10-07 12:48:11 -0500 (Wed, 07 Oct 2009) | 14 lines Merged revisions 222542 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines crash on transfer handle_invite_replaces() attempts to uplock a pvt's owner channel without first verifing that it exists. (issue ASTERISK-14946) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222543 By: Digium Subversion (svnbot) 2009-10-07 12:49:15 Repository: asterisk Revision: 222544 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r222544 | dvossel | 2009-10-07 12:49:15 -0500 (Wed, 07 Oct 2009) | 21 lines Merged revisions 222543 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r222543 | dvossel | 2009-10-07 12:44:52 -0500 (Wed, 07 Oct 2009) | 14 lines Merged revisions 222542 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines crash on transfer handle_invite_replaces() attempts to uplock a pvt's owner channel without first verifing that it exists. (issue ASTERISK-14946) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222544 By: Digium Subversion (svnbot) 2009-10-07 12:49:56 Repository: asterisk Revision: 222545 _U branches/1.6.1/ U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r222545 | dvossel | 2009-10-07 12:49:56 -0500 (Wed, 07 Oct 2009) | 21 lines Merged revisions 222543 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r222543 | dvossel | 2009-10-07 12:44:52 -0500 (Wed, 07 Oct 2009) | 14 lines Merged revisions 222542 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines crash on transfer handle_invite_replaces() attempts to uplock a pvt's owner channel without first verifing that it exists. (issue ASTERISK-14946) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222545 By: Digium Subversion (svnbot) 2009-10-07 12:50:41 Repository: asterisk Revision: 222546 _U branches/1.6.0/ U branches/1.6.0/channels/chan_sip.c ------------------------------------------------------------------------ r222546 | dvossel | 2009-10-07 12:50:41 -0500 (Wed, 07 Oct 2009) | 21 lines Merged revisions 222543 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r222543 | dvossel | 2009-10-07 12:44:52 -0500 (Wed, 07 Oct 2009) | 14 lines Merged revisions 222542 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222542 | dvossel | 2009-10-07 12:41:21 -0500 (Wed, 07 Oct 2009) | 8 lines crash on transfer handle_invite_replaces() attempts to uplock a pvt's owner channel without first verifing that it exists. (issue ASTERISK-14946) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=222546 By: ciscofreak (ciscofreak) 2009-10-09 05:10:24 OK, I have removed the line 14082 (ast_channel_unlock(c)) from chan_sip.c. I will update our PBX on weekend. If I have no crashes till 15. november I think that the bug is fixed. I will inform you. Thanks for your great software and support. By: Leif Madsen (lmadsen) 2009-10-20 09:22:26 I think this may be resolved based on the response from the reporter? By: ciscofreak (ciscofreak) 2009-10-27 08:34:46 Until now I did not have any further crashes. But I will report again on 15. november. By: David Vossel (dvossel) 2009-10-27 09:40:19 I'm marking it as closed. At this point, just report back if you have a problem. We'll assume everything is fixed otherwise. |