[confirm] Timeshifting files not being deleted, causing TV to stop working (1 Viewer)

romuz

Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    In quick review of sources (if i understand correctly)
    i see that subchennel id is lowered only when all subchannels are freed

    if (_mapSubChannels.Count == 0)
    {
    _subChannelId = 0;
    then i think its never reused with more then one client connected or or if subchannel feeing was not completed sucsessfully

    In your logs Rara Avis Subchannel with id 0 had not freed and all next getsubchannels genereates new id without any reuse.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    If TV server is going to the trouble of checking the free space, why can't it do something useful instead and just delete the 'dead' files, rather than passing the problem on to the user to fix by deleting the files manually

    What comes to "why cannot those dead files be deleted?" How you can delete something that you wont know if it is already in "dead" state? If deletion fails in the first place the bookeeping is most likely already screwed up and it is not wise to delete some files at that point. Only safe state to delete those orphant buffer files is restart of the server process.

    I understand that TV-server should keep track of the buffer files and delete them as it goes along, but when MP puts up the "Not enough free disk space" message the only option available to the user to fix the problem is to delete the files manually (if there is a recording in progress you can't restart TV-server to delete them).

    In this error/problem situation, TV-server is in a much better position than the user to know which files are in-use, so why can't it offer the option of deleting all the other (not in use) *tsbuffer* files in the timeshift folders - after all, when you stop live TV MP always tells you that the timeshift buffer data is lost, so the data is not supposed to be available long-term :)

    Tony
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    If TV server is going to the trouble of checking the free space, why can't it do something useful instead and just delete the 'dead' files, rather than passing the problem on to the user to fix by deleting the files manually

    What comes to "why cannot those dead files be deleted?" How you can delete something that you wont know if it is already in "dead" state? If deletion fails in the first place the bookeeping is most likely already screwed up and it is not wise to delete some files at that point. Only safe state to delete those orphant buffer files is restart of the server process.

    I understand that TV-server should keep track of the buffer files and delete them as it goes along, but when MP puts up the "Not enough free disk space" message the only option available to the user to fix the problem is to delete the files manually (if there is a recording in progress you can't restart TV-server to delete them).

    In this error/problem situation, TV-server is in a much better position than the user to know which files are in-use, so why can't it offer the option of deleting all the other (not in use) *tsbuffer* files in the timeshift folders - after all, when you stop live TV MP always tells you that the timeshift buffer data is lost, so the data is not supposed to be available long-term :)

    As I explained, tv server doesn't know which files are in use when it fails to delete the files it should delete. You cannot fix something by deleting something you have already lost a track. The real bug itself is why the tv server loses the track.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I can confirm I have this issue too.
    I not only have remaining files, but I sometimes have files left behind that crash explorer...
    These leftover files can not be deleted at all, if I even highlight the file in explorer, then explorer crashes.

    I can restart the computer and try again but get the same result.

    the only choice I have left is to format the entire drive, which finally removes these rouge files. (.ts files)

    I still have one of these files on my main system disk from long ago, I was doing some testing and used a local folder for timeshifting on my system drive.
    One of these 'rouge' files appeared, and to this day it is still there, and any attempt to even look at the file crashes explorer...

    Not tried it myself, but you could try using this - Malwarebytes Fileassasin - to remove the problem files.

    Tony

    As I explained, tv server doesn't know which files are in use when it fails to delete the files it should delete. You cannot fix something by deleting something you have already lost a track. The real bug itself is why the tv server loses the track.

    Thanks for the comments - I was thinking along the lines of doing 'del *.*' equivalent and seeing what happens ;) (MP 1.0.2 TV-server doesn't seem to get upset by doing this)

    Tony
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    Problem related to subchannel issue(timeshift files just a symptom)
    Reviewing your logs i can see that
    2010-02-26 17:50:42.609375 [(10)]: tvcard:FreeSubChannel: subchannels count 1 subch#-1 keep graph=False
    2010-02-26 17:50:42.609375 [(10)]: tvcard:FreeSubChannel :-1 - sub channel not found
    For some reason TVServer lost subchennel id or not freed correctly
    Need to investigate

    I am not sure that is a problem. In my SINGLE seat environment that is also logged, but subchannel cleanup works.

    Also i only see the id of the subchannel increasing, not the count: FreeSubchannel is called with an increasing subchannel id but the count does not go higher than 2
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    In my current findings timeshift files deleting triggers only before begining timeshifting but not after. that is why its not reused when generates new subchennel
    Files of old subchennel remains unchanged.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    In my current findings timeshift files deleting triggers only before begining timeshifting but not after. that is why its not reused when generates new subchennel
    Files of old subchennel remains unchanged.

    I think that's also how MP 1.0.2 TV-server behaves.

    Tony
     

    Users who are viewing this thread

    Top Bottom