[Home]

Summary:ASTERISK-14161: segmentation fault in Asterisk caused by fun_odbc
Reporter:rosa (rosa)Labels:
Date Opened:2009-05-19 04:27:46Date Closed:2011-06-07 14:00:26
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Functions/func_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk dies with a segfautl signall 11 for a query to a mysql database connected by odbc.

The syslog:

asterisk[32408]: segfault at 00000000000002e0 rip 00002aaaaadd584e rsp 0000000040afd890 error 4

It's strange because this happens once every 2 weeks.

The version of unixodbc is 2.2.11, asterisk 1.4.21.2, zaptel 1.4.12.1
The distribution is Debian 4.0 with kernel 2.6.18-5-amd64



****** ADDITIONAL INFORMATION ******

I've attached the core output, and the bt full also.

#0  0x00002aaaaadd584e in SQLCloseCursor () from /usr/lib/libodbc.so.1
(gdb)
(gdb) bt
#0  0x00002aaaaadd584e in SQLCloseCursor () from /usr/lib/libodbc.so.1
#1  0x00002aaaad00b861 in acf_odbc_write (chan=0x2aaab740f290, cmd=<value optimized out>, s=<value optimized out>, value=0x40afe94c "1") at func_odbc.c:202
#2  0x000000000047c30b in pbx_builtin_setvar_helper (chan=0x2aaab740f290, name=0x40afe930 "REGISTRO_LOGUEO(3009|00783)", value=0x40afe94c "1") at pbx.c:5869
#3  0x000000000047c697 in pbx_builtin_setvar (chan=0x2aaab740f290, data=<value optimized out>) at pbx.c:5942
#4  0x00000000004805ab in pbx_extension_helper (c=0x2aaab740f290, con=<value optimized out>, context=0x2aaab740f4e0 "manlui", exten=0x2aaab740f530 "000",
   priority=17, label=<value optimized out>, callerid=0x2aaab7405a60 "3009", action=E_SPAWN) at pbx.c:537
ASTERISK-1  0x000000000048289e in __ast_pbx_run (c=0x2aaab740f290) at pbx.c:2317
ASTERISK-2  0x0000000000483529 in pbx_thread (data=0x2aaaaaf27dc0) at pbx.c:2636
ASTERISK-3  0x00000000004aca0c in dummy_start (data=<value optimized out>) at utils.c:895
ASTERISK-4  0x00002abed3df7f1a in start_thread () from /lib/libpthread.so.0
ASTERISK-5  0x00002abed43c46c2 in clone () from /lib/libc.so.6
ASTERISK-6 0x0000000000000000 in ?? ()
(gdb)


The bt full:


Core was generated by `/usr/sbin/asterisk'.                                        
Program terminated with signal 11, Segmentation fault.                            
#0  0x00002aaaaadd584e in SQLCloseCursor () from /usr/lib/libodbc.so.1            
(gdb) bt full                                                                      
#0  0x00002aaaaadd584e in SQLCloseCursor () from /usr/lib/libodbc.so.1            
No symbol table info available.                                                    
#1  0x00002aaaad00b861 in acf_odbc_write (chan=0x2aaab740f290, cmd=<value optimized out>, s=<value optimized out>, value=0x40afe94c "1") at func_odbc.c:202
       obj = (struct odbc_obj *) 0x651fe0                                                                                                                
       query = (struct acf_odbc_query *) 0x6990e0                                                                                                        
       t = 0x40afd9c0 "1"                                                                                                                                
       buf = "INSERT INTO agentes values('3009','00783',NOW(),1)", '\0' <repeats 1997 times>                                                              
       varname = "1\000L1\000\000\000\000\236?6?*"                                                                                                        
       i = <value optimized out>                                                                                                                          
       bogus_chan = 0                                                                                                                                    
       values = {argc = 1, argv = 0x40afe538, field = {0x40afd9c0 "1", 0x0 <repeats 99 times>}}
       args = {argc = 2, argv = 0x40afe208, field = {0x40afe8d0 "3009", 0x40afe8d5 "00783", 0x0 <repeats 98 times>}}
       stmt = (SQLHSTMT) 0x801b00
       rows = 1
       __PRETTY_FUNCTION__ = "acf_odbc_write"
#2  0x000000000047c30b in pbx_builtin_setvar_helper (chan=0x2aaab740f290, name=0x40afe930 "REGISTRO_LOGUEO(3009|00783)", value=0x40afe94c "1") at pbx.c:5869
       curelm = <value optimized out>
       newvariable = <value optimized out>
       headp = <value optimized out>
       nametail = <value optimized out>
#3  0x000000000047c697 in pbx_builtin_setvar (chan=0x2aaab740f290, data=<value optimized out>) at pbx.c:5942
       name = 0x40afe930 "REGISTRO_LOGUEO(3009|00783)"
       value = 0x0
       argc = <value optimized out>
       argv = {0x40afe930 "REGISTRO_LOGUEO(3009|00783)", 0x0 <repeats 23 times>}
       global = 0
       x = 0
       __PRETTY_FUNCTION__ = "pbx_builtin_setvar"
#4  0x00000000004805ab in pbx_extension_helper (c=0x2aaab740f290, con=<value optimized out>, context=0x2aaab740f4e0 "manlui", exten=0x2aaab740f530 "000",
   priority=17, label=<value optimized out>, callerid=0x2aaab7405a60 "3009", action=E_SPAWN) at pbx.c:537
       e = <value optimized out>
       app = (struct ast_app *) 0x649670
       res = <value optimized out>
       q = {incstack = {0x7aa8f8 "manlui", 0x0 <repeats 127 times>}, stacklen = 1, status = 5, swo = 0x0, data = 0x0, foundcontext = 0x7ab162 "servicios"}
       passdata = "REGISTRO_LOGUEO(3009|00783)=1", '\0' <repeats 8162 times>
       matching_action = <value optimized out>
       __PRETTY_FUNCTION__ = "pbx_extension_helper"
ASTERISK-1  0x000000000048289e in __ast_pbx_run (c=0x2aaab740f290) at pbx.c:2317
       waittime = <value optimized out>
       dst_exten = "\000\000\000\000\000\000\000\000\220~??*", '\0' <repeats 18 times>, "?0?@\000\000\000\000?0?@", '\0' <repeats 12 times>, "?0?@", '\0' <repeats 20 times>, " 1?@", '\0' <repeats 45 times>, "1?@\000\000\000\000\b1?@\000\000\000\000\0201?@\000\000\000\000\0301?@\000\000\000\000(1?@", '\0' <repeats 12 times>, "01?@\000\000\000\000?@S?*\000\000\000\000\000\000\000\000\000\000\030\000\000\000\000\000\000\000??\226\000\000\000\000\000a\f\002\000\000\000\000\000\020\000A??*\000\0006\2176?*\000\0000\000A??*\000\0000\000A??*\000"
       pos = 0
       digit = 0
       found = 1
       res = 0
       error = <value optimized out>
       __PRETTY_FUNCTION__ = "__ast_pbx_run"
ASTERISK-2  0x0000000000483529 in pbx_thread (data=0x2aaaaaf27dc0) at pbx.c:2636
No locals.
ASTERISK-3  0x00000000004aca0c in dummy_start (data=<value optimized out>) at utils.c:895
       __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {46912707297328, 0, 0, 1085290848, 1085289104, 46912707297296, 1085288768, 4901362},
     __mask_was_saved = 0}}, __pad = {0x40b03200, 0x0, 0x2abed452eb08, 0x2abed452eb10}}
---Type <return> to continue, or q <return> to quit---
       __cancel_arg = (void *) 0x40b03960
       not_first_call = <value optimized out>
       ret = <value optimized out>
ASTERISK-4  0x00002abed3df7f1a in start_thread () from /lib/libpthread.so.0
No symbol table info available.
ASTERISK-5  0x00002abed43c46c2 in clone () from /lib/libc.so.6
No symbol table info available.
ASTERISK-6 0x0000000000000000 in ?? ()
No symbol table info available.
Comments:By: Tilghman Lesher (tilghman) 2009-05-19 10:05:35

Please set idlecheck to 3600.