Opened 17 years ago

Closed 16 years ago

#3710 closed defect (fixed)

mythfrontend segv during commercials

Reported by: anonymous Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

per this thread: http://www.gossamer-threads.com/lists/mythtv/dev/252544

attaching log and gdb backtrace.

When playing, commskiping (as in the case of the backtrace), or ff/rw through the problem commercial breaks mythfrontend segv after a number of: [mpeg2video @ 0xb7511168]get_buffer() failed (stride changed) 2007-07-09 16:41:32.207 AFD Error: Unknown decoding error

in the log. These messages also appear in the backend log during comm flagging but don't appear to cause the flagger to crash

Attachments (5)

gdb.txt (7.9 KB) - added by freedenizen@… 17 years ago.
backtrace
3710-dbg1.patch (772 bytes) - added by danielk 17 years ago.
Debugging patch
3710patch1.log (250.1 KB) - added by freedenizen@… 17 years ago.
log from dbg1 patch
3710-dbg2.patch (1.4 KB) - added by danielk 17 years ago.
Debug patch 2
3710patch2.log (99.1 KB) - added by freedenizen@… 17 years ago.
log from dbg2 patch

Download all attachments as: .zip

Change History (14)

Changed 17 years ago by freedenizen@…

Attachment: gdb.txt added

backtrace

comment:1 Changed 17 years ago by danielk

Owner: changed from Isaac Richards to danielk

comment:2 Changed 17 years ago by mythtv@…

Can confirm. Built with on 13870. Can provide core dump w/ debug symbols upon request. 15M bzipped Can provide example mpeg show for debug upon request. Using Motorola DCT6200 w/ firewire, no post transcoding.

Problem seems to be that during commercial breaks, comcast (maybe other providers as well) have a portion of the break where they can air local commercials. Using xine for playback and its info screen, I see the mpeg stream changes from a resolution of 704x480 to 528x480 for the local commerical. Goes back to 704x480 when the show resumes.

Under myth, it will segfault if I use commericial skip at this stream resolution change. It will segfault if I use a 30 second jump ahead. If I watch the commercials without skipping, mythfrontend dumps stdout info about losing video and audio frames and attempts 'skip' recover , it suceedes (with garbled video and audio during recovery) about 25% of the time, segfault the the rest of the time.

comment:3 Changed 17 years ago by mythtv@…

https://goody.homelinux.net/debugstuff/

above link has a "-g -O" core dump and vid that causes segfault. vid has 1st commericial break at around 9m:30s

[mpeg2video @ 0x1265160]get_buffer() failed (stride changed)
2007-07-12 02:13:26.094 AFD Error: Unknown decoding error
[mpeg2video @ 0x1265160]get_buffer() failed (stride changed)
2007-07-12 02:13:26.095 AFD Error: Unknown decoding error
[mpeg2video @ 0x1265160]get_buffer() failed (stride changed)
2007-07-12 02:13:26.096 AFD Error: Unknown decoding error
Segmentation fault (core dumped)

Changed 17 years ago by danielk

Attachment: 3710-dbg1.patch added

Debugging patch

comment:4 Changed 17 years ago by danielk

A 'mythfrontend -v playback' log with the attached patch would be helpful in tracking this bug down.

Changed 17 years ago by freedenizen@…

Attachment: 3710patch1.log added

log from dbg1 patch

comment:5 Changed 17 years ago by freedenizen@…

log attached

Changed 17 years ago by danielk

Attachment: 3710-dbg2.patch added

Debug patch 2

comment:6 Changed 17 years ago by danielk

I've fixed one problem in ffmpeg seen looking at your logs, but I think there is another. It looks like ffmpeg not detecting the resolution change as it should, this is probably an a bug that snuck in via an ffmpeg resync.

Can you post the same log using the new patch instead of the earlier one?

Changed 17 years ago by freedenizen@…

Attachment: 3710patch2.log added

log from dbg2 patch

comment:7 Changed 17 years ago by freedenizen@…

Log attached, it didn't crash with the 2nd patch, it just paused for a couple seconds and then played.

comment:8 Changed 17 years ago by danielk

(In [14016]) Refs #3710. Fixes error handling in ffmpeg file.

I've just sent a version of this patch to ffmpeg. Until this get's fixed upstream I'm applying this patch here. If we fail in alloc_picture() after successfully calling s->avctx->get_buffer we call s->avctx->release_buffer so that we don't leak buffers like crazy.

The underlying problem is that ffmpeg isn't picking up on the resolution change, this will be fixed separately.

comment:9 Changed 16 years ago by Janne Grunau

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.