[Home]

Summary:ASTERISK-12209: Retreiving some voicemails from ODBC store causes core dump
Reporter:Nick Barnes (bcnit)Labels:
Date Opened:2008-06-17 06:27:25Date Closed:2011-06-07 14:01:07
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) output.txt
( 1) voicemail_messages.zip
Description:For some messages in some mailboxes (and for those which apply, they always apply), Asterisk crashes and core dumps when the voicemail is retrieved.

"You have 1 new message"
"Press 1 for new messages........."
<1 pressed>
"Message 1"
<Crash/core>


I will copy the database to an alternate system and see if the same problems are encountered there and update this report.

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

An example console output when it crashed:
   -- <SIP/260-0890e0c8> Playing 'vm-next.gsm' (language 'en')
   -- <SIP/260-0890e0c8> Playing 'vm-last.gsm' (language 'en')
   -- <SIP/260-0890e0c8> Playing 'vm-message.gsm' (language 'en')
pbx09a*CLI>
Disconnected from Asterisk server



The file structure left behind:

[root@pbx09a html]# ls -l /var/spool/asterisk/voicemail/default/BAN_A/INBOX
total 164
-rw-r--r-- 1 root root 163840 Jun 17 11:36 msg0001.alaw
-rw-r--r-- 1 root root      0 Jun 17 11:36 msg0001.txt


voicemail.conf:

[general]
format=alaw
odbcstorage=astrealtime
odbctable=voicemail_messages

The 'astrealtime' DSN has select, update, delete and insert privs in the database.



The record in the database:
<pre>
mysql> SELECT id,msgnum,dir,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext FROM voicemail_messages WHERE mailboxuser='BAN_A';
+------+--------+-----------------------------------------------------+---------+--------------+-----------------------------------+------------+----------+-------------+----------------+
| id   | msgnum | dir                                                 | context | macrocontext | callerid                          | origtime   | duration | mailboxuser | mailboxcontext |
+------+--------+-----------------------------------------------------+---------+--------------+-----------------------------------+------------+----------+-------------+----------------+
| 1204 |     -1 | /var/spool/asterisk/voicemail/default/BAN_A/unavail | NULL    | NULL         | NULL                              | NULL       | NULL     | BAN_A       | default        |
| 1129 |     -1 | /var/spool/asterisk/voicemail/default/BAN_A/busy    | NULL    | NULL         | NULL                              | NULL       | NULL     | BAN_A       | default        |
| 1307 |      0 | /var/spool/asterisk/voicemail/default/BAN_A/INBOX   | mainopt | NULL         | "BAN UK mobile/PNS" <07874123456> | 1213688903 | 16       | BAN_A       | default        |
| 1308 |      1 | /var/spool/asterisk/voicemail/default/BAN_A/INBOX   | mainopt | NULL         | "BAN UK mobile/PNS" <07935123456> | 1213688950 | 20       | BAN_A       | default        |
+------+--------+-----------------------------------------------------+---------+--------------+-----------------------------------+------------+----------+-------------+----------------+
4 rows in set (0.03 sec)
</pre>
Comments:By: Nick Barnes (bcnit) 2008-06-17 06:37:22

And, as an asside, because voicemail calls are created by a .call file, this file doesn't get deleted because of the crash and so the call is made again when Asterisk recovers - the user thinks everything's working AOK, so they try to retrieve the VM and it crashes again. And so on.

By: Nick Barnes (bcnit) 2008-06-17 09:52:35

OK. I can duplicate this on a different machine.

It appears that when the contents of the database are downloaded, for some messages, the .txt file that's created is empty. Asterisk then crashes presumably when the file is accessed.

I have a database record which causes this, but it could contain confidential information, so I can supply it only on demand!

By: Nick Barnes (bcnit) 2008-06-17 10:10:23

Uploaded file is the MySQL SQL required for a voicemail message record which causes this problem.

By: Nick Barnes (bcnit) 2008-06-17 10:53:58

Just cleared 20 voicemails and only had this problem with two of them.

By: Tilghman Lesher (tilghman) 2008-06-17 12:06:12

I just attempted to replicate this problem with the sample SQL you provided and was unable to do so.

Please follow the instructions in doc/backtrace.txt to obtain a backtrace of the core file on crash.

By: Tilghman Lesher (tilghman) 2008-06-26 12:25:50

bcnit:  I need your feedback on this issue in order to proceed.

By: Nick Barnes (bcnit) 2008-06-26 12:31:05

Sorry, I'm teaching all this week. I will do the work required on Monday. Cheers.

By: Tilghman Lesher (tilghman) 2008-07-01 22:11:20

bcnit: any feedback for me yet?

By: Nick Barnes (bcnit) 2008-07-03 10:20:08

Many apologies for the delay, backtrace attached.

By: Tilghman Lesher (tilghman) 2008-07-14 15:24:07

This may have been fixed by revision 128855, could you check that revision from SVN, please?

By: Tilghman Lesher (tilghman) 2008-07-31 16:57:09

No response from reporter.  If you're able to test the latest SVN, and it still crashes, please reopen this issue.  If you need assistance, please contact a bug marshal in #asterisk-bugs on the Freenode IRC network.