[asterisk-bugs] [JIRA] Created: (ASTERISK-20178) res_odbc crash after freetds dsn reconnects
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Thu Jul 26 17:44:21 CDT 2012
res_odbc crash after freetds dsn reconnects
-------------------------------------------
Key: ASTERISK-20178
URL: https://issues.asterisk.org/jira/browse/ASTERISK-20178
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Functions/func_odbc
Affects Versions: 10.4.2
Environment: CentOS 6.2 VM on a CentOS 6.3 KVM host cluster
Reporter: Noah Engelberth
Assignee: Noah Engelberth
I have an Asterisk Open Source 10 system set up that is using res_odbc to connect to a MSSQL database so that our users can clock in/out on our timeclock system from their phones. I've been having a consistent issue with Asterisk crashing (completely restarting and dropping active calls) when there is a network disruption that severs the connection between Asterisk and the MSSQL server while someone is trying to punch the timeclock.
The setup is as follows:
Asterisk 10.4 (also had same issues on 10.2) running on CentOS 6.2 (VM on a CentOS 6.3 KVM host cluster) - connected to Voice VLAN
- freetds installed from epel yum repository, 0.91-2.el6 (most current version available on epel)
- unixODBC & unixODBC-devel 2.2.14-11.el6 installed
- Asterisk also has an ODBC connection to a local MySQL server configured and in use for a separate purpose
MSSQL 2008 R2 running on Server 2008 R2 (VM on a CentOS 6.3 KVM host cluster) - connected to Data VLAN
[Edit by Rusty Newton - config file contents attached as config_files.txt]
The steps to replicate the crash are:
1) Network disruption that prevents the Asterisk server from communicating with the MSSQL server occurs.
2) While the network disruption is ongoing, a user dials into the Asterisk server's timeclock extension and inputs their employee ID, which causes Asterisk to perform a lookup on the MSSQL server.
3) Asterisk "hangs" for 3-5 minutes while it waits for the ODBC connection to the MSSQL server.
4) I get made aware of the problem and log in to Asterisk.
5) I execute "module reload res_odbc.so" and Asterisk reconnects successfully to the ODBC connection and can process new calls to the timeclock.
6) The "hung" calls continue to show in "core show channels" even after the user hangs up and tries again (for what it's worth users, typically create 3-4 hung calls each before one or more of them let me know. I've seen anywhere from 5-20 hung calls at the times I've logged in to try to reconnect the ODBC connection).
7) Asterisk crashes during or shortly after the module reload. Sometimes I've sent one or more "channel request hangup" commands from the Asterisk CLI for the hung calls. Sometimes it crashes immediately on the module reload, sometimes it runs for a few minutes after the reload. I don't think it's ever run more than 5 minutes after I reload the ODBC connections.
backtrace is attached (was generated by a version of Asterisk without DONT_OPTIMIZE -- I've recompiled and will restart my system with DONT_OPTIMIZE as soon as call volume permits, but don't know when the requisite network disruption will occur to cause another crash.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list