Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

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

Moderator: Forum Moderators

User avatar
kmdewaal
Developer
Posts: 124
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by kmdewaal » Fri Jan 03, 2020 11:37 pm

There is a problem reported with MariaDB version 10.4.x and MythTV:
https://jira.mariadb.org/browse/MDEV-20261
Maybe this is the cause of the problems reported in this thread.

hamelg
Newcomer
Posts: 3
Joined: Fri Jan 03, 2020 8:57 pm
France

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by hamelg » Sat Jan 11, 2020 8:22 pm

I did a network capture and I see the same thing.
The crash happens only when i watch a program with no information on the grid TV (program unknown). Another clue is when mariadb crashes, mythbackend lets a empty ts file in its home directory, not in the storage group directory. I tried to debug, but it's too hard. I give up.

User avatar
kmdewaal
Developer
Posts: 124
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by kmdewaal » Sat Jan 11, 2020 10:21 pm

If you are using MariaDB version 10.4.x then I suggest to change to an older, 10.3.x, version of MariaDB, or to change to MySQL.
MythTV does rely on a correctly working database and when the database crashes on its own this is not something that can be fixed in MythTV.
When the MariaDB bug is fixed this will be noted in the Jira ticket referenced above and then also MariaDB version in which the fix will be implemented will be known.
You might also consider changing to a less bleeding-edge distribution such as Fedora or Ubuntu.

User avatar
kmdewaal
Developer
Posts: 124
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by kmdewaal » Thu Feb 06, 2020 5:44 pm

The problem in MariaDB version 10.4.x is also still present in 10.5.x as mentioned in the MariaDB Jira ticket
https://jira.mariadb.org/browse/MDEV-20261
So for the time being any MariaDB version 10.4.x or higher should be avoided with MythTV.
The good news is that they can now reproduce it and are now working on it.

Louis
Newcomer
Posts: 6
Joined: Fri May 23, 2014 1:05 pm
Denmark

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by Louis » Mon Mar 16, 2020 9:41 pm

Lately I started having issues with some channels - but this Friday I couldn't play any livetv at all - only recordings - if i restarted mythbackend I was sometimes able to much the channels.

The backend is on Arch too.

Luckily downgrading mariadb to 10.3 helped.

Thanks a lot for the fix. I'll keep an eye on whatever they bug will be fixed or I'll have to switch to Percona to stay up-to-date.

Louis
Newcomer
Posts: 6
Joined: Fri May 23, 2014 1:05 pm
Denmark

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by Louis » Thu Mar 19, 2020 5:09 pm

I've pushed MariaDB 10.3 to the AUR and updated the Arch wiki regarding this: https://wiki.archlinux.org/index.php/My ... e_database

tjbron
Newcomer
Posts: 3
Joined: Thu Jun 30, 2016 9:17 pm
United States of America

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by tjbron » Sun Mar 29, 2020 9:31 pm

Louis wrote:
Thu Mar 19, 2020 5:09 pm
I've pushed MariaDB 10.3 to the AUR and updated the Arch wiki regarding this: https://wiki.archlinux.org/index.php/My ... e_database
Thanks Louis, this is great!

I tried doing the rollback, but now I can't start mariadb.
I'm getting this. What am I forgetting to do?

Code: Select all

[ERROR] Fatal error: Can't open and lock privilege tables: 'mysql.user' is not of type 'TABLE'
mariadb.service: Main process exited, code=exited, status=1/FAILURE
mariadb.service: Failed with result 'exit-code'.
edit: found this tidbit in the Arch Wiki, but I get mariadb-install-db: command not found...
Install mariadb, afterwards run the following command before starting the mariadb.service:
# mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Louis
Newcomer
Posts: 6
Joined: Fri May 23, 2014 1:05 pm
Denmark

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by Louis » Tue May 19, 2020 9:05 pm

tjbron wrote:
Sun Mar 29, 2020 9:31 pm
I tried doing the rollback, but now I can't start mariadb.
I'm getting this. What am I forgetting to do?

Code: Select all

[ERROR] Fatal error: Can't open and lock privilege tables: 'mysql.user' is not of type 'TABLE'
mariadb.service: Main process exited, code=exited, status=1/FAILURE
mariadb.service: Failed with result 'exit-code'.
edit: found this tidbit in the Arch Wiki, but I get mariadb-install-db: command not found...
Install mariadb, afterwards run the following command before starting the mariadb.service:
# mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
In MariaDB the command is still called "mysql_install_db". I did some debugging and included that somehow I managed to downgrade from MariaDB 10.4 -> 10.3 on one Arch Linux install while it fails on all other Arch Linux installations.

I suggest you try to upgrade to MariaDB 10.4.13 and see if your issues have been fixed. It bug should have been fixed upstream, however I still have issues viewing live tv from at least one channel.

If you still have problems with 10.4.13 the easiest to downgrade to 10.3 is to dump all your databases, completely delete all MariaDB with all data, install 10.3 and restore databases. This is because configuration files have changed from 10.3 to 10.4. Remember to stop mythbackend while trying this and take care and remember to backup!

Louis
Newcomer
Posts: 6
Joined: Fri May 23, 2014 1:05 pm
Denmark

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by Louis » Thu May 21, 2020 7:37 pm

I still have issues with viewing live tv after upgradig to mariadb 10.4.13.

I have a single channel with no signal when viewing from Kodi on my Pi.

Does other have similar issues with MariaDB 10.4.13 and MythTV?

Log snippet:
2020-05-21 21:36:16.563343 I [470269/470497] ProcessRequest mainserver.cpp:1768 (HandleAnnounce) - MainServer: MainServer::ANN Monitor
2020-05-21 21:36:16.563370 I [470269/470497] ProcessRequest mainserver.cpp:1770 (HandleAnnounce) - MainServer: adding: louis-hostname(56237e52be50) as a client (events: 0)
2020-05-21 21:36:16.592530 I [470269/470513] MythSocketThread(40) mainserver.cpp:7856 (connectionClosed) - Monitor sock(56237e52be50) 'louis-pi' disconnected
I tried to downgrade to MariaDB 10.3 and have no issues viewing that channel using that MariaDB version.

bitspiel
Junior
Posts: 28
Joined: Sat Mar 15, 2014 8:23 am
United States of America

Re: Mythbackend crashes when attempt to run LiveTV [Arch installation with MariaDB errors]

Post by bitspiel » Thu May 21, 2020 8:05 pm

Release notes for 10.4.13
https://mariadb.com/kb/en/mariadb-10413-release-notes/

does NOT reference the bug Myth needs fixed https://jira.mariadb.org/browse/MDEV-20261

Post Reply