[mythtv] LiveTV freezes with "Invalid file handle when opening"

Petr Stehlik pstehlik at sophics.cz
Sun Nov 27 05:36:46 EST 2005


Hi,

SVN head. I let Live TV play a DVB-S channel without EPG info. In about
18 minutes (at 10:30:00) it freezed.

frontend:

2005-11-27 10:12:04.470 TV: Changing from None to WatchingLiveTV
2005-11-27 10:12:04.479 Realtime priority would require SUID as root.
2005-11-27 10:12:04.580 Video timing method: USleep with busy wait
2005-11-27 10:12:05.758 AFD: Opened codec 0x89c63e0, id(MPEG2VIDEO)
type(Video)
2005-11-27 10:12:05.776 AFD: Opened codec 0x89421e0, id(MP3) type(Audio)
2005-11-27 10:12:05.798 AFD: Initializing video at 544x576 pixels.
2005-11-27 10:12:06.188 Opening audio device 'default'.
2005-11-27 10:12:15.744 NVP: prebuffering pause
2005-11-27 10:30:01.170 Invalid file handle when
opening /myth/tv/63990_20051127103000.mpg.  4 retries remaining.
2005-11-27 10:30:01.683 Invalid file handle when
opening /myth/tv/63990_20051127103000.mpg.  3 retries remaining.
2005-11-27 10:30:02.192 Invalid file handle when
opening /myth/tv/63990_20051127103000.mpg.  2 retries remaining.
2005-11-27 10:30:02.285 NVP: prebuffering pause
2005-11-27 10:30:02.883 NVP: prebuffering pause
2005-11-27 10:30:04.664 Prebuffer wait timed out 10 times.
2005-11-27 10:30:06.446 Prebuffer wait timed out 10 times.
...(repeated forever)

According to RingBuffer.cpp:204 "Invalid file handle" means that read()
read less than 20 bytes. But the file's length is 176 MB now. Maybe it
was empty at 10:30:02? Modify time of that file is 10:37..

backend:
2005-11-27 10:14:55.861 Scheduled 0 items in 0.0 = 0.00 match + 0.01
place
2005-11-27 10:30:00.264 Preview Error: Run() file not local:
'myth://127.0.0.1:6543/63990_20051127101203.mpg'
2005-11-27 10:30:00.737 TVRec(2): RingBufferChanged()
2005-11-27 10:30:00.743 Finished recording Unknown: channel 63990
2005-11-27 10:37:30.029 TVRec(2): Changing from WatchingLiveTV to None
2005-11-27 10:37:30.185 Finished recording Unknown: channel 63990

BTW, I was able to get back to menu by pressing the Esc (at 10:37:30).
Then I returned to the same channel of LiveTV and backend reported
negative duration of a file:

2005-11-27 10:37:40.332 Invalid file handle when
opening /myth/tv/63990_20051127103740.mpg.  6 retries remaining.
0: start_time: 857.475 duration: -9223372036854.775
stream: start_time: 9527.500 duration: -9223372036854.775 bitrate=0 kb/s

The file /myth/tv/63990_20051127103740.mpg exists, is readable and its
length is 8 MB.

ls -l of stuff related to this problem:

-rw-r--r--  1 mythtv mythtv   4489628 2005-11-27 10:12 63990_20051127101201.mpg
-rw-r--r--  1 mythtv mythtv 423371300 2005-11-27 10:30 63990_20051127101203.mpg
-rw-r--r--  1 mythtv mythtv 176334036 2005-11-27 10:37 63990_20051127103000.mpg
-rw-r--r--  1 mythtv mythtv   8530124 2005-11-27 10:37 63990_20051127103740.mpg

I admit I don't understand the internals at all (haven't looked inside
yet) but I'd guess the Live TV decided to create a new file at 10:30
(normally I think LiveTV does it based on EPG but there is no EPG so
maybe the LiveTV does 30 minutes blocks in such case?) but somehow the
frontend didn't catch the backend change. Just my theory :-) Is this
problem worth a ticket or is it something wrong in my particular setup?

Petr




More information about the mythtv-dev mailing list