[Home]

Summary:ASTERISK-23864: Asterisk crashing on an outbound call over PJSIP channel tech
Reporter:Gervasio Marchand (gervasio)Labels:
Date Opened:2014-06-12 11:05:55Date Closed:2014-12-01 09:45:02.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:12.1.1 12.3.0 Frequency of
Occurrence
Frequent
Related
Issues:
is duplicated byASTERISK-24556 Asterisk 13 core dumps when calling from pjsip extension to another pjsip extension
Environment:Ubuntu 14.04 LTSAttachments:( 0) backtrace1211.txt
( 1) backtrace123.txt
( 2) error.log
( 3) pjsip.conf
Description:The extensions.conf is something like this
{noformat}
[incoming]
exten => nrousa,1,GotoIf($["${CALLERID(num)}" = "11231231234"]?validatepin,2)

exten => validatepin,2,DISA(9999,supercontext)

[supercontext]
exten => 9,1,Dial(PJSIP/linea@b68d677bcb7d)
{noformat}

The caller comes into incoming on the nrousa extension, the caller id
matches and then it does the DISA call validating the pin... I enter the
pin right, then dial 9 and that's when it crashes.

I saw this on 12.1.1 and Ubuntu 12.04 LTS. I then installed an Ubuntu 14.04 LTS and downloaded Asterisk 12.3 and the issue is still there.

You can find attached the backtraces of the issue both on 12.3 and 12.1.1
Comments:By: Matt Jordan (mjordan) 2014-06-12 14:03:51.784-0500

Please don't pastebin backtraces. Pastebins go away. Attached files live forever.

Please attach the backtrace to this issue.

By: Gervasio Marchand (gervasio) 2014-06-12 14:07:59.978-0500

Backtrace of the issue on Asterisk 12.3 and 12.1.1

By: Gervasio Marchand (gervasio) 2014-06-12 19:14:24.803-0500

@mjordan did you mean to set me as the Assignee?

By: Matt Jordan (mjordan) 2014-06-12 20:23:54.449-0500

It sets you as the assignee when we request feedback. When you hit Send Back, it should flip it back (emphasis on "should").

By: Rusty Newton (rnewton) 2014-06-16 12:59:10.077-0500

Using your extensions example and filling out some missing pieces I attempted to reproduce, but wasn't able to trigger a crash.

I used Asterisk version SVN-branch-12-r416338

Can you attach your pjsip.conf?

By: Gervasio Marchand (gervasio) 2014-06-16 13:14:17.740-0500

pjsip.conf

By: Gervasio Marchand (gervasio) 2014-06-16 13:14:30.773-0500

attached the pjsip.conf

By: Matt Jordan (mjordan) 2014-06-16 15:20:52.489-0500

What version of pjproject are you using?

By: Gervasio Marchand (gervasio) 2014-06-16 15:23:41.897-0500

downloaded it from https://github.com/asterisk/pjproject, the head is 21b3576112c98556a9753e3048bac5ba5a84881a

By: Rusty Newton (rnewton) 2014-06-16 17:16:18.645-0500

Still no luck in reproduction, even when copying your configuration closely. Can you attach an Asterisk log showing the whole call up until the crash?

Follow the [Collecting Debug Information|https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information] page and be sure that the log you attach includes both the VERBOSE and DEBUG log types, plus the output from "pjsip set logger on" (SIP packet trace).

By: Gervasio Marchand (gervasio) 2014-06-16 19:13:38.153-0500

This is the error log with VERBOSE and DEBUG. Not sure if it's important or not, but the device b68d677bcb7d is using chan_sip

By: Gervasio Marchand (gervasio) 2014-06-16 19:13:56.121-0500

file attached

By: Gervasio Marchand (gervasio) 2014-06-16 19:15:57.722-0500

Oh, and something that's probably obvious... I'm now using chan_sip on this server as well and that got rid of the problem... but as soon as I enabled pjsip to upload the log, it crashed on my third attempt

By: Rusty Newton (rnewton) 2014-06-17 09:03:02.669-0500

{quote}
This is the error log with VERBOSE and DEBUG. Not sure if it's important or not, but the device b68d677bcb7d is using chan_sip
{quote}

Your dialplan example, and your log show that the device is using res_pjsip and not chan_sip. What do you mean it is using chan_sip? Are you trying to use both SIP drivers at the same time?

{quote}
Oh, and something that's probably obvious... I'm now using chan_sip on this server as well and that got rid of the problem... but as soon as I enabled pjsip to upload the log, it crashed on my third attempt
{quote}

That at least shows that the bug is with res_pjsip, but doesn't help much more than that.


By: Gervasio Marchand (gervasio) 2014-06-17 09:08:38.948-0500

sorry, my bad... the device b68d677bcb7d is using the old sip driver. The Asterisk that's crashing is only using pjsip.

By: Rusty Newton (rnewton) 2014-06-17 09:10:34.646-0500

Ah I see that Asterisk is responding to this options right before crashing.

{noformat}
<--- Received SIP request (531 bytes) from UDP:190.134.55.175:5060 --->
OPTIONS sip:lx.gmc.uy SIP/2.0
Via: SIP/2.0/UDP 190.134.55.175:5060;branch=z9hG4bK664e4f79
Max-Forwards: 70
From: "asterisk" <sip:b68d677bcb7d@190.134.55.175>;tag=as617550b3
To: <sip:lx.gmc.uy>
Contact: <sip:b68d677bcb7d@190.134.55.175:5060>
Call-ID: 7df140065277b0d454aaad4b546607f9@190.134.55.175:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 12.0.0
Date: Tue, 17 Jun 2014 00:07:18 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
{noformat}


I noticed the user-agent in the options. Did you mean that the other Asterisk system (b68d677bcb7d) is using chan_sip for its channel driver? As opposed to the b68d677bcb7d pjsip device on the crashing system?

Edit: Just saw your comment "sorry, my bad... the device b68d677bcb7d is using the old sip driver. The Asterisk that's crashing is only using pjsip."

We refer to PJSIP/b68d677bcb7d or SIP/b68d677bcb7d as devices, so that was causing confusion. I understand now what you mean.

By: Gervasio Marchand (gervasio) 2014-06-17 09:26:38.302-0500

sorry, I think I'm messing things up and probably haven't been clear from the beginning. I have one Asterisk at home that runs Asterisk 12.0 and uses chan_sip. It registers on the Asterisk 12.3 that uses pjsip using the username b68d677bcb7d.

That's when Asterisk 12.3 breaks... when it connects to the device that runs chan_sip.

By: Gervasio Marchand (gervasio) 2014-06-21 18:36:43.229-0500

hey to everyone... this ticket is still assigned to me but I already submitted the feedback requested...

By: Rusty Newton (rnewton) 2014-06-24 18:55:10.066-0500

Well, this sounded like it would be really easy to reproduce, but I was unable to reproduce it after using your configuration and even tweaking it in a number of ways.

Is it possible for you to test with the latest SVN branches of 12 on both of those machines and see if you can still reproduce the issue at will? That is the only major difference that I can see superficially between my test and yours. If you can also send along your sip.conf configuration from the other system, that would be helpful.

If it isn't an issue that has already been fixed, then there is some nuance I'm not getting. I'm going to go ahead and open it up as it does appear you are seeing some sort of bug, but any further info you can provide on how to reproduce it would be helpful to the developers. Perhaps in simplifying your configuration you might narrow it down. See if you can reproduce it on a clean install with latest pjproject, latest 12, etc. See if you can reproduce it without the use of DISA or the Goto..



By: Gervasio Marchand (gervasio) 2014-06-25 07:36:27.852-0500

sure, I'll do that. I'm going to install Asterisk from SVN on both machines, using chan_sip on my home Asterisk and pjsip on my server. Can you send me the exact url of the svn repos you want me to try out?

By: Matt Jordan (mjordan) 2014-06-26 16:01:52.499-0500

It may also be useful to use the latest version of pjproject, since the crash is actually an assertion getting triggered there.

By: Gervasio Marchand (gervasio) 2014-06-26 16:04:46.584-0500

Sure, can you get me the urls to the repositories? If any of them are git repos, please provide the branches. Not sure if it may make sense for you to specify a commit (o revision in svn), to make sure we're talking about the same version

By: Rusty Newton (rnewton) 2014-06-27 11:25:00.100-0500

[~gervasio]

Asterisk SVN:   "svn co https://svn.asterisk.org/svn/asterisk/branches/12 asterisk-12-SVN"

For pjproject, "git clone https://github.com/asterisk/pjproject pjproject"

By: Joshua C. Colp (jcolp) 2014-12-01 09:44:52.564-0600

I'm closing this out as ASTERISK-24556 is a duplicate and has more information (valgrind information).