[Home]

Summary:ASTERISK-25384: Regular Asterisk crashes when using Page application. "user_data is NULL"
Reporter:Chet Stevens (cwstevens)Labels:
Date Opened:2015-09-09 09:14:16Date Closed:2015-09-23 11:48:45
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Applications/app_page
Versions:13.1.0 13.5.0 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Asterisk certified/13.1-cert3-rc1 (snapshot 88ee3b3 dated 8/31/15) PJSIP with PJProject 2.4.5 DAHDI 2.10.2 libpri version: 1.4.15 Digium Phone Module for Asterisk Version 13.0_2.2.0 Digium Phone firmware 2_0_1_0_74452 Ubuntu Server 14.04.1 LTS (GNU/Linux 3.13.0-37-generic x86_64) HP ProLiant DL380p Gen8 with 16 GB memory Wildcard AEX2400: wctdm24xxp+ Wildcard TE420 (5th Gen): wct4xxp+Attachments:( 0) backtrace.txt
( 1) debug.zip
( 2) extensions_excerpt.conf
Description:We have been experiencing crashes/segfaults in Asterisk on a regular basis on multiple servers when attempting to use the Page application. This happens roughly half the times the application is used. Normally the last thing seen in the log is one or more lines of:
{noformat}
[Sep  9 06:31:21] ERROR[637][C-0000001a] astobj2.c: user_data is NULL
{noformat}

A backtrace, debug for the minute of the crash with previous 100k lines, and an excerpt of the dialplan used for the Page will be attached. For reference the time of the crash is:
{noformat}
Sep  9 06:31:21 0099-Education-Center kernel: [ 4194.978848] asterisk[637]: segfault at 95c ip 0000000000466220 sp 00007fa4578321a0 error 4 in asterisk[400000+2ab000]
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2015-09-09 09:14:18.073-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Chet Stevens (cwstevens) 2015-09-09 09:23:29.828-0500

backtrace.txt
debug.zip: debug.txt with minute of crash with previous 100k lines.
extensions_excerpt.conf: Dialplan used for paging.

By: Chet Stevens (cwstevens) 2015-09-09 09:37:23.166-0500

Just a brief description of the dialplan for this example.

1. [globals] has page group defined with list (page_group_ns_south) of extension numbers.
2. User presses key on extension which dials "Page_NS_South" in [features].
3. GoSub to [sub_page] passing "NS_South" as argument.
4. Iterate through list of extensions and build dial string excluding extensions that are INVALID, UNAVAILABLE, or the extension performing the page. (ex.  PJSIP/5830_line&PJSIP/5896_line).
5. Page using the 'b' option to call [sub_add_headers] passing "Alert-Info" and "intercom" as arguments.
6. [sub_add_headers] adds in the SIP header to make the extensions auto off-hook.

We had previously been using similar dialplan with Chan_SIP with the exception of the "b" option.

By: Chet Stevens (cwstevens) 2015-09-09 09:38:47.362-0500

Also, we have been unable to reproduce this in a lab environment but can reproduce it regularly on production systems.

By: Richard Mudgett (rmudgett) 2015-09-21 17:45:53.298-0500

The problem is happening because some of the Page calls are being forwarded and you have a predial handler trying to execute on the forwarded channel.  You may want to consider using the {{i}} option to disallow forwarding on the paged calls.

By: Chet Stevens (cwstevens) 2015-09-22 09:16:44.381-0500

Tested and confirmed! Thank you so much! We often use the 'i' option with the Dial app but I didn't think to use it on the Page app. This is now fixed for us.

By: Richard Mudgett (rmudgett) 2015-09-22 17:36:47.732-0500

Patches up on gerrit:
https://gerrit.asterisk.org/#/c/1299/ for v13
https://gerrit.asterisk.org/#/c/1300/ for master
https://gerrit.asterisk.org/#/c/1301/ for certified/v13.1