Changes between Initial Version and Version 1 of Ticket #11410
- Timestamp:
- Feb 19, 2013, 6:01:43 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11410
-
Property
Priority
changed from
major
tominor
-
Property
Severity
changed from
high
tomedium
-
Property
Priority
changed from
-
Ticket #11410 – Description
initial v1 1 1 Witnessed mpeg recordings with vbi occasionally hanging at finish (causing the backend in general to hang) and under gdb saw: 2 2 3 {{{ 3 4 Thread 3 (Thread 0x7fbd69ffb700 (LWP 8322)): 4 5 #0 0x00007fbd8bf7a61c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 … … 20 21 #5 0x00007fbd8b5399cd in clone () from /lib64/libc.so.6 21 22 #6 0x0000000000000000 in ?? () 23 }}} 22 24 23 25 Looking at mpegrecorder.cpp: 24 26 27 {{{ 25 28 1113 LOG(VB_RECORD, LOG_INFO, LOC + "run finishing up"); 26 29 1114 … … 41 44 1129 42 45 1130 FinishRecording(); 46 }}} 43 47 44 48 Line 1119 signals the vbi thread to stop reading and exit, however, the encoder is signaled to stop *before* this on line 1115. Thus it is possible for the vbi thread to return from select, try to read data from the vbi fd and then block on the read because the vbi fd is no longer returning data (has been stopped). … … 46 50 Simple solution seems to be to swap the order, i.e. signal vbi thread to stop reading before stopping the encoder. I have no idea if there are any unforeseen consequences to this though..... comments? 47 51 52 {{{ 48 53 diff --git a/mythtv/libs/libmythtv/mpegrecorder.cpp b/mythtv/libs/libmythtv/mpegrecorder.cpp 49 54 index b158513..35644af 100644 … … 67 72 vbi_thread->wait(); 68 73 lines 1-20/20 (END) 74 }}}