[Home]

Summary:ASTERISK-08029: [patch] Voicemail recording in progress causes asterisk to freak out when file size exceeds 2.1GB
Reporter:Paul Timmins (ptimmins)Labels:
Date Opened:2006-10-30 10:10:19.000-0600Date Closed:2006-12-11 10:45:51.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) format_wav.diff
Description:It appears various threads freak out when this happens, each creating a log file in the asterisk directory containing:

Oct 28 06:30:49 WARNING[10918] format_wav.c: Unable to find our position
Oct 28 06:30:49 WARNING[10918] format_wav.c: Unable to find our position

This actually was under Asterisk 1.2.10, but the option is not given to select that.

I can't update the software as regularly as I like as we have too many customers using it in production at once, sorry. :(

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

This happened for about 5 hours before restarting asterisk. It created about 31,000 different messages files all containing those two lines.

it also created 33,000 queue_log files containing:
1162030159|NONE|NONE|NONE|CONFIGRELOAD|

(the initial number is probably different on all of them)
That however may be related to a script I had that did a "extensions reload" every 15 minutes running on the server, but given there were so many I think it is also related to this issue.


I would reproduce this but it is on our production server, and seems to be a result of a user recieving a call from a predictive dialer that left app_voicemail recording a voicemail for 2 days straight, causing a 2.1GB file to grow.

What I think is happening is that large file support isn't enabled, and there is no clean exception handler set up for the file growing that large. I know in practice this should never happen, but things don't always work like they're supposed to and this should be fixed regardless. :)
Comments:By: Serge Vecher (serge-v) 2006-10-30 13:11:02.000-0600

you need to reproduce this under the latest asterisk release, which is currently 1.2.13. Thanks.

By: Anthony LaMantia (alamantia) 2006-10-30 13:32:04.000-0600

from what i can see the wav file format is constrained by a 32bit size header, which limits the max filesize of any wav file to be a little over 2Gb. i could be wrong but this seems to be a universal problem with the wav file header and not the implimentation within asterisk.

By: Paul Timmins (ptimmins) 2006-10-30 13:43:36.000-0600

serge-v: Leave yourself a two day long voicemail. I can't take out my customers for your benefit just because you've made a point release. I've given ample enough explaination on how to reproduce it.

By: Paul Timmins (ptimmins) 2006-10-30 13:45:30.000-0600

alamantia: The problem is with asterisk, because asterisk doesn't handle the issue and craps itself. If that means you have to fix the wav handling processes, that's great. But the problem is in asterisk. I never tried to play the file on any other system, because who wants to?

That's the beautiful thing about unix - compartmentalization. If a program crashes X windows, it's a bug in X windows. If leaving a voicemail message crashes asterisk, it's a problem with asterisk.

By: Anthony LaMantia (alamantia) 2006-10-30 14:31:44.000-0600

this patch should help. after a failed update_header() call durring wav_write() it will now return -1 rather then 0, which should prevent asterisk from freaking out.



By: jmls (jmls) 2006-11-19 13:21:24.000-0600

ptimmins: did you test the supplied patch ?

By: Paul Timmins (ptimmins) 2006-11-19 13:30:54.000-0600

No, I don't have 2 or 3 days to try recording a file this big.

By: jmls (jmls) 2006-11-19 16:44:54.000-0600

There is nothing stopping me from installing a test version of asterisk, installing the patch and creating a dialplan that would create such a file.

There's nothing stopping you from doing the same.

however, it's you that had the problem, not me.

By: Tilghman Lesher (tilghman) 2006-12-11 00:05:44.000-0600

No response from reporter.

By: Paul Timmins (ptimmins) 2006-12-11 00:24:21.000-0600

jmls: I don't care if it gets fixed because I have a workaround. I just set my asterisk not to let people leave voicemails over 3 minutes long.

However you have a desire to release software without known, easy to fix, bugs in it. Test it yourself.

By: Tilghman Lesher (tilghman) 2006-12-11 00:34:15.000-0600

We really can't fix this, because it partially relates to the maximum file size of a RIFF format file.

You can record larger files in 1.4, due to us moving to 64-bit offsets, as long as you use a format that is not constrained to 32-bit headers.

By: Paul Timmins (ptimmins) 2006-12-11 07:25:23.000-0600

I'm not asking you to fix the wav format. I'm asking you to do something sane when its constraints are violated. Like, for example, not creating thousands of files on the hard disk and completely freaking out asterisk. That's all.

By: Tilghman Lesher (tilghman) 2006-12-11 10:43:47.000-0600

Right, but what I am saying is that this will remain broken in 1.2, as the real fix required an architectural change that was introduced in 1.4.