TSWriter deadlock potential fix. (1 Viewer)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,584
    2,977
    Nuenen
    Home Country
    Netherlands Netherlands
    And now, the guide isn't working again. last occurrence of [DVB EPG timer] 2013-07-30 08:03:25,727. After that, no guide is downloaded. Any new patches I can try?

    Edit:If I do a Refresh DVB EPG in tvservice config, nothing happens, log says:
    [2013-08-03 18:47:30,642] [Log ] [35 ] [INFO ] - Controller: epg stop
    [2013-08-03 18:47:30,642] [EPG ] [35 ] [INFO ] - EPG: grabber stopped..
    [2013-08-03 18:47:30,658] [Log ] [35 ] [INFO ] - Controller: epg start
    [2013-08-03 18:47:30,689] [EPG ] [35 ] [INFO ] - EPG: grabber initialized for 9 transponders..
    and after that... nothing.

    After a forced restart (just clicking "Stop Service" didn't end tvservice.exe) epg is downloading again.
    As it is fairly reproducable, I'm more than willing to be a guinea pig for testing :)
     
    Last edited:

    mm1352000

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

    Sorry for the lack of replies from me - a lot of stuff is on the go at the moment.

    is there a patch (or branch) available for this (v3) version ?
    No, no branch at present. @DJBlu created the original branch so I didn't want to tread on his toes.



    Does TsWriter.ax have significant changes, apart from the extra logging, compared to the previous v2 version ?
    Only one line changed in TsWriter and one line changed in the TV library. I'd like to upload a patch for you, but if there is one thing I struggle with when it comes to git it is creating a single diff file for multiple commits.

    @doskabouter
    Please could you always post full TV Server log files when problems occur.
    Any new patches I can try?
    Not since this one:
    https://forum.team-mediaportal.com/...ock-potential-fix.114898/page-15#post-1004069




    As it is fairly reproducable, I'm more than willing to be a guinea pig for testing :)
    It sounds like the problem you're talking about now is different to the one experienced by @igalan and @nimrodel50. For clarity, can you please (1) post full fresh log files showing the problem and (2) give us the steps that you use to reproduce the problem.


    @ everyone
    In general I'm keen to know what the feeling is with the patch. Clearly it doesn't solve all problems in its current state, but is it better than what we had before? Should we get what we have into a release and then go from there?

    mm
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,584
    2,977
    Nuenen
    Home Country
    Netherlands Netherlands
    The patch is indeed an improvement, so 1 vote from me to put this in the next release.

    And as for my epg problem: I did say it was reproducable, but what I meant was that I have that on a regular basis (probably once every couple of weeks) so the major step to reproduce it is: "Turn it on and wait" :)
    I will try to keep an eye out on the epg downloading, and as soon as it fails, I'll gather the full logs and post them here
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    @ everyone In general I'm keen to know what the feeling is with the patch. Clearly it doesn't solve all problems in its current state, but is it better than what we had before? Should we get what we have into a release and then go from there?

    I've been running a version of TsWriter.ax with the v2 mods included for weeks now, and it seems fine (no regressions). Note I don't have the EPG grabbing issues anyway, so this is purely regression testing.

    So on that basis I'm OK with this catching the next train :)

    Only one line changed in TsWriter and one line changed in the TV library. I'd like to upload a patch for you, but if there is one thing I struggle with when it comes to git it is creating a single diff file for multiple commits.

    If you can post the 'before and after' code fragments with the changes I'll happily add the mods manually to my version.
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    EDIT: Nevermind, I just realised this is for 1.3 and I'm using 1.4 :oops:

    I just started using this a couple of days ago, just to help test as I don't actually need it.

    I deleted all my channels and did a fresh scan today and I've got two Film4, one on Ch791 and one on Ch10000. I've got quite a few other channels on 10000 too but I don't know if this will actually cause any problems as I haven't tested yet. The EPG grab seems to be taking longer than normal but I don't see any EPG.log, only TSWriter which is 125MB and rising and it doesn't seem to contain the same detail as the old EPG log. Is there no longer a separate EPG log?

    I don't see a "Extensive/Debug logging" option in TV Server config (or in PS++) either. Has that been removed or am I just missing something?
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks for the feedback :)

    EDIT: Nevermind, I just realised this is for 1.3 and I'm using 1.4 :oops:
    There is a patch for 1.3 and 1.4 here.
    https://forum.team-mediaportal.com/...ock-potential-fix.114898/page-15#post-1004069


    If you can post the 'before and after' code fragments with the changes I'll happily add the mods manually to my version.
    I've attached the patch for the changes between v2 and v3 (one commit). Hopefully you can apply this...
     

    Attachments

    • 0001-Ensure-that-the-EPG-grabber-is-stopped-when-the-last.patch
      1.5 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I've attached the patch for the changes between v2 and v3 (one commit). Hopefully you can apply this...

    Thanks :)
    No problem. :)

    In the interests of finally getting to the bottom of what is going on with that Canal Catala Spanish multiplex, I've spent the evening hacking our EPG parsing code into a standalone executable. The program reads dump files and feeds the TS packets through the EPG parsing code. My thought is that the program should crash or get into an endless loop... or something... if there is a problem in the code. I could also test for leaks by looping over the dump file multiple times. Anyhow, the one 250 MB dump file that I have from igalan is still not triggering any unusual behaviour. Maybe I need to test with a bigger dump file, but that would be time-consuming to upload and download, so is anybody that is still having trouble with TsWriter when using the current patch willing to let me have access to your PC to do some testing?

    @igalan ?
    @nimrodel50 ?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I'm on my smartphone so I will do it short:
    I didn't tried your patch yet but I experience some bigger problems with the epg.
    On my dads htpc there are dead locks so that the tuner isn't usable until you restart the tvservice. For that reason we changed everything on his htpc to xmltv.
    On my htpc I don't experience dead locks or i just have enough tuners so that I don't recognize it.. but sometimes there is just no epg available even there was some data an hour ago.
    Everything is working great for me except the epg. I also tried to have a look my self on the src but c++ is a nightmare for me xD
    I also had a little play with the epg collector. You should know it because you're mentioned in the credits xD
    To make a long story short: If you want access and try some things write me a pn :)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I also had a little play with the epg collector. You should know it because you're mentioned in the credits xD
    Earlier in the project I was quite heavily involved with testing. These days I don't have a lot of time to do that, but I'm still very happy when I'm able to help sbiddle by offering advice about things like DiSEqC, tuner compatibility etc. :)

    On my dads htpc there are dead locks so that the tuner isn't usable until you restart the tvservice. For that reason we changed everything on his htpc to xmltv.

    That is the problem that this patch is designed to solve. :)

    On my htpc I don't experience dead locks or i just have enough tuners so that I don't recognize it.. but sometimes there is just no epg available even there was some data an hour ago.

    Everything is working great for me except the epg. I also tried to have a look my self on the src but c++ is a nightmare for me xD



    To make a long story short: If you want access and try some things write me a pn :)

    I'm sure DJBlu and others would agree that the EPG grabber itself has room for a lot of improvements in supported EPG formats, scheduling, channel selection, debugging etc. This is a lot of work which I don't have time for right now. My main focus is to fix any bugs in TsWriter that are causing deadlocks and crashes. Maybe this time next year I will finally get time to work on the other stuff (if somebody else doesn't do it before me).
     

    Users who are viewing this thread

    Top Bottom