Mythfrontend database schema upgrade lock [Solved]

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

Moderator: Forum Moderators

Post Reply
Giraffe
Newcomer
Posts: 2
Joined: Fri Jun 18, 2021 10:16 pm
United States of America

Mythfrontend database schema upgrade lock [Solved]

Post by Giraffe » Fri Jun 18, 2021 10:31 pm

Hi all,

Long-time MythTV user here (since 2006!), it's a fabulous piece of software. I've run into a snag after upgrading my headless backend and two frontends and am hoping someone can help (I suspect/hope it's something simple).

I was running MythTV 0.29 on Ubuntu 16.04. Today, I upgraded all three machines to Ubuntu 20.04 (via 18.04), then upgraded to MythTV 31.0-fixes using the ppa:mythbuntu/31 repository. The backend seems to be working fine, the log files shows it was able to upgrade the database from schema 1348 to schema 1361, no other signs of trouble.

The frontend, on the other hand, can't start mythfrontend.real. Last lines in the log file are:

Code: Select all


Jun 18 14:40:56 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:04 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:05 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:06 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:15 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:16 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:17 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:19 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Jun 18 14:41:24 eoffice mythfrontend.real: mythfrontend[1487]: I CoreContext dbcheck.cpp:495 (UpgradeTVDatabaseSchema) Waiting for database schema upgrade lock
Mythfrontend is able to log into mysql remotely (I took advice from another troubleshooting post and ran this command from the frontend:

Code: Select all

mysql --user=mythtv --password=redacted--host=192.168.1.xxx mythconverg
It worked fine.

How do I force a database upgrade on a standalone frontend?
Last edited by Giraffe on Sat Jun 19, 2021 12:38 am, edited 1 time in total.

User avatar
bill6502
Developer
Posts: 1927
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythfrontend database schema upgrade lock

Post by bill6502 » Fri Jun 18, 2021 11:34 pm

The test to lock is just:

Code: Select all

SELECT GET_LOCK('schemaLock', 1);
To release it;

Code: Select all

SELECT RELEASE_LOCK('schemaLock');
Both return: 1 on success. the release returns NULL when there are
no locks locks left.

I'd stop the backend, restart SQL and start the backend. Then see if
the frontend is happy. I'm guessing a lock is stuck, but don't know
why, so I wouldn't just use the RELEASE_LOCK immediately.

mythmusic is the only plugin I see that attempts fo get a lock. Maybe that's
a clue.

Giraffe
Newcomer
Posts: 2
Joined: Fri Jun 18, 2021 10:16 pm
United States of America

Re: Mythfrontend database schema upgrade lock [Solved]

Post by Giraffe » Sat Jun 19, 2021 12:40 am

Thank you, Bill, restarting mysql did the trick. The frontend then segfaulted, but I was able to get past that using the fix posted in a recent thread (not allowed to post the link, presumably because I'm too new):

Code: Select all

sudo apt purge xserver-xorg-video-intel; rebootp
And now the whole thing works!

Post Reply