[Home]

Summary:ASTERISK-24893: PJSIP unhandled exception PJLIB/No memory
Reporter:Ross Beer (rossbeer)Labels:
Date Opened:2015-03-18 04:01:13Date Closed:2015-03-26 05:58:53
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:12.8.1 13.1.0 13.1.1 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-24912 pjsip segmentation fault in pjmedia_sdp_attr_clone(../src/pjmedia/sdp.c:134)
Environment:Centos 6.6Attachments:( 0) backtrace_2015-03-19T08_16_08+0000.txt
( 1) backtrace_2015-03-19T13_01_33.txt
( 2) backtrace_2015-03-19T13_05_27.txt
( 3) backtrace_2015-03-19T14_59_23.txt
( 4) valgrind.txt
( 5) valgrind-20-03-2015_1443.txt
( 6) valgrind-20-03-2015.txt
Description:[Mar 18 08:51:40] ERROR[25493]: pjsip:0 <?>:          except.c .....!!!FATAL: unhandled exception PJLIB/No memory!

The above error causes Asterisk to crash, the machine has 16GB ram and is not using any swap. Is there a buffer set that is not expanding or has a limit set?
Comments:By: Ross Beer (rossbeer) 2015-03-19 08:24:33.268-0500

Back trace looks like the issue is with clone.c

By: Matt Jordan (mjordan) 2015-03-19 13:07:23.919-0500

I'd suspect there is a memory leak someplace. Have you attempted to run under valgrind or with {{MALLOC_DEBUG}}?

By: Ross Beer (rossbeer) 2015-03-19 14:12:37.916-0500

I have attached the valgrind output, it made asterisk unusable as it was processing everything very slowly. Does this help?

By: Matt Jordan (mjordan) 2015-03-19 14:27:16.965-0500

Alas, no, although it does show that {{pbx_realtime}} continues to do weird things :-\

I probably should have started with earlier questions before pulling out the valgrind hammer (although if there was a memory leak, it will almost always catch it).

# Is Asterisk consuming an increasing amount of memory?
# Can you reproduce this in a more controlled environment than your production environment?
** If so, what dialplan actions are being taken?
** What PJSIP messages are being performed (pjsip set logger on)?
# If you can't reproduce this but memory is increasing, than is the memory increasing constantly, or does it only appear to go up during certain periods of activity?

If we can isolate what is going on, we can probably recommend some other steps to try and get more information.

By: Ross Beer (rossbeer) 2015-03-19 15:51:15.969-0500

I don't think we are doing anything out of the norm, one thing we do use which many may not is PJSIP_HEADER(add,X-MyHeader)= to pass information between servers.

The crash time is random, sometimes 13.1-cert1 crashes within minutes and sometimes it takes 3 hours and process thousands of calls. I have tried Asterisk 13.2, 13.1.1, 13.0 and 12.8.1 so its something inherent in the PJSIP driver.

The back traces seam to show different issues, one relating to pjlib and the latest one, which was on an alternate server shows caller id issues.

The same config is used on Asterisk 1.8 and also Asterisk 11 using chan_sip without issue.



By: Ross Beer (rossbeer) 2015-03-20 09:34:25.680-0500

I have been running valgrind in a test server running Asterisk 13.2.0 and it appears that there is a leak, please see attached.

By: Joshua C. Colp (jcolp) 2015-03-26 05:58:53.849-0500

Closing this out in favor of ASTERISK-24912.