[mythtv-users] mythconverg/program is marked as crashed

David L idht4n at gmail.com
Mon Jan 25 18:07:35 UTC 2016


On Mon, Jan 25, 2016 at 3:47 AM, Michael T. Dean <mtdean at thirdcontact.com>
wrote:

> On 01/25/2016 12:37 AM, David L wrote:
>
>> mythfilldatabase stopped working for me about a month ago. I get errors
>> like this:
>> 016-01-24 21:18:01.068920 E  Error preparing query: DELETE FROM program
>> WHERE starttime >= :FROM AND starttime < :TO AND chanid = :CHANID ;
>> 2016-01-24 21:18:01.068931 E  Driver error was [2/144]:
>> QMYSQL3: Unable to prepare statement
>> Database error was:
>> Table './mythconverg/program' is marked as crashed and last (automatic?)
>> repair failed
>>
>> 2016-01-24 21:18:01.069814 E  Error preparing query: DELETE FROM program
>> WHERE starttime >= :FROM AND starttime < :TO AND chanid = :CHANID ;
>>
>> I googled a bit and found some people that had similar problems.  I tried
>> this recommended solution:
>>
>> mysqlcheck -r -umythtv -pxxxxxxxx mythconverg
>>
>> But that also gave me an error:
>>
>> mythconverg.program
>> error    : Can't create new tempfile: './mythconverg/program.TMD'
>> status   : Operation failed
>>
>> I have enough disk space, so that's not the problem.  I also found people
>> with similar problems but didn't quite follow the solutions.  Any help
>> would be appreciated.
>>
>>
> The easiest approach--rather than dealing with mysqlcheck--and one that's
> better because it also performs some other useful maintenance is to run
> optimize_mythdb.pl .
>
>
> https://www.mythtv.org/wiki/User_Manual:Periodic_Maintenance#Optimize_the_Database
>
> It should be on your system, somewhere, but you can always just download
> the script from:
>
>
> https://github.com/MythTV/mythtv/raw/master/mythtv/contrib/maintenance/optimize_mythdb.pl
>
> However, that will fail, too--for the same reason--until you fix the
> problem.  You seem to have specified a TEMP directory for MySQL
> (mysqld--not the mysqlcheck script) that's too small (or full). See:
>
> http://dev.mysql.com/doc/refman/5.7/en/temporary-files.html
>
> and fix the issue with your TEMP directory, and restart mysqld. Then, you
> can run optimize_mythdb.pl and things should be working fine.



I have had mythtv installed on that backend for ~6 years and don't recall
ever specifying a temp directory for MySQL.  I assume it's using whatever
the default directory was configured when I originally installed it.  In
any case, it doesn't look like any of my partitions are full.

udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           404M  1.3M  402M   1% /run
/dev/sda1        92G   80G  7.7G  92% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            2.0G  246M  1.8G  13% /run/shm
none            100M   24K  100M   1% /run/user
/dev/sdb1       459G  413G   23G  95% /var/lib/mythtv
/dev/sdc1       1.8T  1.6T  163G  91% /sdc1
/dev/sda6       265G  229G   23G  91% /sda6
/dev/sda5       1.9G  518M  1.2G  30% /var/log

The repair program runs without any obvious errors:

Repaired/Optimized: `mythconverg`.`archiveitems`
Analyzed: `mythconverg`.`archiveitems`
<snip>

Repaired/Optimized: `mythconverg`.`program`

Analyzed: `mythconverg`.`program`

<snip>
Repaired/Optimized: `mythconverg`.`websites`
Analyzed: `mythconverg`.`websites`

But it doesn't seem to fix anything.  Per your link to the temp dir
configuration, I tried setting the TMPDIR environment variable to a
partition with lots of free space:
sudo mkdir /sdc1/tmp
sudo chmod a+rwX /sdc1/tmp/
export TMPDIR=/sdc1/tmp/
df -h $TMPDIR
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc1       1.8T  1.6T  163G  91% /sdc1

I get the same error when running mysqlcheck and the optimizer still runs
with no errors and doesn't fix the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160125/b1f6ce6c/attachment.html>


More information about the mythtv-users mailing list