recording sometimes works (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Excellent. I have just turned off the EPG grabbing while idle and EPG garbing while time shifting and will test later. is it defiantly only the idle EPG? can I turn it back on for time shifting or am I better off with them both off for now?

    As Mark says, only you can really tell us. The use of the idle EPG grabber may be causing tuner sharing issues, however the problem might be an EPG data format problem, in which case both the idle and timeshifting EPG grabber might need to be turned off. The only way to find out is to experiment...

    @Mark: I could be wrong, but I think this particular problem is independent of suspend/resume issues. TsWriter is either unable to allocate a new subchannel (because of autolock contention issues) or getting jammed up while parsing EPG data. I'm really hoping Tourettes will have a chance to look into this.

    mm
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    The critical section (m_Lock) in TsWriter AddChannel is used in several places but as far as I can see it is only used through CAutoLock. This makes sure that unless some long running task is performed within the autolock, it will always be released. One potential cause would be an unhandled exception within the autolocked region, but that would be logged at least in EventViewer or in tvserver log (depending on whether there is an exception handler in C# side, or not).

    Last I noticed that CaGrabber uses CEnterCriticalSection instead of CAutoLock. I am not sure why it does, and I am neither certain it makes any difference at all.

    I would start by adding line-by-line logging in AddChannel to identify where the dead lock happens (does it happen in the initial lock or does it happen during the creation of the contained objects?). Then we need to add tracing to m_Lock (but that requires debug binaries and a debug client).

    PS: Do we need binaries for 1.1.3 or 1.2.0 Beta?
     

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    I am currently recording something on one tuner but have successfully manually started both of the other tuner this afternoon (so all 3 are running). I am using 1.1.3, not the 1.2.0 beta.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    @Arion: *thank you* for offering your advice - much appreciated. :D
    That is exactly the kind of logging I introduced when I last saw this issue. I'll provide a binary for 1.1.3 that has all the later non-interface breaking changes (eg. streaming fix, unicode filename support - rev 27453 looks like a good candidate) + line-by-line debug for that AddChannel routine. If it is anything like the last time, the logging will show that the thread sleeps while waiting for the lock... and never appears to wake...
     

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    I had another go and it looks like 3*timeshift still works
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi mrkaras

    My apologies for the delay. Attached is the debug version of TsWriter that was promised. Instructions for use:

    1. Stop TV Server.
    2. Take a backup of the existing TsWriter.ax in your TV Server install folder.
    3. Download and extract the attached TsWriter into your TV Server install folder.
    4. Start TV Server.
    5. Attempt to reproduce the problem.
    6. Post your full set of logs if you're able to reproduce it.

    Cheers,
    mm

    PS: I don't know if you've still got the EPG grabbers turned off. It would be helpful to know how effective turning them off has been for combating the problem. You may have to turn one or both of them back on in order to reproduce the problem.
     

    Attachments

    • TsWriter[27405_addchannel_debug].zip
      119.8 KB

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    I have just swaped the file in and turn on the EPG grabbers. it all seems to be working and in the several tests I did with the EPG off I never saw a problem. I'll try later on, probably tomorow and see if things have stoped.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi again mrkaras

    Did you have any further trouble, or has the newer version of TsWriter solved the problem?

    mm
     

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    so far it seems to have solved the problem, is that likely, is it different or does it just have more logging added? I'll keep trying but so far the tests that failed before always seem to work
     

    Users who are viewing this thread

    Top Bottom