Opened 13 years ago

Closed 11 years ago

#3680 closed defect (invalid)

frontend crashes with a SEGV watching an HD video

Reported by: Derek Atkins <warlord@…> Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Using trunk/r13508 I get the following crash watching a recording of Letterman from two nights ago. This crash happens every time at approximately the same place in the video, so I can reliably reproduce this crash. I can try updating to newer code?

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1115699520 (LWP 3362)] 0x00002aaaabd31d17 in put_pixels16_xy2_mmx ()

from /usr/local/lib/libmythavcodec-0.20.so.0

(gdb) t a a bt

Thread 17 (Thread 1147169088 (LWP 3367)): #0 0x0000003637694721 in nanosleep () from /lib64/libc.so.6 #1 0x00000036376c7234 in usleep () from /lib64/libc.so.6 #2 0x00002aaaacaffcc6 in AudioOutputBase::OutputAudioLoop? ()

from /usr/local/lib/libmyth-0.20.so.0

#3 0x00002aaaacb01e69 in AudioOutputBase::kickoffOutputAudioLoop ()

from /usr/local/lib/libmyth-0.20.so.0

#4 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #5 0x00000036376cd50d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? ()

Thread 15 (Thread 1157658944 (LWP 3365)): #0 0x00002aaaaeb5f607 in pthread_cond_timedwait@@GLIBC_2.3.2 ()

from /lib64/libpthread.so.0

#1 0x00002aaaadf49d69 in QWaitCondition::wait ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#2 0x00002aaaaaf392b1 in NuppelVideoPlayer::PrebufferEnoughFrames? ()

from /usr/local/lib/libmythtv-0.20.so.0

#3 0x00002aaaaaf48e48 in NuppelVideoPlayer::DisplayNormalFrame? ()

from /usr/local/lib/libmythtv-0.20.so.0

#4 0x00002aaaaaf4bed8 in NuppelVideoPlayer::OutputVideoLoop? ()

from /usr/local/lib/libmythtv-0.20.so.0

---Type <return> to continue, or q <return> to quit--- #5 0x00002aaaaaf4c2f9 in NuppelVideoPlayer::kickoffOutputVideoLoop ()

from /usr/local/lib/libmythtv-0.20.so.0

#6 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #7 0x00000036376cd50d in clone () from /lib64/libc.so.6 #8 0x0000000000000000 in ?? ()

Thread 13 (Thread 1126189376 (LWP 3363)): #0 0x0000003637694721 in nanosleep () from /lib64/libc.so.6 #1 0x00000036376c7234 in usleep () from /lib64/libc.so.6 #2 0x00002aaaaacb6b2b in RingBuffer::ReadAheadThread? ()

from /usr/local/lib/libmythtv-0.20.so.0

#3 0x00002aaaaacb7849 in RingBuffer::StartReader? ()

from /usr/local/lib/libmythtv-0.20.so.0

#4 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #5 0x00000036376cd50d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? ()

Thread 12 (Thread 1115699520 (LWP 3362)): #0 0x00002aaaabd31d17 in put_pixels16_xy2_mmx ()

from /usr/local/lib/libmythavcodec-0.20.so.0

#1 0x00002aaaabae059e in MPV_motion ()

from /usr/local/lib/libmythavcodec-0.20.so.0

#2 0x00002aaaabae2fcb in MPV_decode_mb () ---Type <return> to continue, or q <return> to quit---

from /usr/local/lib/libmythavcodec-0.20.so.0

#3 0x00002aaaabbc5904 in mpeg_decode_slice ()

from /usr/local/lib/libmythavcodec-0.20.so.0

#4 0x00002aaaabbc747e in mpeg_decode_frame ()

from /usr/local/lib/libmythavcodec-0.20.so.0

#5 0x00002aaaabac9bb3 in avcodec_decode_video ()

from /usr/local/lib/libmythavcodec-0.20.so.0

#6 0x00002aaaaaf992f2 in AvFormatDecoder::GetFrame? ()

from /usr/local/lib/libmythtv-0.20.so.0

#7 0x00002aaaaaf4a920 in NuppelVideoPlayer::GetFrameNormal? ()

from /usr/local/lib/libmythtv-0.20.so.0

#8 0x00002aaaaaf4adec in NuppelVideoPlayer::GetFrame? ()

from /usr/local/lib/libmythtv-0.20.so.0

#9 0x00002aaaaaf5b923 in NuppelVideoPlayer::StartPlaying? ()

from /usr/local/lib/libmythtv-0.20.so.0

#10 0x00002aaaaaeb85c9 in SpawnDecode? ()

from /usr/local/lib/libmythtv-0.20.so.0

#11 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #12 0x00000036376cd50d in clone () from /lib64/libc.so.6 #13 0x0000000000000000 in ?? ()

Thread 11 (Thread 1136679232 (LWP 3361)): #0 0x0000003637694721 in nanosleep () from /lib64/libc.so.6 ---Type <return> to continue, or q <return> to quit--- #1 0x00000036376c7234 in usleep () from /lib64/libc.so.6 #2 0x00002aaaaaf1b941 in TV::RunTV () from /usr/local/lib/libmythtv-0.20.so.0 #3 0x00002aaaaaf1d949 in TV::EventThread? ()

from /usr/local/lib/libmythtv-0.20.so.0

#4 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #5 0x00000036376cd50d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? ()

Thread 4 (Thread 1105209664 (LWP 3354)): #0 0x00000036376c6ac2 in select () from /lib64/libc.so.6 #1 0x00002aaaacb2d874 in MythSocket::readyReadThread ()

from /usr/local/lib/libmyth-0.20.so.0

#2 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #3 0x00000036376cd50d in clone () from /lib64/libc.so.6 #4 0x0000000000000000 in ?? ()

Thread 3 (Thread 1084229952 (LWP 3312)): #0 0x00002aaaaeb5f416 in pthread_cond_wait@@GLIBC_2.3.2 ()

from /lib64/libpthread.so.0

#1 0x00002aaaadf49ee0 in QWaitCondition::wait ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#2 0x00002aaaac9ff21e in MythContext::waitPrivRequest ()

from /usr/local/lib/libmyth-0.20.so.0

---Type <return> to continue, or q <return> to quit--- #3 0x000000000041adea in run_priv_thread () #4 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #5 0x00000036376cd50d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? ()

Thread 2 (Thread 1094719808 (LWP 3313)): #0 0x00002aaaaeb61bfb in read () from /lib64/libpthread.so.0 #1 0x00002aaaaf2f61ac in lirc_nextcode () from /usr/lib64/liblirc_client.so.0 #2 0x00002aaaacb4f01a in LircClient::Process ()

from /usr/local/lib/libmyth-0.20.so.0

#3 0x00002aaaace5280e in SpawnLirc? (param=0x95f240) at mythmainwindow.cpp:65 #4 0x00002aaaaeb5b305 in start_thread () from /lib64/libpthread.so.0 #5 0x00000036376cd50d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? ()

Thread 1 (Thread 46912578749200 (LWP 3309)): #0 0x0000003637694721 in nanosleep () from /lib64/libc.so.6 #1 0x00000036376c7234 in usleep () from /lib64/libc.so.6 #2 0x00002aaaaaecffb1 in TV::StartTV ()

from /usr/local/lib/libmythtv-0.20.so.0

#3 0x0000000000456863 in PlaybackBox::play () #4 0x0000000000456f8f in PlaybackBox::playSelected () #5 0x000000000045f9d5 in PlaybackBox::keyPressEvent () ---Type <return> to continue, or q <return> to quit--- #6 0x00002aaaadce320c in QWidget::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#7 0x00002aaaadc4b105 in QApplication::internalNotify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#8 0x00002aaaadc4c9d0 in QApplication::notify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#9 0x00002aaaace52ed4 in QApplication::sendEvent (receiver=0x7fffb9b1ecb0,

event=0x7fffb9b1e510) at /usr/lib64/qt-3.3/include/qapplication.h:520

#10 0x00002aaaace4bc2b in MythMainWindow::customEvent (this=0x95f240,

ce=0x9f3650) at mythmainwindow.cpp:1339

#11 0x00002aaaadcab456 in QObject::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#12 0x00002aaaadce2ea8 in QWidget::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#13 0x00002aaaadc4b105 in QApplication::internalNotify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#14 0x00002aaaadc4c5c4 in QApplication::notify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#15 0x00002aaaadc4c0f9 in QApplication::sendPostedEvents ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#16 0x00002aaaadbf9ddc in QEventLoop::processEvents ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#17 0x00002aaaadc628c1 in QEventLoop::enterLoop () ---Type <return> to continue, or q <return> to quit---

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#18 0x00002aaaacab96a6 in MythDialog::exec ()

from /usr/local/lib/libmyth-0.20.so.0

#19 0x00000000004550d8 in PlaybackBox::exec () #20 0x0000000000418dfb in startPlayback () #21 0x000000000041e5ca in TVMenuCallback () #22 0x00002aaaace91ac0 in MythThemedMenuPrivate::handleAction (

this=0x2aaab80d1020, action=@0x2aaab8098070) at myththemedmenu.cpp:2156

#23 0x00002aaaace920bb in MythThemedMenuPrivate::keyHandler (

this=0x2aaab80d1020, actions=@0x7fffb9b1fb20, fullexit=true) at myththemedmenu.cpp:1904

#24 0x00002aaaace928aa in MythThemedMenuPrivate::keyPressHandler (

this=0x2aaab80d1020, e=0x7fffb9b1ffe0) at myththemedmenu.cpp:1813

#25 0x00002aaaace92937 in MythThemedMenu::keyPressEvent (this=0x2aaab80bd0e0,

e=0x7fffb9b1ffe0) at myththemedmenu.cpp:2329

#26 0x00002aaaace46e18 in MythMainWindow::eventFilter (this=0x95f240,

e=0x7fffb9b1ffe0) at mythmainwindow.cpp:1112

#27 0x00002aaaadcab372 in QObject::activate_filters ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#28 0x00002aaaadcab3e7 in QObject::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#29 0x00002aaaadce2ea8 in QWidget::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

---Type <return> to continue, or q <return> to quit--- #30 0x00002aaaadc4b105 in QApplication::internalNotify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#31 0x00002aaaadc4c9d0 in QApplication::notify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#32 0x00002aaaace52ed4 in QApplication::sendEvent (receiver=0x95f240,

event=0x7fffb9b1ffe0) at /usr/lib64/qt-3.3/include/qapplication.h:520

#33 0x00002aaaace4bc19 in MythMainWindow::customEvent (this=0x95f240,

ce=0x87eb40) at mythmainwindow.cpp:1337

#34 0x00002aaaadcab456 in QObject::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#35 0x00002aaaadce2ea8 in QWidget::event ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#36 0x00002aaaadc4b105 in QApplication::internalNotify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#37 0x00002aaaadc4c5c4 in QApplication::notify ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#38 0x00002aaaadc4c0f9 in QApplication::sendPostedEvents ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#39 0x00002aaaadbfa12a in QEventLoop::processEvents ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#40 0x00002aaaadc628c1 in QEventLoop::enterLoop ()

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#41 0x00002aaaadc62792 in QEventLoop::exec () ---Type <return> to continue, or q <return> to quit---

from /usr/lib64/qt-3.3/lib/libqt-mt.so.3

#42 0x0000000000423a4b in main () #0 0x00002aaaabd31d17 in put_pixels16_xy2_mmx ()

from /usr/local/lib/libmythavcodec-0.20.so.0

(gdb)

Change History (11)

comment:1 Changed 13 years ago by stuartm

You should definitely see if you can reproduce this with the latest revision. [13508] pre-dates the latest ffmpeg resync.

comment:3 Changed 13 years ago by Nigel

comment:4 Changed 13 years ago by Derek Atkins <warlord@…>

Hmm, I thought I had responded but apparently not. I updated to r13782 and it didn't fix the problem, and indeed it made it worse. Not only did it continue to crash in exactly the same way, but now the audio was popping!

comment:5 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk

Can you provide a short (< 20 seconds) video sample that triggers this segfault?

You can use the "head" and "tail" commands to trim the file and test the sample you produce with the "mythtv" application.

comment:6 Changed 13 years ago by Derek Atkins <warlord@…>

I'll try. I know that it happens around shortly after 50 minutes into the episode (I do a 10-minute jump ahead). I'll try to track down the time of the crash and then I can try to nail down the video in file. I'm going to be traveling so it might take me a while to do this. I'll see what I can do tonight and tomorrow. How do you want me to send you the video?

comment:7 Changed 13 years ago by Derek Atkins <warlord@…>

URL to 43MB sample video sent via private mail.

comment:7 Changed 13 years ago by danielk

(In [14009]) Refs #3680. Avoids segfault on failed video resolution changes.

Darek's video contained some errors that made MythTV think the resolution had suddenly changed to 1328x3536. VideoOutputXv? failed to allocate a buffer of this size for XVideo. This change makes sure that VideoOutputXv? enters the error state which propagates to both NuppelVideoPlayer? and AvFormatDecoder? so that decoding can be shut down before we try to use non-existant buffers in AvFormatDecoder::GetFrame?() after the error.

comment:8 Changed 12 years ago by Derek Atkins <warlord@…>

Hi,

I just (finally) got a chance to try this patch. While it does keep myth from crashing, it also causes myth to stop playing the video completely. It pops up a window that says "Failed to Reinit Video." and gives me a single option "Return to menu." When I select that it pops up another window that says "Error was encountered while displaying video." and also gives me a single option, "Return to menu." At this point it will (after about 15 seconds of black screen) go back to the menu.

I must admit that this isn't the behavior I was hoping for... I was hoping that the video would ignore the broken frames and just keep on playing.

comment:9 Changed 12 years ago by Derek Atkins <warlord@…>

Oh, I've got another video that still causes a SEGV, even with this patch applied. Yes, it has stream errors (although not quite as bad as the previous version). I'll work on getting you a snippet of this one, if you want?

comment:10 Changed 11 years ago by Dibblah

Status: newinfoneeded_new

If you're still observing this issue, can you submit the full backtrace for the new occurrance?

comment:11 Changed 11 years ago by danielk

Resolution: invalid
Status: infoneeded_newclosed

info needed for 3 wks, closing

Note: See TracTickets for help on using tickets.