[BUG?] Asterisk crashes randomly, possible ODBC issue?

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

[BUG?] Asterisk crashes randomly, possible ODBC issue?

Postby csyria » Mon Jan 04, 2016 12:20 pm

Hello all,

I've got a weird issue on a new Asterisk 13.6.0 install. This is a fairly complex install, with ODBC logging for CDR and queue_log, and heavy use of multiple queues and AGI applications.

EDIT: Some details:
Asterisk is running on CentOS 7.2 64-bit
The database server is running on another CentOS 7.2 box. MariaDB Server version: 5.5.44-MariaDB

Periodically, I'm seeing the Asterisk process die and get rebooted by safe_asterisk (maybe a couple of times a week, usually late at night). However, it looks like this is happening consistently at the end of calls. So far, my users haven't reported an issue, either, so it seems like it might be dying after call completion.

In my /var/log/messages:
Code: Select all
Jan  4 00:47:35 HOSTNAME asterisk: /usr/sbin//safe_asterisk: line 164:  8661 Aborted                 (core dumped) nice -n $PRIORITY "${ASTSBINDIR}/asterisk" -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}


In /var/log/asterisk/messages, with verbose and debug enabled:
Code: Select all
[Jan  4 00:47:34] VERBOSE[21873][C-00000a5a] pbx.c: Executing [h@CONTEXT:5] NoOp("Local/3XXX@REDACTED-0000023b;2", "Call is completely over.") in new stack
[Jan  4 00:47:34] VERBOSE[21874][C-00000a5a] bridge_channel.c: Channel SIP/REDACTED-0000134d left 'simple_bridge' basic-bridge <c767def7-5d37-47ea-8522-fc91a04242eb>
[Jan  4 00:47:34] WARNING[9159] res_odbc.c: SetConnectAttr (Txn isolation) returned an error: HY000: [MySQL][ODBC 5.2(w) Driver]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '7' at line 1
[Jan  4 00:47:34] WARNING[9159] res_odbc.c: SQL Execute returned an error -1: 08S01: [MySQL][ODBC 5.2(w) Driver][mysqld-5.5.44-MariaDB]MySQL server has gone away (76)
[Jan  4 00:47:34] WARNING[9159] res_odbc.c: SQL Execute error -1! Verifying connection to asterisk-connector [asterisk-connector]...
[Jan  4 00:47:34] WARNING[9159] res_odbc.c: Connection is down attempting to reconnect...
[Jan  4 00:47:34] VERBOSE[21869][C-00000a5a] app_mixmonitor.c: MixMonitor close filestream (mixed)
[Jan  4 00:47:34] VERBOSE[21869][C-00000a5a] pbx.c: Executing [h@CONTEXT2:3] AGI("SIP/REDACTED-1-0000134c", "queue_hangup.php,1451889809.9861") in new stack
[Jan  4 00:47:40] Asterisk 13.6.0 built by root @ HOSTNAME on a x86_64 running Linux on 2015-12-11 17:46:18 UTC
[Jan  4 00:47:40] VERBOSE[22121] manager.c: Manager registered action DBGet


Now, I will say that I never noticed that ODBC error before when it has crashed, but I also had logging configured not to store as much verbosity.

I've also got coredumps. Unfortunately, they are from a build that was complied with optimizations.

Jan 4 crash: http://pastebin.com/9tyXj0zR
Dec 29 crash: http://pastebin.com/VavV0iB6

I know I really need DONT_OPTIMIZE for these core dumps, and I'll get one ASAP. I'll see if I can get this production Asterisk reinstalled during off-peak hours without optimizations, but in the interim, can anyone see from these dumps if there's anything I can do to make it stop crashing?
csyria
Newsterisk
 
Posts: 8
Joined: Thu Oct 10, 2013 3:18 am

Re: [BUG?] Asterisk crashes randomly, possible ODBC issue?

Postby penguinpbx » Tue Feb 02, 2016 11:45 am

In the hangup context 'h', have you tried DeadAGI instead of AGI ?

Also, what happens when you do not load the ODBC modules ?
penguinpbx
Oldsterisk
 
Posts: 79
Joined: Mon Dec 10, 2007 9:31 am
Location: Denver, Colorado, USA

Re: [BUG?] Asterisk crashes randomly, possible ODBC issue?

Postby david55 » Tue Feb 02, 2016 4:35 pm

DeadAGI is obsolete.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: [BUG?] Asterisk crashes randomly, possible ODBC issue?

Postby csyria » Tue Feb 02, 2016 5:50 pm

penguinpbx wrote:Also, what happens when you do not load the ODBC modules ?


This is a prod box so not having CDRs isn't going to fly... and unfortunately, it only seems to happen rarely, so I need those production calls going through it.

Thankfully, I finally got a real backtrace on this, so the issue has been submitted to the bugtracker. :)
csyria
Newsterisk
 
Posts: 8
Joined: Thu Oct 10, 2013 3:18 am


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 17 guests