Tvheadend CPU consumption on RPi4

  • I'm seeing Tvheadend use 100% of 1 CPU while sitting idle after it's been up for a few hours and I've watched a recording or live TV show (Still trying to repro the exact circumstances). Running top -H, I'm seeing tvh:dvr as the culprit. The CPU running at 100% is averaging 55% user time and 45% system time. Not seeing anything significant in the service log outside of a few warnings about continuity errors while watching a show.

    When running perf top I'm seeing libpthread-2.32.so [.] __condvar_confirm_wakeup as the top CPU consumer, followed closely by [kernel] [k] el0_svc_common.constprop.0.

    I'm up to date on BIOS/firmware/LibreELEC versions and debug logging is turned off. I'm using an HDHomeRun Dual (HDHR3-US) and firmware is also up to date.

    What's the next steps I can take to dig into this further?

    Edited 2 times, last by kendalvandyke (October 11, 2022 at 4:00 AM).

  • Tvh 4.2 ... and I think I've resolved the issue. I dug through the Kodi and tvh logs some more and found messages about recordings that had errors. After deleting the recordings from tvh and disk, CPU has returned to normal. Hate saying it's solved without knowing the real root cause, but it's been over a week now and all is well, so I'm moving on to the next thing around the house to fix. /shrug