[asterisk-bugs] [Asterisk 0010348]: Certain realtime IAX calls are causing an malloc error and crash

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Aug 21 11:11:10 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10348 
====================================================================== 
Reported By:                link55
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   10348
Category:                   Addons/res_config_mysql
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 77800 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-31-2007 17:31 CDT
Last Modified:              08-21-2007 11:11 CDT
====================================================================== 
Summary:                    Certain realtime IAX calls are causing an malloc
error and crash
Description: 
When using IAX realtime with res_config_mysql, after 1-2 minutes there is a
hard crash and core dump.  This has been reproduced in 1.4.9 and
SVN-trunk-r77800 with the latest asterisk-addons.  Attached are two GDB
traces showing the back trace and what I think might be causing the error -
a malformed SQL query.  I Xed out the IPs and usernames.
====================================================================== 

---------------------------------------------------------------------- 
 johann8384 - 08-21-07 11:11  
---------------------------------------------------------------------- 
root at deon:/var/log/asterisk# grep "Aug 21 " /var/log/asterisk/full | grep
-B 4 "Asterisk Event Logger Started"
[Aug 21 06:50:57] DEBUG[2535] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:50:57] DEBUG[2535] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 06:50:57] DEBUG[2535] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:50:57] DEBUG[2535] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 06:51:01] VERBOSE[3079] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 06:51:04] DEBUG[3088] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:51:04] DEBUG[3088] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 06:51:04] DEBUG[3088] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:51:04] DEBUG[3088] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 06:51:08] VERBOSE[3115] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 06:51:12] DEBUG[3124] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:51:12] DEBUG[3124] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 06:51:12] DEBUG[3124] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 06:51:12] DEBUG[3124] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 06:51:16] VERBOSE[3151] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 07:59:09] DEBUG[3160] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:09] DEBUG[3160] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 07:59:09] DEBUG[3160] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:09] DEBUG[3160] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 07:59:13] VERBOSE[3235] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 07:59:16] DEBUG[3244] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:16] DEBUG[3244] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 07:59:16] DEBUG[3244] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:16] DEBUG[3244] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 07:59:20] VERBOSE[3271] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 07:59:24] DEBUG[3280] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:24] DEBUG[3280] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 07:59:24] DEBUG[3280] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:24] DEBUG[3280] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 07:59:28] VERBOSE[3307] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 07:59:30] DEBUG[3316] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:30] DEBUG[3316] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 07:59:30] DEBUG[3316] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:30] DEBUG[3316] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 07:59:34] VERBOSE[3343] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 07:59:53] DEBUG[3352] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:53] DEBUG[3352] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 07:59:53] DEBUG[3352] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 07:59:53] DEBUG[3352] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 07:59:57] VERBOSE[3379] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 10:54:00] DEBUG[3388] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:00] DEBUG[3388] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 10:54:00] DEBUG[3388] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:00] DEBUG[3388] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 10:54:04] VERBOSE[4482] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 10:54:07] DEBUG[4491] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:07] DEBUG[4491] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 10:54:07] DEBUG[4491] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:07] DEBUG[4491] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 10:54:11] VERBOSE[4519] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
--
[Aug 21 10:54:15] DEBUG[4528] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:15] DEBUG[4528] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE host = '71.96.77.217' ORDER BY host
[Aug 21 10:54:15] DEBUG[4528] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug 21 10:54:15] DEBUG[4528] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM sip_users WHERE ipaddr = '71.96.77.217' ORDER BY ipaddr
[Aug 21 10:54:19] VERBOSE[4556] logger.c: Asterisk Event Logger Started
/var/log/asterisk/event_log
root at deon:/var/log/asterisk# 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-21-07 11:11  johann8384     Note Added: 0069179                          
======================================================================




More information about the asterisk-bugs mailing list