Segmentation fault with optimize_mythdb.pl

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

Moderator: Forum Moderators

Post Reply
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Segmentation fault with optimize_mythdb.pl

Post by Vaska »

Hi,

optimize_mythdb.pl segfaults after or on the filemarkup table. Here's what the end of running optimize_mythdb.pl looks like for me.

Repaired/Optimized: `mythconverg`.`weatherdatalayout`
Analyzed: `mythconverg`.`weatherdatalayout`
Repaired/Optimized: `mythconverg`.`weatherscreens`
Analyzed: `mythconverg`.`weatherscreens`
Repaired/Optimized: `mythconverg`.`weathersourcesettings`
Analyzed: `mythconverg`.`weathersourcesettings`
Repaired/Optimized: `mythconverg`.`websites`
Analyzed: `mythconverg`.`websites`
Defragmented: recordedseek
Defragmented: program
Defragmented: filemarkup
Segmentation fault

I've tried stopping the backend and then doing a repair with "mysqlcheck -u root -p --repair mythconverg" but I'm still getting the segmentation fault with optimize_mythdb.pl.

The version of optimize_mythdb.pl that I'm using is the latest version in GIT for 29-fixes. I'm using MariaDB v10.1.34 and Perl v5.24.3 on Gentoo.

Any ideas or suggestions would be greatly appreciated.

Thanks,
Vaska.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Segmentation fault with optimize_mythdb.pl

Post by bill6502 »

Defragmented: filemarkup is the last line (almost) of the Perl script
you're running. If you know how to use MySQL, then I try the command
it's executing:

Code: Select all

mysql -u mythtv -p -e "ALTER TABLE filemarkup ORDER BY filename" mythconverg
The password is the same one in ~mythtv/.mythtv/config.xml
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: Segmentation fault with optimize_mythdb.pl

Post by Vaska »

Thanks for the reply bill6502.

I am able to run that command without a segmentation fault or any other errors, but even after having just successfully running that specific command I still get the same segmentation error when trying to run optimize_mythdb.pl.

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

Re: Segmentation fault with optimize_mythdb.pl

Post by bill6502 »

Great, now we know one thing that isn't the problem.

I'd make a copy of the file and start eliminating things. The last three
defrag items are fairly new, so maybe plant an exit(0); just before them
and run it again.

I don't speak Perl, but wonder if disconnecting from the DB before
exiting would help. Like this: $dbh->disconnect;

You could just put the exit(0); after the Include section, then move it
to the Connect to the backend and then to the Connect to the database
lines. Running the program after each, of course.

Good luck.
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: Segmentation fault with optimize_mythdb.pl

Post by Vaska »

Thanks again for the assistance bill6502. I've now noticed that the results of my cronjob that runs optimize_mythdb.pl daily doesn't have a segmentation fault line at the bottom. I originally noticed at the last line of the cronjob results so that seems to make me think it's resolved.

I still get the segmentation fault if I run it manually which doesn't make much sense to me but as long as it's not showing in my daily cronjob results I'm mostly happy.

Thanks,
Vaska
Post Reply