Locked time-shift files cause failure to change channel (1 Viewer)

Charlie TV

MP Donator
  • Premium Supporter
  • February 22, 2014
    81
    27
    United Kingdom United Kingdom
    Country flag
    Apologise on the terminology. I got the same can't stream issue and have to stop the TV service and restart it, seems to be some kind of file lock issue? MP is left on continuous and I had just turned on the TV and was trying to watch bbc3 I captured the server logs within a couple of minutes of this issue so around 19:30.

    Cheers
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Okay.

    I'm quite confident this problem has nothing to do with the LIVE555 update because I didn't change any file handling. So, while I'm thankful for your report and happy to try to assist you with the problem, I'd prefer to do it in a separate thread.

    Either way, log files alone aren't going to enable me to figure out what the problem is. In addition to the log files I need:
    1. A full list of files - name, size, creation date/time, modification date/time - on the RAM disk at the time the problem occurs. Restarting the TV service will cause some or all time-shifting files to be deleted. After that happens it's impossible for me to see what could have been causing the problem.
    2. The list of processes which are using/locking each file [at the time the problem occurs]. You can use Resource Monitor to get this information.
     

    Charlie TV

    MP Donator
  • Premium Supporter
  • February 22, 2014
    81
    27
    United Kingdom United Kingdom
    Country flag
    Sure no worries mate. Let me upgrade everything from 1.12 to 1.13 and I'll try and capture logs and file information as requested and post in a new thread :)

    Cheers
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Thanks. :)
    I can move all the existing posts about this problem into a new thread, so don't worry about starting a new thread yourself.
     

    Charlie TV

    MP Donator
  • Premium Supporter
  • February 22, 2014
    81
    27
    United Kingdom United Kingdom
    Country flag
    Hi

    So the client screen was frozen at 04:23.

    I've taken logs from the client and server, plus various screenshots. Interestingly the server is showing its timeshifting to the client but the client has a frozen screen. Plus the server is running at 25% cpu which is high, when I stop the tvservice and restart the CPU is a lot lower 1%.

    Let me know anything you want me to try out, (note I'm only using one client at the moment)

    Cheers
     

    Attachments

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Thanks for your persistence Charlie TV - the information you've provided is excellent (y)
    I've spent the last hour or so looking at logs, screenshots and code but haven't yet been able to formulate a cohesive explanation. More investigation will be required. Right now it's 1:30 AM here in NZ so I need to get to bed. I'll try to find more time to look at this tomorrow.
    Thanks again.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    Charlie TV:

    Under normal circumstances how often does this problem happen ?

    When you say 'MP is left on continuous' do you mean that live TV is playing in MP continuously and you just turn the display(TV) off, or do you stop live TV in MP before turning off the display(TV) ?

    I'm just trying to get an idea of the sequence of events leading up to the problem...
     

    Charlie TV

    MP Donator
  • Premium Supporter
  • February 22, 2014
    81
    27
    United Kingdom United Kingdom
    Country flag
    Hi, it varies but is pretty regular. Sometimes daily, sometimes every few days, possibly depending whether I leave it on a HD or a SD channel. I can cause it to happen faster if I have multiple clients pulling from the server. Yep I just leave MP running particularly on a HD channel and turn off the TV, so when I turn the TV back on I notice its frozen. However its not related to turning the tv off or on, as the frozen state is a number of hours later.

    Hope that helps
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    @Owlsroost
    A brief outline of what I've been thinking...

    The thing that stands out to me first is the streaming server suddenly starting to fail to calculate the stream duration properly:
    26-01-2016 04:14:03.364 generateSDPDescription() duration 4514.054199 : a=range:npt=0-4514.054
    26-01-2016 04:14:09.869 generateSDPDescription() duration 0.000000 : a=range:npt=0-

    If you adjust for the clock difference between client and server (~1m 11s) that timing seems to coincide nicely with the TsReader duration requests starting to time out:
    [2016-01-26 04:12:57,652] [1a00eaf0] [ ba4] - CRTSPClient::UpdateDuration(): RTSP DESCRIBE timed out, message = liveMedia6
    [2016-01-26 04:13:01,375] [1a00eaf0] [ ba8] - CRTSPClient::ThreadProc(): recreate RTSP client

    So, I assume these events are connected in some way. However a zero-value duration would not be directly interpreted as a time-out. Time-out is independent:
    https://github.com/MediaPortal/Medi...owFilters/TsReader/source/RTSPClient.cpp#L522

    Therefore I'm left uncertain as to exactly what the connection is.


    I suspect the CPU usage on the server side is TsWriter spinning its wheels trying to create/reuse files, and all the logging. This seems to start some time after the streaming server duration calculation failure:
    [2016-01-26 04:32:49,964] [48ca9b0] [1b24] - MultiFileWriter: failed to create file E:\\live9-0.ts.tsbuffer5.ts
    [2016-01-26 04:32:49,964] [48ca9b0] [1b24] - Failed to reopen old file. It's currently in use. Dropping data!

    Based on the ~10 minute gap between creation timestamps on the time-shift files (as shown in the screenshots), I'm wondering if the delay between the streaming server and TsWriter problems starting could coincide with the time it takes TsWriter to fill a single time-shift buffer file. If it did, I was thinking maybe the failure in streaming server was responsible for locking the buffer file, thereby triggering the TsWriter problems. However the delay is a little bit on the long side so I'm uncertain...


    Currently my thinking is that the frozen screen on the client side is just a delayed symptom of the streaming server and/or TsWriter problems. The thing that doesn't make sense to me is the delay. From the continuity errors in the TsReader log I assume that TsReader is receiving data (and codecs are decoding/displaying, and renderers are rendering) until ~4:22. That's smack bang between the streaming server and TsWriter problem start times. I can't figure out why it should be that time, and not at the same time as either streaming server or TsWriter falling over. I did note with some interest during my LIVE555 update testing that TsReader seems to be able to continue playing an RTSP stream even without duration updates. On that basis I'm assuming it's more likely to be the TsWriter issue that directly causes TsReader to stop receiving data (=> freeze). However perhaps streaming server's failure to calculate durations is a symptom of a wider problem that eventually causes it to stop streaming completely.

    Lots of uncertainties... ;)
     

    Charlie TV

    MP Donator
  • Premium Supporter
  • February 22, 2014
    81
    27
    United Kingdom United Kingdom
    Country flag
    Howdy,

    I've been away on holiday so not had the time to investigate but have now synced the clocks on the server and client.

    Attached logs are from the latest freeze, interestingly the client was frozen with 02:25 shown on the news ticker tape clock, whereas the buffer screenshot shows times which are from two hours earlier. :s

    Hope it helps

    Cheers
     

    Attachments

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    Dark Eyes TVService locks up or fails to restart on resuming from sleep, and crashes when grabbing EPG Installation, configuration support 7
    C Attempt to play DVD locks up MediaPortal watch/edit Videos 0
    HTPCSourcer [Approved] Nikki Locke as SuperUser Suggestions for new Team Members 2
    morpheus_xx [Finished] Debugging dead locks in UPnP library MediaPortal 2 1
    D Downloading EPG XML file: Installation, configuration support 0
    M [solved] WTV Files does not play on client, MPEG files works well General 1
    bigboss97 Does anyone has a SoundGraph imon remote file for MP2 to share? General 0
    J Help with new grabber file. WebEPG 1
    S [solved] No sound - MKV file MediaPortal 1 Talk 2
    G WTV files General 11
    Golf4 TV-Records werden als Audio-Files importiert ? Allgemeines Support- und Diskussionsforum 0
    azzuro [fixed] [WIP MP2.3] - Audio files not imported to MP MediaPortal 2 18
    HTPCSourcer Media Accessor is flooding logs with files from attached monitor MediaPortal 2 9
    R [will not fix] [MP2-832] MP2.2.2 subtitles not shown for WTV files Submit: Bug Reports 7
    R [solved] Files moved to new location - Easy way to update database? My TVSeries 7
    R Files moved to different location - Easy way to update database? Moving Pictures 2
    thepahakurki Trakt error: Invalid or missing file Trakt 8
    M Keymapping Which File To Edit General Support 4
    F No data in "File Details" Moving Pictures 2
    R [solved] Moving pictures importer wont add files from a removable drive. Is there a work around ? Moving Pictures 8
    R Directx 9.0 June 2010 does not install on Windows 10 x64, ends up with weird failure / no debug file Installation, configuration support 0
    B xml file for perfect player Newcomers Forum 1
    K How to enable autoplaying of the next video files in the folder MediaPortal 1 Talk 2
    B Text files attached to videos Watch / Listen Media 10
    Neoculture Bulk file name update My TVSeries 6
    Similar threads

























    Top Bottom