Project

General

Profile

Bug #5282

Web interface crashes when dvr starts

Added by Vlad Lanetz about 6 years ago. Updated about 6 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2018-10-19
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Found in version:
HTS Tvheadend 4.3-1484~g7f841a3
Affected Versions:

Description

Periodically, when start recording, the web interface falls off. In the log below is displayed:

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...
Reconnected to Tvheadend
Reconnected to Tvheadend
Reconnected to Tvheadend
Reconnected to Tvheadend

At the end of recording everything is restored. The channels thus work fine.


Subtasks

Bug #5273: Websocket: Could not decode a text frame as UTF8Invalid

Actions

History

#1

Updated by Jaroslav Kysela about 6 years ago

Provide some logs...

#3

Updated by Mark Clarkstone about 6 years ago

This sounds like the issue I had, which I reported in #5273 - Seems to be something with websockets.

#4

Updated by Vlad Lanetz about 6 years ago

Mark Clarkstone wrote:

This sounds like the issue I had, which I reported in #5273 - Seems to be something with websockets.

I think I have the same problem as you. The browser I use is chrome, and EPG in UTF8 encoding.
Only I solve the problem differently, I stop tvheadend and I delete a config in /home/hts that again the interface became available.

#5

Updated by Vlad Lanetz about 6 years ago

Jaroslav Kysela wrote:

Provide some logs...

What to write in " Trace subsystems:" ?

#6

Updated by Luis Alves about 6 years ago

Bumped on this issue when I tried to access the webui when a recording was active.

Chrome console displays the following error:

WebSocket connection to 'ws://192.168.222.226:9981/comet/ws' failed: Could not decode a text frame as UTF-8.
    (anonymous)  @    tvh.js.gz:498
    b            @    tvh.js.gz:1

#7

Updated by Luis Alves about 6 years ago

As Vlad said, it's the same as issue #5273.

I believe the error happens at: src/webui/static/app/comet.js:77

#8

Updated by Luis Alves about 6 years ago

I think I found the source of this error!

Started some random recordings then dumped the serialized json string being sent on the websocket and got: https://pastebin.com/qChQiBUe

Note the username being sent - it's random bytes (obviously not UTF-8).

Then I looked at the DVR subscription on the logs and got the same problem:
2018-10-21 23:23:57.845 [ INFO] subscription: 0001: "DVR: A Rapariga Do Livro" subscribing on channel "Cinemundo", weight: 500, adapter: "IPTV #1", network: "iptv", mux: "playlist - Cinemundo", provider: "Tvheadend 4.3-1487~gef939ad18", service: "Cinemundo", profile="pass", username="?P?

I traced the issue down to the "access_get_by_addr" function on access.c (function being used by this DVR entry).

This should help to find the source of the issue - I believe that it's somewhere on the initial load of the access config files.

#9

Updated by Luis Alves about 6 years ago

The access config loading is fine.
The problem is on the "access_get_by_addr" function - it doesn't find the access entry and returns a pointer to garbage. And I think it fails on the "netmask_verify".

#10

Updated by Luis Alves about 6 years ago

I was wrong about not finding the access entry and the issue/fix is much simpler: the access struct is being destroyed too early.

Here is a fix suggestion:
https://github.com/tvheadend/tvheadend/pull/1189

#11

Updated by Luis Alves about 6 years ago

github is acting weird... can't see the PR above, neither create a new one.

Hopefuly this link will work:
[https://github.com/tvheadend/tvheadend/commit/5cbd90a631b1d088f7f05fcd11510737bae14b3a]

#12

Updated by Jaroslav Kysela about 6 years ago

  • Status changed from New to Fixed

v4.3-1490-g3e130baba

Also available in: Atom PDF