[Home]

Summary:ASTERISK-24914: Division by zero in file.c when playback of voicemail with video as h264
Reporter:Marcello Ceschia (marcelloceschia)Labels:
Date Opened:2015-03-26 08:09:54Date Closed:2015-04-20 16:22:50
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/PBX
Versions:11.16.0 13.2.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Asterisk SVN-branch-13-r433338M Attachments:( 0) voicemail_with_video_full.log
Description:1. recording voicemail with video as h264
2. playback voicemail

{code}
Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal SIGFPE, Arithmetic exception.

#0  0x08157a3b in ast_readvideo_callback (s=s@entry=0xb2bad704) at file.c:975
975                     ast_channel_vstreamid_set(s->owner, ast_sched_add(ast_channel_sched(s->owner), whennext / (ast_format_get_sample_rate(s->fmt->format) / 1000), ast_fsread_video, s));

print whennext
$2 = 533

(gdb) print s->fmt->format->codec->sample_rate
$4 = 0

(gdb) print *s->fmt->format
$5 = {name = 0x8266457 "h264", codec = 0x98fbd8c, attribute_data = 0x0, interface = 0x0}

(gdb) print *s->fmt->format->codec
$6 = {id = 34, name = 0x8266457 "h264", description = 0x826645c "H.264 video", type = AST_MEDIA_TYPE_VIDEO, sample_rate = 0, minimum_ms = 0, maximum_ms = 0, default_ms = 0, minimum_bytes = 0, samples_count = 0x0, get_length = 0x0, smooth = 0, mod = 0x0}

{code}

as you can see:
whennext / (ast_format_get_sample_rate(s->fmt->format) / 1000) == (533 / (0 / 1000))
Comments:By: Rusty Newton (rnewton) 2015-03-26 18:12:08.631-0500

Thanks for the report and debug. However we also need protocol specific debug captured at the time of the issue. Please include the following:

* Asterisk log files generated using the instructions on the Asterisk wiki [1], with the appropriate protocol debug options enabled, e.g. 'pjsip set logger on' if the issue involves the chan_pjsip channel driver.
* Configuration information for the relevant channel driver, e.g. pjsip.conf.
* A wireshark compatible packet capture, captured at the same time as the Asterisk log output.

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Rusty Newton (rnewton) 2015-03-26 18:14:21.591-0500

[~marcelloceschia] I consulted with [~kharwell] about this issue. To further investigate we need your channel driver configuration file, relevant dialplan and an Asterisk debug log with SIP trace included.

By: Marcello Ceschia (marcelloceschia) 2015-03-27 04:04:20.066-0500

I will not attache the full config file of chan_sip and voicemail.conf, because this files contains private data I will not post on a public page.

The relevant information in voicemail.conf:

{code}
[general]
format = wav49|gsm|wav|ulaw
{code}

dialplan:
{code}
exten => 8501,1,VoiceMail(1234,u)
exten => 8502,1,VoiceMailMain(1234,su)
{code}

debug log as attachment

By: Rusty Newton (rnewton) 2015-03-27 09:57:45.496-0500

Thanks for the log. We don't want you to post any private information. If you can sanitize the relevant files and then post the full thing then that works.

The log itself may be enough, but we are not sure.

By: Marcello Ceschia (marcelloceschia) 2015-03-27 11:17:49.377-0500

You can contact me if you need more information