MariaDB 10.4 has a nasty bug affecting MythTV
Moderator: Forum Moderators
-
- Junior
- Posts: 65
- Joined: Thu Mar 26, 2020 8:07 pm
MariaDB 10.4 has a nasty bug affecting MythTV
I have seen many posts concerning the issue of MariaDB constantly disconnecting and reconnecting when trying to either WATCHTV or view Live TV from the guide. It starts out with this error when a channel is selected:
LoadFromProgram(): SQL contains LIMIT clause, caller should be updated to use limit parameter instead
Then the database calls blow up:
QMYSQLResult::cleanup: unable to free statement handle
2020-04-03 15:22:56.844453 E DB Error (LoadByTemplate):
Query was:
SELECT recordid, category, (category = ?) AS catmatch, (category = ?) AS typematch FROM record WHERE type = ? AND (category = ? OR category = ? OR category = 'Default') ORDER BY catmatch DESC, typematch DESC
Bindings were:
:CAT1="", :CAT2="", :CATTYPE1="", :CATTYPE2="", :TEMPLATE=11
Driver error was [2/2006]:
QMYSQL3: Unable to execute statement
Database error was:
MySQL server has gone away
2020-04-03 15:22:56.844873 E Error preparing query: SELECT name FROM playgroup WHERE name = :TITLE1 OR name = :CATEGORY OR (titlematch <> '' AND :TITLE2 REGEXP titlematch)
2020-04-03 15:22:56.844881 E Driver error was [2/2006]:
QMYSQL3: Unable to prepare statement
Database error was:
MySQL server has gone away
...and these database errors go on and on and on with the the database disconnecting and reconnecting.
I noticed today, after getting V31 working a couple of days ago that my guide is not totally populated. I am using the EIT guide, what is received over the air from an HDhomerun HDHR-US Prime. As the backend runs it seems that as MythFillDB runs every time the guide becomes a little more populated. What I discovered, however, is that if a channel from the guide is selected which has no guide data, just shows unknown across the whole screen, then the message about the SQL contains LIMIT clause is thrown and then the database problems go crazy. If a channel is selected that is populated with guide info then everything works normally, and as long as there is a free tuner, the video is presented. This is what it should look like:
TVRec[1]: Changing from None to WatchingLiveTV
2020-04-03 15:25:57.658524 I TVRec[1]: TuningFrequency
2020-04-03 15:25:57.692259 I HDHRSH[1](1019344C): Added 2 devices from 1019344C
2020-04-03 15:25:57.731277 I HDHRSH[1](1019344C): Connected to device(1019344C-0)
2020-04-03 15:25:57.747290 N AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
2020-04-03 15:25:57.756952 N ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
2020-04-03 15:25:58.573764 N AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
2020-04-03 15:25:58.584325 N ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
2020-04-03 15:25:58.584963 I TVRec[1]: TuningNewRecorder - CreateRecorder()
I have checked several channels and this always seems to be the case. I am assuming that the WATCHTV button must be selecting a channel, maybe the default one, that does not have guide data populated. If a channel is selected that has guide info the channel plays okay, otherwise the database gets pissed off.
Anybody seeing the same thing?
LoadFromProgram(): SQL contains LIMIT clause, caller should be updated to use limit parameter instead
Then the database calls blow up:
QMYSQLResult::cleanup: unable to free statement handle
2020-04-03 15:22:56.844453 E DB Error (LoadByTemplate):
Query was:
SELECT recordid, category, (category = ?) AS catmatch, (category = ?) AS typematch FROM record WHERE type = ? AND (category = ? OR category = ? OR category = 'Default') ORDER BY catmatch DESC, typematch DESC
Bindings were:
:CAT1="", :CAT2="", :CATTYPE1="", :CATTYPE2="", :TEMPLATE=11
Driver error was [2/2006]:
QMYSQL3: Unable to execute statement
Database error was:
MySQL server has gone away
2020-04-03 15:22:56.844873 E Error preparing query: SELECT name FROM playgroup WHERE name = :TITLE1 OR name = :CATEGORY OR (titlematch <> '' AND :TITLE2 REGEXP titlematch)
2020-04-03 15:22:56.844881 E Driver error was [2/2006]:
QMYSQL3: Unable to prepare statement
Database error was:
MySQL server has gone away
...and these database errors go on and on and on with the the database disconnecting and reconnecting.
I noticed today, after getting V31 working a couple of days ago that my guide is not totally populated. I am using the EIT guide, what is received over the air from an HDhomerun HDHR-US Prime. As the backend runs it seems that as MythFillDB runs every time the guide becomes a little more populated. What I discovered, however, is that if a channel from the guide is selected which has no guide data, just shows unknown across the whole screen, then the message about the SQL contains LIMIT clause is thrown and then the database problems go crazy. If a channel is selected that is populated with guide info then everything works normally, and as long as there is a free tuner, the video is presented. This is what it should look like:
TVRec[1]: Changing from None to WatchingLiveTV
2020-04-03 15:25:57.658524 I TVRec[1]: TuningFrequency
2020-04-03 15:25:57.692259 I HDHRSH[1](1019344C): Added 2 devices from 1019344C
2020-04-03 15:25:57.731277 I HDHRSH[1](1019344C): Connected to device(1019344C-0)
2020-04-03 15:25:57.747290 N AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
2020-04-03 15:25:57.756952 N ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
2020-04-03 15:25:58.573764 N AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
2020-04-03 15:25:58.584325 N ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
2020-04-03 15:25:58.584963 I TVRec[1]: TuningNewRecorder - CreateRecorder()
I have checked several channels and this always seems to be the case. I am assuming that the WATCHTV button must be selecting a channel, maybe the default one, that does not have guide data populated. If a channel is selected that has guide info the channel plays okay, otherwise the database gets pissed off.
Anybody seeing the same thing?
Re: MariaDB 10.4 has a nasty bug affecting MythTV
See viewtopic.php?f=36&t=3231&start=30#p17240
MariaDB versions 10.4 and 10.5 have a bug that hurts MythTV. The highest version to use of MariaDB is 10.3.
MariaDB versions 10.4 and 10.5 have a bug that hurts MythTV. The highest version to use of MariaDB is 10.3.
-
- Junior
- Posts: 65
- Joined: Thu Mar 26, 2020 8:07 pm
Re: MariaDB 10.4 has a nasty bug affecting MythTV
My system is working as I mentioned. If I select a channel from the guide that has guide info populated it works. What I was trying to pass on is that the MariaDB gets pissed off if a channel is selected that shows unknown for all time slots. I think the SQL contains limit clause notification advises the database doesn't want to have an "infinite" showing set up. I have tested on several channels and it works for me. I have read the posts from the link you included in your reply. I am running MariaDB 10.4.12 and it does work if used as I suggest.
Re: MariaDB 10.4 has a nasty bug affecting MythTV
That's useful information to have if they don't hurry up and fix the bug then maybe we can work around it somehow?
-
- Junior
- Posts: 65
- Joined: Thu Mar 26, 2020 8:07 pm
Re: MariaDB 10.4 has a nasty bug affecting MythTV
I am very new to this so pardon me if I think out loud. I am wondering if this is not particularly a bug in the MariaDB code, but an issue with the mythtv code that can't play with the newer updates/standards of MariaDB. I have really turned into a fan of mythtv the last few days so this is not a slam for the developers, just a suggestion.
Re: MariaDB 10.4 has a nasty bug affecting MythTV
No it's a regression in MariaDB. 10.3 works fine but later versions crash. No SQL server should crash when passed a simple query
The MariaDB developers are aware of the problem, have been since August last year, and can reproduce it but are being very slow to fix it.
The MariaDB developers are aware of the problem, have been since August last year, and can reproduce it but are being very slow to fix it.
-
- Junior
- Posts: 65
- Joined: Thu Mar 26, 2020 8:07 pm
Re: MariaDB 10.4 has a nasty bug affecting MythTV
Ok. Thanks. For now I am very satisfied with the installation the way it is working for me.
Re: MariaDB 10.4 has a nasty bug affecting MythTV
I have my mythtv on opensuse leap 15.2 which uses mariadb 10.4. I was unable to change down to mariadb 10.3 because it wrecked other dependencies and was difficult to restart. I do have 2 other systems on separate partitions - leap 15.1 and kde neon. Neon uses mysql and that works and leap 15.1 uses mariadb 10.2 so that works.
I did a dump of 15.1's mythcoverg and restored it restored it in 15.2. That filled the epg and after a little tweaking of setup I was able to watch live tv and the epg updates. It's a bit flaky but it seems to work.
Thanks to rockinrobin72 for the tip about having program details stored.
I did a dump of 15.1's mythcoverg and restored it restored it in 15.2. That filled the epg and after a little tweaking of setup I was able to watch live tv and the epg updates. It's a bit flaky but it seems to work.
Thanks to rockinrobin72 for the tip about having program details stored.
Pete
Re: MariaDB 10.4 has a nasty bug affecting MythTV
BTW,
Fedora 32 was released yesterday and it has/uses MariaDB 10.4
Fedora 32 was released yesterday and it has/uses MariaDB 10.4
Re: MariaDB 10.4 has a nasty bug affecting MythTV
I did upgrade my development machine to Fedora 32 and yes, the backend crashes reliably as discussed in this thread. Looks like a workaround in MythTV is needed.
Re: MariaDB 10.4 has a nasty bug affecting MythTV
I have hacked around a bit in the MythTV SQL code to see if I can find a workaround for the MariaDB bug as the MariaDB bug is apparently not going to be fixed real soon but I could not find one. SQL experts are hereby invited to either fix MariaDB or MythTV.
For the time being, I have removed MariaDB and installed MySQL from Oracle:and this works OK on Fedora 32.
For the time being, I have removed MariaDB and installed MySQL from Oracle:
Code: Select all
klaas@modu mythtv]$ mysql --version
mysql Ver 8.0.20 for Linux on x86_64 (MySQL Community Server - GPL)
[klaas@modu mythtv]$
Re: MariaDB 10.4 has a nasty bug affecting MythTV
If you can get up to date program details into your mythconverg it works. So as I say above if you can get a dump of an up to date mythconverg from a mariadb 10.2 it has solved the problem for me. I now have a working mythfrontend and mariadb 10.4.
Pete