[Home]

Summary:ASTERISK-14195: [patch] Asterisk crash when recording busy or unavailable message while using ODBC voicemail storage
Reporter:agjohnson (agjohnson)Labels:
Date Opened:2009-05-22 16:05:15Date Closed:2009-06-17 16:33:30
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/ODBC
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090528__issue15186.diff.txt
( 1) bt
( 2) bt-full
( 3) console-output.txt
( 4) core.31392.tar.gz
( 5) db-queries.txt
Description:Versions: 1.6.1.0 and 1.6.2.0-beta2.  Core dump is for 1.6.2-beta2.

Asterisk will consistently crash when trying to create an unavailable message or busy message.
Comments:By: agjohnson (agjohnson) 2009-05-22 16:07:20

Attached is a bt and bt-full, both for 1.6.2-beta2.

By: agjohnson (agjohnson) 2009-05-22 16:09:48

MySQL Version: mysql-server.x86_64 5.0.45-7.el5
Table structure:
CREATE TABLE `voicemessages` (
 `id` int(11) NOT NULL auto_increment,
 `msgnum` int(11) default '0',
 `dir` varchar(80) default '',
 `context` varchar(80) default '',
 `macrocontext` varchar(80) default '',
 `callerid` varchar(40) default '',
 `origtime` varchar(40) default '',
 `duration` varchar(20) default '',
 `mailboxuser` varchar(80) default '',
 `mailboxcontext` varchar(80) default '',
 `recording` longblob,
 `flag` varchar(45) default NULL,
 PRIMARY KEY  (`id`),
 KEY `dir` (`dir`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

By: agjohnson (agjohnson) 2009-05-28 16:27:22

This crash also occurs with the latest 2.2.14 unixODBC, latest 3.51 MySQL connector, and latest 5.1 MySQL connector.

By: agjohnson (agjohnson) 2009-05-28 17:25:36

(gdb) p *data
$1 = {sql = 0x6755f0c "INSERT INTO voicemessages (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,flag) VALUES (?,?,?,?,?,?,?,?,?,?,?)",
 dir = 0x675817c "/var/spool/asterisk/voicemail/televerde/8448/unavail", msgnums = 0x6755ef8 "-1", data = 0xb7ab4000, datalen = 385, indlen = 385, context = 0x0, macrocontext = 0x0, callerid = 0x0,
 origtime = 0x0, duration = 0x0, mailboxuser = 0x6759428 "8448", mailboxcontext = 0x67593d8 "televerde", category = 0x0, flag = 0x0}
(gdb)

By: agjohnson (agjohnson) 2009-05-28 17:37:53

The patch fixed it, thanks!

By: Leif Madsen (lmadsen) 2009-06-16 14:05:23

Reporter states the patch by tilghman resolves his issue. This patch is ready for review and commit. Thanks!

By: Digium Subversion (svnbot) 2009-06-17 16:31:40

Repository: asterisk
Revision: 201531

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r201531 | tilghman | 2009-06-17 16:31:40 -0500 (Wed, 17 Jun 2009) | 7 lines

Initialize additional variables, to prevent a possible crash.
(closes issue ASTERISK-14195)
Reported by: ajohnson
Patches:
      20090528__issue15186.diff.txt uploaded by tilghman (license 14)
Tested by: ajohnson

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

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

By: Digium Subversion (svnbot) 2009-06-17 16:32:31

Repository: asterisk
Revision: 201532

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_voicemail.c

------------------------------------------------------------------------
r201532 | tilghman | 2009-06-17 16:32:31 -0500 (Wed, 17 Jun 2009) | 14 lines

Merged revisions 201531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r201531 | tilghman | 2009-06-17 16:31:39 -0500 (Wed, 17 Jun 2009) | 7 lines
 
 Initialize additional variables, to prevent a possible crash.
 (closes issue ASTERISK-14195)
  Reported by: ajohnson
  Patches:
        20090528__issue15186.diff.txt uploaded by tilghman (license 14)
  Tested by: ajohnson
........

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

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

By: Digium Subversion (svnbot) 2009-06-17 16:33:30

Repository: asterisk
Revision: 201533

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_voicemail.c

------------------------------------------------------------------------
r201533 | tilghman | 2009-06-17 16:33:30 -0500 (Wed, 17 Jun 2009) | 14 lines

Merged revisions 201531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r201531 | tilghman | 2009-06-17 16:31:39 -0500 (Wed, 17 Jun 2009) | 7 lines
 
 Initialize additional variables, to prevent a possible crash.
 (closes issue ASTERISK-14195)
  Reported by: ajohnson
  Patches:
        20090528__issue15186.diff.txt uploaded by tilghman (license 14)
  Tested by: ajohnson
........

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

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