# Asterisk crashes from time to time after upgrade to 13.17.0

**URL:** <https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020>\
**Category:** Asterisk Support\
**Created:** [September 15, 2017, 2:08pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020 "2017-09-15T14:08:46Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [September 15, 2017, 2:08pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/1 "2017-09-15T14:08:46Z")

</div>

Hi,

I am running FreePBX distro with asterisk 13.17.0. After I performed an upgrade to this version, asterisk became unstable and crashes once or twice a week.

I have around 500 extensions all on the PJSIP, with approx. 250 online. Usually no more than 40 calls are present at any given time. There is no problem with CPU utilization (0.5 from 8), memory, swapping or network issues I can detect.

Backtrace from the last crash core can be found here: [backtrace](https://pastebin.com/raw/n7g70Bxv)

Before an upgrade, I ran Asterisk 13.15 with no significant issues.

Any suggestion on how to track the problem and if possible fix it is welcome.

Thank you

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [September 15, 2017, 2:12pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/2 "2017-09-15T14:12:56Z")

</div>

Your backtrace is optimized so it’s not really useful except to say it may have been something in SIP. The wiki[1] has details on how to enable the things to ensure that the backtrace is useful.

[1] [https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace](https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace)

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [September 15, 2017, 2:31pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/3 "2017-09-15T14:31:39Z")

</div>

The backtrace is not only optimised, it is from a build without debug symbols.

FreePBX users tend to use pre-built versions of Asterisk, so generally have problems creating a debug build, especially one that matches the one in use.

This may be helpful, although I have a feeling it only solves the lack of debug symbols and not the optimisation issue: [https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-Backtraces(Segfaults/CoreDumps/AsteriskCrashing)](https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-Backtraces(Segfaults/CoreDumps/AsteriskCrashing))

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [September 15, 2017, 2:32pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/4 "2017-09-15T14:32:48Z")

</div>

Ah yes, I forgot about FreePBX. Thanks for the link.

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [September 15, 2017, 2:39pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/5 "2017-09-15T14:39:23Z")

</div>

Thank you for an answer. Maybe I did something wrong, but my “core show settings” tells me otherwise:

PBX Core settings

Version: 13.17.0  
Build Options: DONT\_OPTIMIZE, COMPILE\_DOUBLE, OPTIONAL\_API

I have tried the script from the page you suggested, now core-full.txt looks as follows: [core-full.txt](https://pastebin.com/raw/n1W3M26Z)

I cannot tell anything about the debug symbols though. As for the FreePBX page, using the command from there I got the previous trace.

Thank you both very much.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [September 15, 2017, 2:45pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/6 "2017-09-15T14:45:03Z")

</div>

Stuff still seems to be optimized and not overly useful. I’m not familiar with the FreePBX environment so I don’t really know how best to get it within their world.

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [September 15, 2017, 2:49pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/7 "2017-09-15T14:49:56Z")

</div>

Very well, thank you Joshua, I will ask there how to make the debug usable for you guys as well. I will paste it here again, if I move somewhere.

Thank you very much for your time.

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [October 2, 2017, 5:06pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/8 "2017-10-02T17:06:15Z")

</div>

Hi again,

I downgraded to asterisk 13.16 and it took it 14 days before the crash occured. I created a backtrace that is hopefully of some use now. You can find it in the link below. Could you please tell me if there is something that is possible to learn from the backtrace so that I can prevent crashes from occuring? In syslog, there is a message:

asterisk[18584]: segfault at 7f3632322e6e ip 00007fafc228472f sp 00007fafbcc80710 error 4 in libasteriskpj.so.2[7fafc2204000+180000]

Therefore I assume it is connected to PJSIP somehow and probably switching back to chan\_sip might solve the issue. My preference is to stick with PJSIP though.

Link to a backtrace: [backtrace](https://pastebin.com/raw/770KH4WC)

Any opinion/advice is welcome. Thank you.

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [October 8, 2017, 11:19am UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/9 "2017-10-08T11:19:33Z")

</div>

is there really no-one that could point me to a direction on how to solve this?

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [October 9, 2017, 4:24pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/10 "2017-10-09T16:24:50Z")

</div>

Someone has to dig in and try to identify the particular case and situation that is causing the crash. I can say it’s not a crash I’ve ever seen before. You can file an issue on the issue tracker[1] but I have no time frame on when it would get looked into.

[1] [https://issues.asterisk.org/jira](https://issues.asterisk.org/jira)

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [October 9, 2017, 4:41pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/11 "2017-10-09T16:41:42Z")

</div>

Thank you, Joshua. It is perfectly fine, I understand you guys are pretty busy. I will do as you say.

Thank you very much for your time and effort.

---

<div class="post-metadata">

**Author:** ![stevensedory](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stevensedory](https://community.asterisk.org/u/stevensedory)\
**Post date:** [October 10, 2017, 8:22pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/12 "2017-10-10T20:22:01Z")

</div>

Having the same issue you are. Have posted on these forums, as well as FreePBX. However, I’m using chan\_sip only.

What are you doing in the meantime? Just taking the crashes, or have you reverted to an older version of Asterisk?

---

<div class="post-metadata">

**Author:** ![stevensedory](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stevensedory](https://community.asterisk.org/u/stevensedory)\
**Post date:** [October 10, 2017, 8:32pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/13 "2017-10-10T20:32:22Z")

</div>

Also, is this a VM? If so, running on KVM?

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://community.asterisk.org/u/loki)\
**Post date:** [October 11, 2017, 8:28am UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/14 "2017-10-11T08:28:43Z")

</div>

Well, I downgraded to 13.16 and the problem became much less frequent (with 13.17 I got a crash every 3-4 days, now I am on once a fortnight). 13.15 worked for me with same configuration for two months with just higher CPU spikes than I am used to. PJSIP is probably not so production-ready as it is presented everywhere and needs a lot of optimization effort devoted to it.

In syslog, I always get pjproject errors in time of crash, so I strongly believe my issue is connected directly or indirectly with PJPROJECT. But I cannot be sure, since my knowledge of Asterisk code is very limited and level of understanding of backtraces is close to zero.

To the second question, yes I run it on KVM. I have been through a lot of sources telling the old kernel 2.6.32 (FreePBX has this one) can have some trouble on KVM, so I hoped upgrading to SNG7 might mitigate the issue, but there is no production ready upgrade path as far as I know.

---

<div class="post-metadata">

**Author:** ![stevensedory](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stevensedory](https://community.asterisk.org/u/stevensedory)\
**Post date:** [October 16, 2017, 7:42pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/15 "2017-10-16T19:42:55Z")

</div>

> [@loki](#):
>
> yes I run it on KVM

This is a pattern I keep noticing. That said, the Sangoma team says they use KVM as well, though not sure what favor. We’re using proxmox 4.4.

Are you using TCP or SIP, or just UDP?

---

<div class="post-metadata">

**Author:** ![surp](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@surp](https://community.asterisk.org/u/surp)\
**Post date:** [October 18, 2017, 3:05pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/16 "2017-10-18T15:05:51Z")

</div>

You should contact Sangoma. They made the decision to create their own OS and their own RPMs for their distro so they need to provide support for things like this themselves.

I was running that version of Asterisk on KVM for awhile and haven’t had any problems but I compile it from source.

---

<div class="post-metadata">

**Author:** ![stevensedory](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stevensedory](https://community.asterisk.org/u/stevensedory)\
**Post date:** [October 18, 2017, 7:47pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/17 "2017-10-18T19:47:37Z")

</div>

> [@surp](#):
>
> I was running that version of Asterisk on KVM for awhile and haven’t had any problems but I compile it from source.

Thanks for your input.

Did you compile asterisk with any specifics? And it sounds like you aren’t running it on KVM anymore? If not, why?

---

<div class="post-metadata">

**Author:** ![surp](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@surp](https://community.asterisk.org/u/surp)\
**Post date:** [October 20, 2017, 2:41pm UTC](https://community.asterisk.org/t/asterisk-crashes-from-time-to-time-after-upgrade-to-13-17-0/72020/18 "2017-10-20T14:41:51Z")

</div>

> [@stevensedory](#):
>
> Did you compile asterisk with any specifics?

My experience is that you have to disable BUILD\_NATIVE for KVM. I don’t think that is your problem because as far as I know the RPM’s already do that.

[https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk#BuildingandInstallingAsterisk-Buildingfornon-nativearchitectures](https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk#BuildingandInstallingAsterisk-Buildingfornon-nativearchitectures)
