[asterisk-bugs] [Asterisk 0017964]: [patch] Crash with autoclear=yes with MYSQL() application

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 6 14:24:15 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17964 
====================================================================== 
Reported By:                wuwu
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17964
Category:                   Addons/app_addon_sql_mysql
Reproducibility:            random
Severity:                   crash
Priority:                   none
Status:                     ready for testing
Asterisk Version:           1.6.2.11 
JIRA:                       SWP-2321 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-09-08 02:13 CDT
Last Modified:              2011-05-06 14:24 CDT
====================================================================== 
Summary:                    [patch] Crash with autoclear=yes with MYSQL()
application
Description: 
i am experiencing random segfaults on different asterisk 1.6.2.x (9-10)
versions - always 64bit plattform - mostly centos 5.5 - one debian version.

the backtrace does look like this

https://issues.asterisk.org/view.php?id=0  0x000072656c6c6143 in ?? ()
https://issues.asterisk.org/view.php?id=1  0x00002aaaaaf22a91 in ?? () from
/usr/lib64/mysql/libmysqlclient.so.15
https://issues.asterisk.org/view.php?id=2  0x00002aaaaaf22e09 in my_net_read ()
from
/usr/lib64/mysql/libmysqlclient.so.15
https://issues.asterisk.org/view.php?id=3  0x00002aaaaaf1c6e2 in cli_safe_read
() from
/usr/lib64/mysql/libmysqlclient.so.15
https://issues.asterisk.org/view.php?id=4  0x00002aaaaaf1d7d9 in ?? () from
/usr/lib64/mysql/libmysqlclient.so.15
https://issues.asterisk.org/view.php?id=5  0x00002aaaaaf1bd1e in
mysql_real_query () from
/usr/lib64/mysql/libmysqlclient.so.15
https://issues.asterisk.org/view.php?id=6  0x00002aaab104397f in mysql_init ()
from
/usr/lib/asterisk/modules/app_addon_sql_mysql.so
https://issues.asterisk.org/view.php?id=7  0x00000000004b288d in pbx_exec
(c=0x2aaaac074570, app=0x2aaab443d180,
data=0x4062f990) at pbx.c:1348
https://issues.asterisk.org/view.php?id=8  0x00000000004bdcdc in
pbx_extension_helper (c=0x2aaaac074570,
con=<value optimized out>, context=0x2aaaac074930 "enterPICA",
exten=0x2aaaac074980 "118899", priority=15, label=0x0, 
    callerid=0x2aaaac07f210 "00436763621526", action=E_SPAWN,
found=0x4063200c, combined_find_spawn=1) at pbx.c:3711
https://issues.asterisk.org/view.php?id=9  0x00000000004c24e2 in
ast_spawn_extension (c=0x2aaaac074570, args=0x0)
at pbx.c:4181
https://issues.asterisk.org/view.php?id=10 __ast_pbx_run (c=0x2aaaac074570,
args=0x0) at pbx.c:4275
https://issues.asterisk.org/view.php?id=11 0x00000000004c3abb in pbx_thread
(data=0x2aaab4498c40) at pbx.c:4562
https://issues.asterisk.org/view.php?id=12 0x00000000004fdfbc in dummy_start
(data=<value optimized out>) at
utils.c:968
https://issues.asterisk.org/view.php?id=13 0x000000384880673d in start_thread ()
from /lib64/libpthread.so.0
https://issues.asterisk.org/view.php?id=14 0x00000038480d3d1d in clone () from
/lib64/libc.so.6

I do make heavy use of the MYSQL functions - in the database there are
also some stored procedures and triggers and functions - also there are
some multi resultset results in my queries (where i only use the first
resultset)

I now don't know exactly - will this be more a libmysqlclient bug - or is
it more a asterisk bug.

The segfault does always show the same backtrace - so it should be more a
libmysql specific bug - or i am wrong ?

Should i do compile the libmysqlclient for myself to get the debugging
symbols ?
====================================================================== 

---------------------------------------------------------------------- 
 (0134590) svnbot (reporter) - 2011-05-06 14:24
 https://issues.asterisk.org/view.php?id=17964#c134590 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 317837

U   branches/1.8/addons/app_mysql.c

------------------------------------------------------------------------
r317837 | russell | 2011-05-06 14:24:14 -0500 (Fri, 06 May 2011) | 11
lines

Fix a crash in the MySQL() application.

This code was not handling channel datastores safely.  The channel
must be locked.

(closes issue https://issues.asterisk.org/view.php?id=17964)
Reported by: wuwu
Patches:
      issue17964_addon_1.6.2_svn.patch uploaded by seanbright (license 71)
Tested by: wuwu

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=317837 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-06 14:24 svnbot         Checkin                                      
2011-05-06 14:24 svnbot         Note Added: 0134590                          
======================================================================




More information about the asterisk-bugs mailing list