[asterisk-bugs] [Asterisk 0019180]: [patch] Random crashes (NULL reference) at res_odbc.c:1358

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 26 08:08:32 CDT 2011


The following issue is now READY FOR REVIEW. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19180 
====================================================================== 
Reported By:                pruiz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19180
Category:                   Resources/res_odbc
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     ready for review
Asterisk Version:           1.8.3.3 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-04-25 17:06 CDT
Last Modified:              2011-04-26 08:08 CDT
====================================================================== 
Summary:                    [patch] Random crashes (NULL reference) at
res_odbc.c:1358
Description: 
Randomly, a our asterisk servers (4 nodes running 1.8.3.2), crash due to an
invalid/null reference at res_odbc.c

After inspecting the coredump files it is crearly a null reference, as can
be seen on the following output from GDB:

https://issues.asterisk.org/view.php?id=0  0x00002aaaabb526ac in
_ast_odbc_request_obj2 (name=0x42037920
"sipper-con", flags=<value optimized out>, file=<value optimized out>,
function=<value optimized out>,
    lineno=<value optimized out>) at res_odbc.c:1358
1358                    if (time(NULL) >
class->last_negative_connect.tv_sec +
class->negative_connection_cache.tv_sec) {
(gdb) bt
https://issues.asterisk.org/view.php?id=0  0x00002aaaabb526ac in
_ast_odbc_request_obj2 (name=0x42037920
"sipper-con", flags=<value optimized out>, file=<value optimized out>,
function=<value optimized out>,
    lineno=<value optimized out>) at res_odbc.c:1358
https://issues.asterisk.org/view.php?id=1  0x00002aaacda516b0 in update_odbc
(database=0x42037920 "sipper-con",
table=0x42037820 "sipregs1", keyfield=0x2aaaad715408 "name", lookup=<value
optimized out>,
    ap=<value optimized out>) at res_config_odbc.c:497
https://issues.asterisk.org/view.php?id=2  0x000000000047e441 in
ast_update_realtime ()
https://issues.asterisk.org/view.php?id=3  0x00002aaaad6fa101 in update_peer
(p=0x2aaadc7f3ee8, addr=0x42039f10,
req=0x420394b0, uri=<value optimized out>) at chan_sip.c:4231
https://issues.asterisk.org/view.php?id=4  register_verify (p=0x2aaadc7f3ee8,
addr=0x42039f10, req=0x420394b0,
uri=<value optimized out>) at chan_sip.c:13856
https://issues.asterisk.org/view.php?id=5  0x00002aaaad6fa63d in
handle_request_register (p=0x2aaadc7f3ee8,
req=0x420394b0, addr=0x42039f10, e=0x208fb001 "sip:77.240.122.36:5060") at
chan_sip.c:23482
https://issues.asterisk.org/view.php?id=6  0x00002aaaad70b8ce in handle_incoming
(p=0x2aaadc7f3ee8,
req=0x420394b0, addr=0x42039f10, recount=0x42039464, nounlock=0x42039460)
at chan_sip.c:23752
https://issues.asterisk.org/view.php?id=7  0x00002aaaad70c670 in
handle_request_do (req=0x420394b0,
addr=0x42039f10) at chan_sip.c:24036
https://issues.asterisk.org/view.php?id=8  0x00002aaaad70cfb9 in sipsock_read
(id=<value optimized out>,
fd=<value optimized out>, events=<value optimized out>, ignore=<value
optimized out>) at chan_sip.c:23934
https://issues.asterisk.org/view.php?id=9  0x00000000004c0f13 in ast_io_wait ()
https://issues.asterisk.org/view.php?id=10 0x00002aaaad6e015b in do_monitor
(data=<value optimized out>) at
chan_sip.c:24451
https://issues.asterisk.org/view.php?id=11 0x000000000053104c in dummy_start ()
https://issues.asterisk.org/view.php?id=12 0x00000030e420673d in start_thread ()
from /lib64/libpthread.so.0
https://issues.asterisk.org/view.php?id=13 0x00000030e3ad3d1d in clone () from
/lib64/libc.so.6
(gdb) p class
$1 = (struct odbc_class *) 0x0



====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-26 08:08 lmadsen        Status                   new => ready for review
======================================================================




More information about the asterisk-bugs mailing list