[confirm] EPG Grabber stuck on - prevents standby (1 Viewer)

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
It seems this bug has reared it's head again. https://forum.team-mediaportal.com/...grabbing-when-idle-preventing-standby.104613/

I don't know why it suddenly happened as it's been working fine for a few days but last night, the EPG grabber got stuck on, triggering Legacy Kernel Caller which prevents standby (I have standby disabled whilst grabbing in PS as well anyway).

This morning, it's still grabbing and the PC hasn't been to sleep.

Since installing 1.5pre I haven't been able to see an EPG log so I don't know if there's something wrong that's causing it not to make one, so I'm not sure how much info the logs will show about this bug.
 
Last edited:

mm1352000

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

    As far as I'm concerned the EPG grabber is not "stuck" on. Yes, the EPG grabber grabbed starting at 00:57 on the 28th... however from a TV Server perspective the grabbing ended at 01:03. Between that time you can see:
    [2013-08-28 01:03:02,683] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting EPG Grabbing: StandbyPrevented

    After that time you can see:
    [2013-08-28 01:03:08,125] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Inspecting EPG Grabbing:

    ...so for all TV Server knows and cares, the EPG grabbing is done. Finished. Totally stopped.
    As you have seen, the thing stopping standby is:
    [2013-08-28 01:03:08,422] [Log ] [PS StandbyWakeup] [DEBUG] - PS: Requests preventing Windows standby: [DRIVER] Legacy Kernel Caller

    That could well be related to your tuner - I don't know for sure. Though the tuner is loaded/initialised and ready to use again at the drop of a hat, TV Server is not actively using the tuner. From a TV Server perspective this is just normal behaviour.

    In other words, if the way TV Server uses the tuner is preventing standby it is entirely incidental. I'd consider such cases to be a conflict between the design of the tuner driver and the design of TV Server, and I see no easy way to resolve the conflict... unless maybe if you're willing to add ~350 ms to each and every channel change you might be able to use the reset graph TV Server debug option... but even that is not guaranteed to help. I have an idea about how such a problem could be solved better - unloading the tuner completely after x seconds of inactivity - however that would be a feature for the next generation TV engine.

    mm
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Ah OK. I just saw the grabber was still active in the morning and recalling there was a bug previously that caused the grabber not to stop and in that case it was the active grabber that was causing the Legacy Kernel Caller request which in turn prevented standby, I assumed it was the same bug again.

    I can see in the log that the grabber re-started at 02:31 and then at 07:54 though, so it wasn't running all night. I don't think I've seen Legacy Kernel Caller active when the EPG grabber has not been running before though, so I guess something's changed in that respect in TV Server. I don't think I encountered this issue in the last few weeks/months with 1.4, so maybe it's something in 1.5pre that's causing it?

    I can probably work around it by setting a requestoverride for Legacy Kernel Caller though.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Ah OK. I just saw the grabber was still active in the morning and recalling there was a bug previously that caused the grabber not to stop and in that case it was the active grabber that was causing the Legacy Kernel Caller request which in turn prevented standby, I assumed it was the same bug again.
    Yeah, that bug is still floating around and it was my initial thought when I first read the thread, but on examining your log files I found otherwise.

    I can see in the log that the grabber re-started at 02:31 and then at 07:54 though, so it wasn't running all night.
    Correct. That is normal behaviour as far as the EPG grabber is concerned.

    I don't think I've seen Legacy Kernel Caller active when the EPG grabber has not been running before though, so I guess something's changed in that respect in TV Server. I don't think I encountered this issue in the last few weeks/months with 1.4, so maybe it's something in 1.5pre that's causing it?
    The EPG grabber interacts with the tuner in exactly the same way as other parts of TV Server. It reuses the same code used to implement recording, timeshifting and scanning. In other words as far as I'm concerned there is nothing special or unique about the EPG grabber that would explain why only the EPG grabber should trigger the kernel caller thing. This would be easy to check: simply disable the EPG grabber temporarily, restart the TV service, timeshift on any channel for a few seconds then stop, and then see if the kernel thing is preventing standby.

    In answer to your question about changes: none that I'm aware of that would remotely relate to something like this, except of course PS++ has replaced PS.

    I can probably work around it by setting a requestoverride for Legacy Kernel Caller though.
    Cool.

    So, how should I be marking the thread? ... or do you want to investigate further before coming to a conclusion?
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Cool.

    So, how should I be marking the thread? ... or do you want to investigate further before coming to a conclusion?

    I don't mind, it's not really "No bug" but I don't know if there's a more appropriate tag you can use.

    I've just found another bug where the EPG grabber stops every time I move from the Manual tab to the PowerScheduler tab but I'll start a new thread for that.
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    Actually, I just left it on Manual and did a manual EPG refresh and it seemed to take longer than usual. Even now it's finished and says Idle it still shows Name: BBC One and user: epg.

    It's just cleared, shortly after I collected the logs but until then my CPU was running between 35-50% at full speed (2.8Ghz). Now that it's cleared it's dropped to around 10% at 800Mhz and Legacy Kernel Caller has cleared. So I'm not sure what was keeping it awake the other night even without the override for that, or maybe it only gets stuck on sometimes.

    Anyway, maybe these logs will shed some light on what's happening.

    EDIT: It looks like the grab took around 12mins, from [2013-08-29 18:28:19,206] to [2013-08-29 18:39:54,221]. I thought it's normally quicker than that but I could be wrong. I'm not sure there's any way to prevent it grabbing for certain channels on Freeview, other than maybe deleting them completely from the Channels list and even then I'm not sure as I believe it just grabs the entire EPG for all channels from one source (I just have BBC One selected to grab from under TV EPG grabber, which gets the radio channels as well).
     
    Last edited:

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    I was just going to reboot so closed TV Server config and it crashed. I just checked powercfg before rebooting and it showed TV Service and Legacy Kernel caller again, so the grabber must have re-started, which seems strange as I only ran it recently.

    I opened TV Server config again to confirm it was grabbing and shortly after it stopped again but it's restarted again now. I do have "Always try to fill holes" and "Always try to update existing entries" ticked but even so, it shouldn't be grabbing quite so often should it?

    As explained in my other thread, it's still stopping the grab whenever I go to the PowerScheduler tab. In fact, it seems to stop when I go to any tab other than Manual.
     

    Users who are viewing this thread

    Top Bottom