[Home]

Summary:ASTERISK-13849: Crash in SQL routine from call in ast_odbc_prepare_and_execute
Reporter:Jim Dickenson (jimdickenson)Labels:
Date Opened:2009-03-26 16:16:35Date Closed:2009-03-28 10:20:23
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/ODBC
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When constructing the email notification for a received voicemail the software crashes. If I compile with optimization off then the crash does not occur. A backtrace is included below.

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

[2009-03-26 13:47:13.011]   == Parsing '/var/spool/asterisk/voicemail/ourvm/108/INBOX/msg0001.txt': [2009-03-26 13:47:13.011]   == Found
Length is 5585

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1093176208 (LWP 1707)]
0x401579cf in CI_read_fields () from /usr/lib/libodbcpsql.so
(gdb) bt
#0  0x401579cf in CI_read_fields () from /usr/lib/libodbcpsql.so
#1  0x401702bc in QR_fetch_tuples () from /usr/lib/libodbcpsql.so
#2  0x4015944e in CC_send_query () from /usr/lib/libodbcpsql.so
#3  0x4017367c in SC_execute () from /usr/lib/libodbcpsql.so
#4  0x40162c60 in PG_SQLExecute () from /usr/lib/libodbcpsql.so
ASTERISK-1  0x40162e4d in SQLExecute () from /usr/lib/libodbcpsql.so
ASTERISK-2  0x400ecc37 in SQLExecute () from /usr/lib/libodbc.so.1
ASTERISK-3  0x4000674a in ast_odbc_prepare_and_execute (obj=0x986ce28,
   prepare_cb=0x40dcdcd0 <generic_prepare>, data=0x412717c8) at res_odbc.c:115
ASTERISK-4  0x40dd10e3 in retrieve_file (
   dir=0x412738c0 "/var/spool/asterisk/voicemail/ourvm/108/INBOX", msgnum=1)
   at app_voicemail.c:2511
ASTERISK-5  0x40de2f9a in notify_new_message (chan=0x993f468, vmu=0x4127dfc4,
   vms=<value optimized out>, msgnum=1, duration=3,
   fmt=0x40df5fe0 "asterisk-vm@cfmc.com", cidnum=0x993f0c0 "116",
   cidname=0x993f0b0 "GXP280_16") at app_voicemail.c:5421
ASTERISK-6 0x40de593a in leave_voicemail (chan=0x993f468, ext=0x4127ec90 "108@ourvm",
   options=0x4127edc8) at app_voicemail.c:4587
ASTERISK-7 0x40de6704 in vm_exec (chan=0x993f468, data=0x41280e88)
   at app_voicemail.c:8290
ASTERISK-8 0x080e7624 in pbx_exec (c=0x993f468, app=0x40435358, data=0x41280e88)
   at pbx.c:942
ASTERISK-9 0x080f2bbd in pbx_extension_helper (c=0x993f468, con=0x0,
---Type <return> to continue, or q <return> to quit---q
context=0x993f5f0 Quit
) at pbx.c:3111
ASTERISK-10 0x40c9e528 in _macro_exec (chan=0x993f468, data=0x0, exclusive=0)
   at app_macro.c:333
ASTERISK-11 0x080e7624 in pbx_exec (c=0x993f468, app=0x98c8ed8, data=0x41285f08)
   at pbx.c:942
ASTERISK-12 0x080f2bbd in pbx_extension_helper (c=0x993f468, con=0x0,
   context=0x993f5f0 "macro-stduser", exten=0x993f640 "s", priority=1,
   label=0x0, callerid=0x993f0c0 "116", action=E_SPAWN, found=0x41288338,
   combined_find_spawn=1) at pbx.c:3111
ASTERISK-13 0x080f5c6c in __ast_pbx_run (c=0x993f468, args=0x0) at pbx.c:3614
ASTERISK-14 0x080f7430 in pbx_thread (data=0x993f468) at pbx.c:3974
ASTERISK-15 0x081321bb in dummy_start (data=0x993f100) at utils.c:861
ASTERISK-16 0x005f445b in start_thread () from /lib/libpthread.so.0
ASTERISK-17 0x0054be5e in clone () from /lib/libc.so.6

Comments:By: Jim Dickenson (jimdickenson) 2009-03-26 18:04:01

The ODBC driver file /usr/lib/libodbcpsql.so from unixODBC-2.2.11-7.1 causes the problem while /usr/lib/psqlodbc.so from postgresql-odbc-08.01.0200-3.1 does not.

This is on a CentOS 5.2 system.

By: Tilghman Lesher (tilghman) 2009-03-28 10:20:07

Please report this problem upstream to the UnixODBC project.