-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to use IMDB as reference #31
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will be fixed with a different commit. |
Beirdo
pushed a commit
that referenced
this pull request
Jan 30, 2014
ijc
added a commit
to ijc/mythtv
that referenced
this pull request
Sep 28, 2019
The thread running HLSReader::Cancel calls HLSPlaylistWorker::Cancel with the stream lock held, which blocks waiting for the thread to exit. The HLSPlaylistWorker::run thread however can be at the point between the m_cancel check and the call to HLSReader::PlaylistRetrying. Since PlaylistRetrying also takes the stream lock we are therefore deadlocked. See stack traces below. To address this introduce a separate worker lock covering the m_playlistworker and m_streamworker fields. This means that HLSReader::Cancel only needs to take this new lock and therefore cannot deadlock against the use of the stream lock in HLSReader::PlaylistRetrying. When they need to be held together the new lock is consistently nested within the old. Strack traces: Thread 1571 (Thread 0x7ffefa7fc700 (LWP 13196)): #0 futex_wait_cancelable (private=0, expected=0, futex_word=0x7fff08101380) at ../sysdeps/unix/sysv/linux/futex-internal.h:88 MythTV#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fff08101330, cond=0x7fff08101358) at pthread_cond_wait.c:502 MythTV#2 __pthread_cond_wait (cond=0x7fff08101358, mutex=0x7fff08101330) at pthread_cond_wait.c:655 MythTV#3 0x00007ffff10d01bb in QWaitCondition::wait(QMutex*, unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#4 0x00007ffff10cf66e in QThread::wait(unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#5 0x00007ffff55a3255 in MThread::wait (this=0x7fff0806fc60, time=18446744073709551615) at mthread.cpp:315 MythTV#6 0x00007ffff619c476 in HLSPlaylistWorker::Cancel (this=0x7fff0806fc60) at recorders/HLS/HLSPlaylistWorker.cpp:30 QMutexLocker lock(&m_stream_lock); MythTV#7 0x00007ffff61a1b82 in HLSReader::Cancel (this=0x7fffc8023ac0, quiet=false) at recorders/HLS/HLSReader.cpp:184 MythTV#8 0x00007ffff61a11d5 in HLSReader::Close (this=0x7fffc8023ac0, quiet=false) at recorders/HLS/HLSReader.cpp:150 MythTV#9 0x00007ffff619edf6 in HLSReader::~HLSReader (this=0x7fff200bbd80, __in_chrg=<optimized out>) at recorders/HLS/HLSReader.cpp:42 <...> MythTV#31 0x00007ffff6196a63 in HLSStreamHandler::~HLSStreamHandler (this=0x7ffedc040e60, __in_chrg=<optimized out>) at recorders/hlsstreamhandler.cpp:113 MythTV#32 0x0000000000000000 in ?? () Thread 1566 (Thread 0x7ffefb7fe700 (LWP 13191)): #0 futex_reltimed_wait_cancelable (private=0, reltime=0x7ffefb7fd920, expected=0, futex_word=0x7fff08029d90) at ../sysdeps/unix/sysv/linux/futex-internal.h:142 MythTV#1 __pthread_cond_wait_common (abstime=0x7ffefb7fd9e0, mutex=0x7fff08029d40, cond=0x7fff08029d68) at pthread_cond_wait.c:533 MythTV#2 __pthread_cond_timedwait (cond=0x7fff08029d68, mutex=0x7fff08029d40, abstime=0x7ffefb7fd9e0) at pthread_cond_wait.c:667 MythTV#3 0x00007ffff10d009c in QWaitCondition::wait(QMutex*, unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#4 0x00007ffff61b7321 in HLSStreamWorker::run (this=0x7ffedc018370) at recorders/HLS/HLSStreamWorker.cpp:91 MythTV#5 0x00007ffff55a3c1c in MThreadInternal::run (this=0x7fff0803dab0) at mthread.cpp:79 MythTV#6 0x00007ffff10cfa07 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#7 0x00007ffff0ff3fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 MythTV#8 0x00007ffff0bad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1565 (Thread 0x7fff16ffd700 (LWP 13190)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 MythTV#1 0x00007ffff10c2995 in QBasicMutex::lockInternal() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#2 0x00007ffff5a49bb0 in QMutexLocker::QMutexLocker (this=0x7fff16ffcc80, m=0x7ffee401fd00) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmutex.h:206 <...> QMutexLocker lock(&m_stream_lock); MythTV#6 0x00007ffff61b055e in HLSReader::PlaylistRetrying (this=0x7fffc8023b20) at recorders/HLS/HLSReader.cpp:1025 <...> MythTV#12 0x00007ffff619d791 in HLSPlaylistWorker::run (this=0x7fff0806fc60) at recorders/HLS/HLSPlaylistWorker.cpp:83 MythTV#13 0x00007ffff55a3c1c in MThreadInternal::run (this=0x7fff081082a0) at mthread.cpp:79 MythTV#14 0x00007ffff10cfa07 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#15 0x00007ffff0ff3fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 MythTV#16 0x00007ffff0bad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
ijc
added a commit
to ijc/mythtv
that referenced
this pull request
Sep 28, 2019
The thread running HLSReader::Cancel calls HLSPlaylistWorker::Cancel with the stream lock held, which blocks waiting for the thread to exit. The HLSPlaylistWorker::run thread however can be at the point between the m_cancel check and the call to HLSReader::PlaylistRetrying. Since PlaylistRetrying also takes the stream lock we are therefore deadlocked. See stack traces below. To address this introduce a separate worker lock covering the m_playlistworker and m_streamworker fields. This means that HLSReader::Cancel only needs to take this new lock and therefore cannot deadlock against the use of the stream lock in HLSReader::PlaylistRetrying. When they need to be held together the new lock is consistently nested within the old. Strack traces: Thread 1571 (Thread 0x7ffefa7fc700 (LWP 13196)): #0 futex_wait_cancelable (private=0, expected=0, futex_word=0x7fff08101380) at ../sysdeps/unix/sysv/linux/futex-internal.h:88 MythTV#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fff08101330, cond=0x7fff08101358) at pthread_cond_wait.c:502 MythTV#2 __pthread_cond_wait (cond=0x7fff08101358, mutex=0x7fff08101330) at pthread_cond_wait.c:655 MythTV#3 0x00007ffff10d01bb in QWaitCondition::wait(QMutex*, unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#4 0x00007ffff10cf66e in QThread::wait(unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#5 0x00007ffff55a3255 in MThread::wait (this=0x7fff0806fc60, time=18446744073709551615) at mthread.cpp:315 MythTV#6 0x00007ffff619c476 in HLSPlaylistWorker::Cancel (this=0x7fff0806fc60) at recorders/HLS/HLSPlaylistWorker.cpp:30 QMutexLocker lock(&m_stream_lock); MythTV#7 0x00007ffff61a1b82 in HLSReader::Cancel (this=0x7fffc8023ac0, quiet=false) at recorders/HLS/HLSReader.cpp:184 MythTV#8 0x00007ffff61a11d5 in HLSReader::Close (this=0x7fffc8023ac0, quiet=false) at recorders/HLS/HLSReader.cpp:150 MythTV#9 0x00007ffff619edf6 in HLSReader::~HLSReader (this=0x7fff200bbd80, __in_chrg=<optimized out>) at recorders/HLS/HLSReader.cpp:42 <...> MythTV#31 0x00007ffff6196a63 in HLSStreamHandler::~HLSStreamHandler (this=0x7ffedc040e60, __in_chrg=<optimized out>) at recorders/hlsstreamhandler.cpp:113 MythTV#32 0x0000000000000000 in ?? () Thread 1566 (Thread 0x7ffefb7fe700 (LWP 13191)): #0 futex_reltimed_wait_cancelable (private=0, reltime=0x7ffefb7fd920, expected=0, futex_word=0x7fff08029d90) at ../sysdeps/unix/sysv/linux/futex-internal.h:142 MythTV#1 __pthread_cond_wait_common (abstime=0x7ffefb7fd9e0, mutex=0x7fff08029d40, cond=0x7fff08029d68) at pthread_cond_wait.c:533 MythTV#2 __pthread_cond_timedwait (cond=0x7fff08029d68, mutex=0x7fff08029d40, abstime=0x7ffefb7fd9e0) at pthread_cond_wait.c:667 MythTV#3 0x00007ffff10d009c in QWaitCondition::wait(QMutex*, unsigned long) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#4 0x00007ffff61b7321 in HLSStreamWorker::run (this=0x7ffedc018370) at recorders/HLS/HLSStreamWorker.cpp:91 MythTV#5 0x00007ffff55a3c1c in MThreadInternal::run (this=0x7fff0803dab0) at mthread.cpp:79 MythTV#6 0x00007ffff10cfa07 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#7 0x00007ffff0ff3fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 MythTV#8 0x00007ffff0bad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1565 (Thread 0x7fff16ffd700 (LWP 13190)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 MythTV#1 0x00007ffff10c2995 in QBasicMutex::lockInternal() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#2 0x00007ffff5a49bb0 in QMutexLocker::QMutexLocker (this=0x7fff16ffcc80, m=0x7ffee401fd00) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmutex.h:206 <...> QMutexLocker lock(&m_stream_lock); MythTV#6 0x00007ffff61b055e in HLSReader::PlaylistRetrying (this=0x7fffc8023b20) at recorders/HLS/HLSReader.cpp:1025 <...> MythTV#12 0x00007ffff619d791 in HLSPlaylistWorker::run (this=0x7fff0806fc60) at recorders/HLS/HLSPlaylistWorker.cpp:83 MythTV#13 0x00007ffff55a3c1c in MThreadInternal::run (this=0x7fff081082a0) at mthread.cpp:79 MythTV#14 0x00007ffff10cfa07 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 MythTV#15 0x00007ffff0ff3fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 MythTV#16 0x00007ffff0bad4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As tmpd3.py seems to support the output more metadata than tmdb.py but mythweb/video still uses imdb as key, I added support to tmdb3.py to lookup movies using IMDB id instead of only the the movie database reference.