[Home]

Summary:ASTERISK-15143: ODBC Crash in 1.6.0.18-rc2
Reporter:Mark Murawski (kobaz)Labels:
Date Opened:2009-11-16 09:28:05.000-0600Date Closed:2009-12-16 22:57:00.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Resources/res_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt
Description:Doing a simple odbc query will crash asterisk

Error while executing the query (77)
[Nov 16 10:13:07] WARNING[17379]: func_odbc.c:191 generic_execute: SQL Exec Direct failed (-1)![UPDATE asterisk.log_calls SET status = 'CALLEE PICKUP', call_pickup_time = NOW(), caller_to_channel = 'SIP/201-00000004', caller_to_uniqueid = '1258384379.23' WHERE call_log_id = '']
[Nov 16 10:13:07] WARNING[17379]: res_odbc.c:583 ast_odbc_direct_execute: SQL Exec Direct failed.  Attempting a reconnect...
[Nov 16 10:13:07] DEBUG[17379]: res_odbc.c:1392 odbc_obj_disconnect: Disconnected 0 from pbx [pbx]
[Nov 16 10:13:07] DEBUG[17379]: res_odbc.c:1400 odbc_obj_disconnect: Database handle deallocated
[Nov 16 10:13:07] NOTICE[17379]: res_odbc.c:1427 odbc_obj_connect: Connecting pbx
[Nov 16 10:13:07] NOTICE[17379]: res_odbc.c:1455 odbc_obj_connect: res_odbc: Connected to pbx [pbx]
[Nov 16 10:13:07] DEBUG[17379]: res_odbc.c:1400 odbc_obj_disconnect: Database handle deallocated
[Nov 16 10:13:07] ERROR[17379]: astobj2.c:279 __ao2_ref: refcount -1 on object 0x81fa308
[Nov 16 10:13:07] ERROR[17379]: astobj2.c:110 INTERNAL_OBJ: user_data is NULL
Comments:By: Mark Murawski (kobaz) 2009-11-16 09:29:17.000-0600

Uploaded backtrace

By: Leif Madsen (lmadsen) 2009-11-18 10:36:41.000-0600

Could you describe the version of unixODBC you're using? Most of these crashes tend to come from the systems packaged version of unixODBC which tends to be a bit out of date. Most of the time I've seen that there is a request for testing the latest unixODBC from unixodbc.org:  http://www.unixodbc.org/

Would you mind giving that a shot? Thanks!

By: Mark Murawski (kobaz) 2009-11-18 12:29:20.000-0600

I haven't changed my unixodbc version in a very long time... I've used the same version for asterisk 1.6.0.15 and asterisk 1.6.0.18-rc with no crashes.  And when I tried 1.6.2.0-rc, it started crashing... so something changed in asterisk.

I'm using unixodbc 2.2.11-16

By: Leif Madsen (lmadsen) 2009-11-18 13:47:16.000-0600

You said no crashes with 1.6.0.18-rc but crashes with 1.6.2.0-rc -- does this mean the version should be set to 1.6.2.0-rc6?

By: Mark Murawski (kobaz) 2009-11-18 15:02:55.000-0600

Correct.  I submitted the bug noting that it crashes in 1.6.2.0-rc6.  It got changed to 1.6.0.18, but I have not seen this crash in any version of asterisk up until 1.6.0.2-rc6.. not sure about the other rc's

By: Tilghman Lesher (tilghman) 2009-11-20 09:47:50.000-0600

Except that if you examine the uploaded backtrace, it says that 1.6.0.18-rc2 is what crashed, not 1.6.2.
-----snip-----
Thread 1 (Thread 17379):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb741a3d0 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb741da85 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb74532ed in ?? () from /lib/i686/cmov/libc.so.6
#4  0xb745d8f4 in ?? () from /lib/i686/cmov/libc.so.6
ASTERISK-1  0xb745f896 in free () from /lib/i686/cmov/libc.so.6
ASTERISK-2  0x0807e807 in __ao2_ref (user_data=0x81fa308, delta=0) at astobj2.c:295
ASTERISK-3  0xb6fb448b in ast_mutex_init (name=0x81fa308 "", check=-1237893360) at /usr/home/root/download/asterisk-1.6.0.18-rc2/include/asterisk/lock.h:754
ASTERISK-4  ast_odbc_request_obj (name=0x81fa308 "", check=-1237893360) at res_odbc.c:484
ASTERISK-5  0xb637852d in ?? ()
ASTERISK-6 0x08107aa9 in ast_func_write (chan=0x82f6f90, function=0xb5a6fc20 "ODBC_CALLS_CalleePickup(,SIP/201-00000004,1258384379.23)",
   value=0xb5a6fce9 "1") at pbx.c:3393
-----snip-----



By: Mark Murawski (kobaz) 2009-12-02 14:08:16.000-0600

Er,  I must have run gdb with the wrong asterisk binary.  I'll update the backtrace

By: Tilghman Lesher (tilghman) 2009-12-07 10:41:17.000-0600

I'm guessing that you've thus far been unable to reproduce, since you have not updated the backtrace?

By: Mark Murawski (kobaz) 2009-12-07 10:44:19.000-0600

I wasn't in a position to test previously.  I now have access to the client's server and can test.

By: Tilghman Lesher (tilghman) 2009-12-16 10:03:20.000-0600

It's been a week.  Have you been able to reproduce this?

By: Tilghman Lesher (tilghman) 2009-12-16 22:57:00.000-0600

Closing, reporter unable to reproduce