Project

General

Profile

Bug #5919

Bug #5844: Invalid value in duration field of recording will crash TVH

Since yesterday night, Tvheadend silently crashes with "Aborted" when a client connects trough HTSP on 4.3-1886~g51a4c5bec

Added by Robert K over 4 years ago. Updated over 4 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
Crashes
Target version:
-
Start date:
2020-06-25
Due date:
% Done:

0%

Estimated time:
Found in version:
4.3-1886~g51a4c5bec
Affected Versions:

Description

Hi, since yesterday night Tvheadend keeps crashing whenever I connect trough HTSP. No stack trace is given, it only says "Aborted" in the Tvheadend log file. The system was not touched at all at the time it started failing and was working perfectly fine for at least a month since the failure. As the HTSP client keeps retrying to connect, and on the server side the Tvheadend service keeps restarting, it ends up in a Tvheadend starting and crashing loop till the service gives up trying to restart it.

When did this issue appear? I have an Android TV and an Android Tablet at home. Recently I had to Factory reset my Tablet so all my previous settings on it were lost. I just turned on Kodi on my Android TV to test if Tvheadend was working fine, and everything was working perfectly fine. Few minutes later, I went to setup the same account, the same settings I have on my Android TV to my Android Tablet (Also using Kodi). But the moment it connected Tvheadend started crashing whenever it would connect. Using TVHClient on the Tablet yielded the same result. Going back to my Android TV, which was working minutes before, and Tvheadend was also crashing the same as on the Tablet. I tried restarting all devices (Inclusive the Server where Tvheadend was running), always with the same result. During the whole process, I never even opened the Tvheadend Web UI (Nor the Server itself) until I realized that it was crashing even when connecting from the TV which was working minutes earlier. So no changes happened on the Server side, other than the usual EPG scanning that Tvheadend performs on its own.

The weird thing is that I'm not getting any kind of exceptions. In the Tvheadend service I just see "Aborted" when it crashes. Enabling all tracing in Tvheadend shows that the last answer the HTSP client receives before Tvheadend crashes is: [ TRACE]:htsp-ans: 192.168.1.250 [ user | TVHClient ] - answer '{"method":"initialSyncCompleted"}'

Due to the lack of errors shown during the crash, I'm not quite sure where to look for the cause. Apart from enabling all Trace logs, is there anything else I can do to find out what is crashing Tvheadend here? Does connecting a new HTSP client change anything on the Tvheadend side when the same username/password is used in two or more different devices at the same time? Any ideas where to look for more information?

I attached the output of all trace log file with everything enabled till the crash, and a manual run of Tvheadend also till the crash.


Files

tvheadend.log (6.33 KB) tvheadend.log TVHeadend Manual run till crash Robert K, 2020-06-25 11:29
tvh.traces.log (1.34 MB) tvh.traces.log TVHeadend Traces till crash Robert K, 2020-06-25 11:29

History

#1

Updated by Nihil Baxter over 4 years ago

Maybe the same issue as here? https://tvheadend.org/issues/5844#change-31713
I had crashes if connecting with Kodi or TVHclient, the only workaround was deleting all dvr logs and restarting TVH.
Traces seems not to show what exactly is the problem, but now its running fine. Didn't upgrade tvh till now, as before the crash remains every time i upgraded...

#2

Updated by Flole Systems over 4 years ago

You would have to provide a coredump to see why it's crashing. See the wiki for details.

#3

Updated by Robert K over 4 years ago

Nihil Baxter wrote:

Maybe the same issue as here? https://tvheadend.org/issues/5844#change-31713
I had crashes if connecting with Kodi or TVHclient, the only workaround was deleting all dvr logs and restarting TVH.
Traces seems not to show what exactly is the problem, but now its running fine. Didn't upgrade tvh till now, as before the crash remains every time i upgraded...

Ok, this could be the cause actually. I doid use the DVR, and I had a couple recordings where tvheadend seems to have crashed while recording and they don't appear anywhere (no errors, no completed, etc). The recorded files were still there, so I went ahead and removed them. It is possible that I haven't restarted Tvheadend since I removed those files. Curiously I can still see those movies in the logs of Tvheadend saying that it cannot stat those files (Even though they don't exist anymore). How can I purge Tvheadends DVR?

#4

Updated by Robert K over 4 years ago

Nihil Baxter wrote:

Maybe the same issue as here? https://tvheadend.org/issues/5844#change-31713
I had crashes if connecting with Kodi or TVHclient, the only workaround was deleting all dvr logs and restarting TVH.
Traces seems not to show what exactly is the problem, but now its running fine. Didn't upgrade tvh till now, as before the crash remains every time i upgraded...

Ok, so I can confirm that the issue is the same one as the one in the other thread. I removed the folder /etc/tvheadend/dvr/log and after restarting Tvheadend everything is working again. Also looking at the trace from the other thread, it ends with an Abort call, which is exactly what I see in the logs when Tvheadend crashes.

#5

Updated by Flole Systems over 4 years ago

  • Status changed from New to Invalid
  • Parent task set to #5844

Also available in: Atom PDF