MythTV 32: Mythfrontend crashing computer

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

MythTV 32: Mythfrontend crashing computer

Post by ljpage »

I have recently upgraded from a long time stable Mythtv 29 on Ubuntu 18.04 (via 20.04) to version 32 on Ubuntu 22.04. The upgrade of the backend server and both frontend satellites went without any hitches and all seem to be running correctly. However the Mythfrontend satellites crash at irregular intervals (from 2min to 10+ hours). The crashes occur when streaming Live TV, Recordings or Music and when browsing Recordings.

To try to fix this I have tried:

Upgrading to the Mythbuntu 32 mythtv package (backend and frontends)
Home build of mythfrontend from the mythtv fixes/32 source
changed to later (5.18) kernel (backend and frontends)
Switch from r8169 to r8168 network driver (backend and frontends)
overwritten Ubuntu install on frontend satellite with openSUSE tumbleweed and home build mythfrontend from source

All to no avail. The satellite running mythfrontend end crashes (completely dead and unresponsive).

What does work:
Running Mythfrontend on the backend has no issues.
Running Mythfrontend on a satellite using WiFi appears to have no issues (!?) Even on a satellite which is hard wired and WiFi capable it will crash when hard wired but apparently not when on WiFi.

There is nothing in any of the satellite log files to suggest what is causing the crash. However there is a message that appears consistently in the mythtvbackend.log immediately before the crash (though the frontend doesn't crash after every one of these messages):

TVRecEvent recorders/dvbsignalmonitor.cpp:110 (DVBSignalMonitor) DVBSigMon[2](/dev/dvb/adapter0/frontend0): Cannot count Uncorrected Blocks#012#011#011#011eno: Unknown error 524 (524)

It appears that the backend is causing the frontend computers to crash.
There are other Mythtv users reporting problems with their network using RealTek chips with Ubuntu 22.04 and there don't seem to be any working fixes, I wonder whether they are suffering a similar issue to mine.

There may be a fix to stop the backend message about uncorrected blocks:
Realigning the Satellite Dish to get the strongest possible signal (though there don't seem to be any other issues with the strength of the signal)
Getting the backend to read the EPG on a different adaptor.

Even if one of those works I would still be intrigued to work out how it is possible for the backend to cause another computer to crash.

Since this is a live system I have been reluctant to try switching to the home built mythbackend executable as I don't want to risk messing up the working system. Should I be able to switch between the Mythbuntu built executables and my home built executables with no risk of messing up the database? I could then add debugging messages to track down what the backend does to cause the crash after issuing the "Uncorrected Blocks" message.

Does anyone have any ideas what this might be caused by?

Hardware:

Backend:
Motherboard: Gigabyte F2A68HM-HD2 (AMD A8-7650K Radeon R7, 4Gb RAM, RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller)
2x DVBSky S952 V3

Frontend 1:
Motherboard: ASRock NS3150DC-ITX (Intel Celeron N3150, 4Gb RAM, RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller)

Frontend 2:
Motherboard: ASUSTeK N3150I-C (Intel Celeron N3150, 4Gb RAM, RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller)
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: MythTV 32: Mythfrontend crashing computer

Post by paulh »

When the frontend systems crash is it just the frontend that is locked up or is the whole computer locked up? Can you still switch to another console or application for example and that works but when you switch back to the frontend it is dead/unresponsive?

One obvious test would be to try another network card using another chipset. You can often find something using an intel chipset really cheap on ebay.
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: MythTV 32: Mythfrontend crashing computer

Post by kmdewaal »

About
However there is a message that appears consistently in the mythtvbackend.log immediately before the crash (though the frontend doesn't crash after every one of these messages):

TVRecEvent recorders/dvbsignalmonitor.cpp:110 (DVBSignalMonitor) DVBSigMon[2](/dev/dvb/adapter0/frontend0): Cannot count Uncorrected Blocks#012#011#011#011eno: Unknown error 524 (524)
These messages indicate that your tuner is not capable of reporting the uncorrected block count. This is the case with the DVBSky satellite tuner cards. This message is completely harmless and the current master has been fixed so that this message is not given anymore by default.

About trouble shooting.
It appears that the backend is causing the frontend computers to crash.
This usually not what happens. MythTV applications such as mythfrontend can crash but they are not capable of crashing Linux itself. This can only be done by device drivers (and other kernel code) but it is possible that the network card driver fails on traffic for MythTV.
If the backend and the local frontend on that computer are running OK then do not change the backend.

Trying with another network card is a good idea.

You can also maybe downgrade your Ubuntu version. I am not 100% sure as I am not really into Ubuntu but I think that with the 20.04 Ubuntu you can still compile fixes/32 from source.
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

The computer dies completely. The connection to the network goes down (disappears from router list, ssh connection is lost) and the USB keyboard Ctl-Alt-F1 and Ctl-Alt-Del have no effect. A short press on the power button doesn't bring up the power/logout menu (which does happen if just mythfrontend hangs/crashes).

I'll check the effect of the network chip set by running mythfrontend on a machine that doesn't use a realtek chipset for it's wired ethernet.

I tried openSUSE tumbleweed to check whether the Ubuntu installation was at fault - that suffered the same issue. I'll try installing 20.04 on one of the front ends.

Thank you both for your help.
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

Installed Ubuntu 20.04 and built latest fixes/32 -> Still Crashes
replaced r8169 driver with r8168_dkms -> still crashes

Built latest fixes/32 on computer with intel ethernet chip set -> Not crashed yet (~2 hours), but neither has the control machine still running Ubuntu 22.04 crashed yet this morning...
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

Went back to Ubuntu 18.04 (my last known working installation) and built Mythtv fixes/32 on that (only issue was that Ansible didn't work so dependencies had to be installed manually).

This setup has run for 2x 12 hour sessions of Live TV without any crashes.

The Ubuntu 22.04 install on the intel based network card has a run without crashing since my last post.

The Ubuntu 22.04 install with RealTek based network still crashes at irregular intervals (there are also occasional network disconnects from which it recovers without crashing).

Now awaiting delivery of a USB network dongle as no space for suggested PCI card in PC case. This may take a couple of weeks to arrive!
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: MythTV 32: Mythfrontend crashing computer

Post by paulh »

Just an idea have you had a look to see what if the RealTek module takes any parameters that you can try to tweak? In the past I've had a TBS DVB card that required a little tweak like that to get it to work reliably. I haven't needed it with recent kernels though so don't have the detail to hand but I think it was something to do with it not liking sharing interrupts and needed a parameter to change it's behaviour or something like that.
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

I have had a look at issues reported with the r8169 driver and most of them appear to be about it's use with the Linux 4 kernel (which is the one that works for me). There don't seem to be any postings suggesting parameters that can be set.

I have compared the source code for r8169 for Linux 4.15 (Ubuntu 18.04) and Linux 5.15 (Ubuntu 22.04) and there appears to have been a complete re-write.

Although I have just seen that 'apt-get install linux-source' installed 4.15 source but the kernel actually running is 5.4 (Ubuntu 18.04.6) so I haven't been comparing the right sources. Downloading using git (git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git) looks like being huge.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: MythTV 32: Mythfrontend crashing computer

Post by paulh »

Yeah just checked on my system and it doesn't look like it supports any parameters you can tweak. I see using modinfo r8169 the module requires some firmware. You could try some of the other firmware versions listed to see if it makes any difference?
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

The fw file that it reads seems to be hard coded based upon the RealTek device version. Trying to play with this may be getting in too deep for now but I'll have a look at what versions there are in the git kernel download.
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

Huge number of changes made to the r8169 driver between kernels 5.4 and 5.15

fw files not part of kernel download

Thanks for your help.

I'll pause until I get the USB network dongle as this would be the easiest quick fix for me now. Shame not to get to the root of the problem but unfortunately I don't have the time to track this to the depth required at the moment and I do seem to be the only one suffering from the issue.
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: MythTV 32: Mythfrontend crashing computer

Post by kmdewaal »

Maybe linux kernel interrupt options specified in the grub commandline, such as "pci=nomsi" as described here https://habr.com/en/post/501660/, can make a difference. But, given that your problem is not MythTV-specific and that the realtek ethernet chips are used about everywhere somebody somewhere in the world must have fixed this problem already. However, I must say that a bit of googling does not show immediately something useful.
gedakc
Junior
Posts: 96
Joined: Fri Jul 18, 2014 1:28 am
Canada

Re: MythTV 32: Mythfrontend crashing computer

Post by gedakc »

According to this AskUbuntu post it seems that the Realtek wifi network issues in ubuntu 22.04 are fixed in the latest release. The post indicates some of the kernel versions that have the network issue.
ljpage
Newcomer
Posts: 13
Joined: Wed Jan 27, 2016 4:28 pm
Channel Islands

Re: MythTV 32: Mythfrontend crashing computer

Post by ljpage »

I've not had any problems with WiFi, just hard wired ethernet. I am running kernel version 5.15.0.56_generic so later that the fixed version 5.15.0.33

I have been testing the USB Ethernet dongle for a couple of days and it was looking like it had solved the problem - then the system crashed 3 times (now 4) in an hour.

I was not able to ascertain what chip set the dongle (SUCESO USB Ethernet Adapter) used before purchase and now looking at the output of lsusb I get:

Bus 002 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

So I haven't proved anything! Though it does use a different RealTek chip & driver: r8152/r8153_ecm
Post Reply