Project

General

Profile

Connection errors

Added by Bernd Nebendahl over 5 years ago

Hello,

I'm running tvheadend 24/7 on a headless system (ASRock J3455M mATX, 4 GB Memory, 240 GB SSD, Digital Devices Max SX8) on libreELEC 9.0.1 with Kodi disabled (systemctl mask kodi). Recordings and timeshift are currently going to the SSD. The system is connected to other systems (Win 10 with Kodi 18.1, libreelec 9.0.1) via Gbit lan. I was able to get all services mapped to channels and on a first glance everything seems fine (live TV, recording, EPG). However from time to time (I was not able to identify a pattern) the clients don't get a connection to the server even though the server is up and running. Enabling some logging I found that in those situations linuxdvb throws the following warnings:

2019-04-25 07:27:23.310 [   INFO]:htsp: 192.168.178.31: Welcomed client software: Kodi Media Center (HTSPv34)
2019-04-25 07:27:23.310 [   INFO]:htsp: 192.168.178.31 [ Kodi Media Center ]: Disconnected
2019-04-25 07:27:24.309 [WARNING]:linuxdvb: DVB-S/S2X #5 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:24.753 [WARNING]:linuxdvb: DVB-S/S2X #4 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:25.204 [WARNING]:linuxdvb: DVB-S/S2X #1 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:25.513 [WARNING]:linuxdvb: DVB-S/S2X #3 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:25.906 [WARNING]:linuxdvb: DVB-S/S2X #2 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:26.006 [WARNING]:linuxdvb: DVB-S/S2X #6 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:26.607 [WARNING]:linuxdvb: DVB-S/S2X #0 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:26.908 [WARNING]:linuxdvb: DVB-S/S2X #7 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:27.109 [WARNING]:linuxdvb: DVB-S/S2X #5 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:27.760 [WARNING]:linuxdvb: DVB-S/S2X #3 - poll TIMEOUT
2019-04-25 07:27:27.760 [WARNING]:linuxdvb: DVB-S/S2X #4 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:28.662 [WARNING]:linuxdvb: DVB-S/S2X #0 - poll TIMEOUT
2019-04-25 07:27:28.813 [WARNING]:linuxdvb: DVB-S/S2X #2 - poll TIMEOUT
2019-04-25 07:27:28.963 [WARNING]:linuxdvb: DVB-S/S2X #1 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:29.163 [WARNING]:linuxdvb: DVB-S/S2X #3 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:29.464 [WARNING]:linuxdvb: DVB-S/S2X #2 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:29.664 [WARNING]:linuxdvb: DVB-S/S2X #0 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:29.865 [WARNING]:linuxdvb: DVB-S/S2X #6 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:30.266 [WARNING]:linuxdvb: DVB-S/S2X #7 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:30.726 [WARNING]:linuxdvb: DVB-S/S2X #5 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:31.268 [WARNING]:linuxdvb: DVB-S/S2X #4 - FE_READ_STATUS error Input/output error
2019-04-25 07:27:32.170 [WARNING]:linuxdvb: DVB-S/S2X #1 - FE_READ_STATUS error Input/output error

Rebooting the system fixes the problem, but obviously this is not even a workaround. What else can I do to fix this problem or identify the root cause?

Thank you,
Bernd

tvheadend.log (363 KB) tvheadend.log larger log file that contains the warnings described in the text

Replies (13)

RE: Connection errors - Added by saen acro over 5 years ago

Is your system grounded?
Check your cables and F-connectors.
Sometimes Dish collect static electricity with device identify as short connection,

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

All 4 cables (quattro LNB) are running through lightning protectors (Kathrein KAZ 12 https://www.kathrein.de/en/sat/product/21810002/index.html followed by Kathrein KAZ12 https://www.kathrein.de/en/sat/product/507205/index.html). Those are connected to the protective earth (grounding of the building) using a 4mm^2 cable.

With those details, do you still suspect an issue with static electricity?

Thank you,
Bernd

RE: Connection errors - Added by saen acro over 5 years ago

With Mains tester you can see short flashing of lamp when static electricity is discharged.
It can come from other device in place

On other side is dmesg show something?

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

I'll post the output of dmesg later today or tomorrow.

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

dmesg did not show anything particular. I played with the tvheadend settings of the DVB tuner card and things are quite stable right now. I'll keep an eye on it over the next couple of days and eventually will post the setiings that seem to work with this combination of Digital Devices Max S8 and tvheadend.

Bernd

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

Attached is the output of dmesg. Today tvheadend stopped receiving multiple times. I'm attaching logfiles I was able to collect. Hopefully they help to find the problem.

dmesg.201904292332 (51.4 KB) dmesg.201904292332 dmesg out from latest start
tvh201904292038.log (49.9 KB) tvh201904292038.log logfile containing crash #2
tvh201904292121.log (39.7 KB) tvh201904292121.log logfile containing crash #3
tvh201904292029.log (417 KB) tvh201904292029.log logfile containing crash #1

RE: Connection errors - Added by saen acro over 5 years ago

Do you update bios to latest?
Do you disable unused devices in bios, com/printer port sound card?

cat /proc/interrupts

do you optimise with powertop

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

I bought the board 2 weeks ago but did not update the bios. I disabled all unused devices. See below output if the command you suggested.

I did not use powertop so far (it's not part of a standard libreelec installation, I would have to install it before)

Thank for you continued support.

Bernd

PS I today made a backup of tvheadend and updated to version 4.3-1774 (available from http://build.mycvh.de/ ). Let's see how this goes.

interrupts (2.08 KB) interrupts Output of cat /proc/interrupts

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

On a side note. I noticed that in case I don't get a connection to tvheadend there is a very high load on the CPU (see attached).

Bernd

RE: Connection errors - Added by saen acro over 5 years ago

use HTOP, or run TOP and press 1, Shift+H, Shift+V
then scroll down to tvh process

example from Atom D410

top - 09:58:00 up 4 days, 11:59,  2 users,  load average: 0,09, 0,14, 0,10
Threads: 417 total,   1 running, 416 sleeping,   0 stopped,   0 zombie
%Cpu0  :  8,8 us,  0,3 sy,  0,0 ni, 90,6 id,  0,3 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu1  :  1,6 us,  2,6 sy,  0,0 ni, 95,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem :  2052480 total,   307572 free,   347052 used,  1397856 buff/cache
KiB Swap:  1047548 total,  1031212 free,    16336 used.  1363468 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 1228 root      20   0   10468   5980   5484 S  0,0  0,3   1:31.19  `- wpa_supplicant
 1234 hts       20   0  122652  15968  10248 S  0,0  0,8  12:21.44  `- tvheadend
 1235 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.06      `- tvh:log
 1298 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.38      `- tvh:notify
 1299 hts       20   0  122652  15968  10248 S  0,0  0,8   0:27.09      `- tvheadend
 1300 hts       35  15  122652  15968  10248 S  0,0  0,8   0:00.04      `- tvh:save
 1301 hts       20   0  122652  15968  10248 S  0,0  0,8   1:24.22      `- tvh:mtick
 1302 hts       20   0  122652  15968  10248 S  0,0  0,8   0:23.26      `- tvh:mtimer
 1303 hts       39  19  122652  15968  10248 S  0,0  0,8   0:02.95      `- tvh:tasklet
 1304 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:fsmonitor
 1552 hts       20   0  122652  15968  10248 S  0,0  0,8   0:02.55      `- tvh:imagecache
 1553 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.07      `- tvh:httpc
 1720 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:service
 1722 hts       20   0  122652  15968  10248 S  0,0  0,8   0:13.15      `- tvh:cc-newcamd
 1833 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:iptv
 1846 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:tshift-reap
 1847 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:tcp-loop
 1848 hts       20   0  122652  15968  10248 S  0,0  0,8   0:18.12      `- tvh:upnp
 1849 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:svcmap
 2353 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.01      `- tvh:epggrabi
 2354 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.30      `- tvh:epgdata
 2355 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:dvr-inotify
 2379 hts       20   0  122652  15968  10248 S  0,0  0,8   0:01.26      `- tvh:avahi
 2402 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:mi-table
 2403 hts       20   0  122652  15968  10248 S  0,0  0,8   0:00.00      `- tvh:mi-main
 2404 hts       20   0  122652  15968  10248 S  0,0  0,8   2:17.43      `- tvh:mi-table
 2405 hts       20   0  122652  15968  10248 S  0,0  0,8   0:09.50      `- tvh:mi-main

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

The upgrade to version 4.3-1774 definitly helped. I did not see any problems so far. Will keep you updated. (Below a screenshot of top as suggested by you).

top.png (104 KB) top.png

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

So far the problems reported earlier have not shown up again. It looks like the new tvheadend version fixed the problems I experienced.

I then did some more testing using the following setting:

Enabled all 8 receivers for streaming and epg grabbing.

I then started to watch 4 different HDTV channels on 3 Kodi clients and 1 iOS client each slightly time shifted. After that I started recordings until all 8 receivers were reported to be used in the tvheadend status window. I was able to start 8 recordings (some channels were on the same mux). This worked without any problem and fairly low CPU load.

However when tvheadend decided that it would be time for an epggrab the live TV was closed (the recordings still were working). I was suprised that epggrabbing took preference over live TV. Is that expected? What is triggering epggrabbing other than the entries in the configuration (the epggrab was not starting at the time used by the cron entry)?

To avoid such a collision I allowed epggrabbing on only one receiver. Hopefully this avoid interference of epggrabbing and live TV/ recording.

Bernd

RE: Connection errors - Added by Bernd Nebendahl over 5 years ago

Hello,

here is a short update to how things progressed. After a lot of debugging (big thanks to Andreas McPherson from the Digital Devices Support Team) Digital Devices offered to look into the tuner card for a potential HW defect. In parallel I also talked to the seller of the mainboard and replaced it with a new one (still the same type though). As Digital Devices didn't want me to wait even longer for a working system they replaced my card with a brand new one!!!
The new card on the new mainboard now work without any issue! I don't know though whether the problem was caused by the tuner card or the mainboard, nevertheless I'm now very happy in particular Digital Devices offered great support!

Bernd

    (1-13/13)