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

David L idht4n at gmail.com
Tue Jan 26 18:24:29 UTC 2016


On Mon, Jan 25, 2016 at 8:48 PM, Mike Holden <mikeholden99+mythtv at gmail.com>
wrote:

> On 26 January 2016 at 14:36, David L <idht4n at gmail.com> wrote:
>
>>
>>
>> On Mon, Jan 25, 2016 at 11:07 AM, Michael T. Dean <
>> mtdean at thirdcontact.com> wrote:
>>
>>> On 01/25/2016 01:07 PM, David L wrote:
>>>
>>>>
>>>> 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
>>>>
>>>
>>> It's also possible your file system is out of inodes.  You can check
>>> with df -i .
>>>
>>
>> That is not the problem:
>>
>> df -i
>> Filesystem        Inodes  IUsed     IFree IUse% Mounted on
>> udev              205701    648    205053    1% /dev
>> tmpfs             211853    733    211120    1% /run
>> /dev/sda1        6111232 709377   5401855   12% /
>> none              211853      2    211851    1% /sys/fs/cgroup
>> none              211853      5    211848    1% /run/lock
>> none              211853      5    211848    1% /run/shm
>> none              211853     19    211834    1% /run/user
>> /dev/sda6       17645568 495118  17150450    3% /sda6
>> /dev/sdb1       30531584   8626  30522958    1% /var/lib/mythtv
>> /dev/sdc1      122101760   9882 122091878    1% /sdc1
>> /dev/sda5         122160    896    121264    1% /var/log
>>
>>
>>
>>>
>>> That said, it looks like your temp file is being stored in the same
>>> directory as your mythconverg database files.  The specific error:
>>>
>>> error    : Can't create new tempfile: './mythconverg/program.TMD'
>>>>
>>>
>>> could also indicate that there's already a program.TMD file in the
>>> directory owned by someone else (or even that the user running mysqld
>>> doesn't have permission to create new files in the mythconverg directory).
>>> If that's there, delete it, then re-run mysqlcheck.
>>
>> I haven't found any directory named mythconverg in /tmp or elsewhere, so
>> I don't know where to look for a permission problem.
>>
>>
>>>
>>>
>>> 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
>>>>
>>>
>>> and you restarted mysqld from an environment that contained said
>>> TMPDIR?  Otherwise, it wouldn't affect anything (it's the MySQL server's
>>> temp, not the mysqlcheck script's temp that's the problem).
>>>
>>> Oops... my bad.
>>
>> So now I have changed my.cnf to point to /sdc1/tmp for tmpdir and
>> rebooted.  But mysqld won't even run:
>>
>> sudo /usr/sbin/mysqld
>> 160125 19:28:14 [Warning] Using unique option prefix key_buffer instead
>> of key_buffer_size is deprecated and will be removed in a future release.
>> Please use the full name instead.
>> 160125 19:28:14 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2)
>> starting as process 6699 ...
>> 160125 19:28:14 [Warning] Using unique option prefix myisam-recover
>> instead of myisam-recover-options is deprecated and will be removed in a
>> future release. Please use the full name instead.
>> 160125 19:28:14 [Note] Plugin 'FEDERATED' is disabled.
>> 160125 19:28:14 InnoDB: The InnoDB memory heap is disabled
>> 160125 19:28:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
>> 160125 19:28:14 InnoDB: Compressed tables use zlib 1.2.8
>> 160125 19:28:14 InnoDB: Using Linux native AIO
>> /usr/sbin/mysqld: Can't create/write to file '/sdc1/tmp/ibDadC00'
>> (Errcode: 13)
>> 160125 19:28:14  InnoDB: Error: unable to create temporary file; errno: 13
>> 160125 19:28:14 [ERROR] Plugin 'InnoDB' init function returned error.
>> 160125 19:28:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE
>> failed.
>> 160125 19:28:14 [ERROR] Unknown/unsupported storage engine: InnoDB
>> 160125 19:28:14 [ERROR] Aborting
>>
>> 160125 19:28:14 [Note] /usr/sbin/mysqld: Shutdown complete
>>
>>
>> I have verified that /sdc1/tmp/ibDadC00 can be written to:
>> dd if=/dev/zero of=/sdc1/tmp/ibDadC00 bs=8192 count=8192
>> 8192+0 records in
>> 8192+0 records out
>> 67108864 bytes (67 MB) copied, 0.3417 s, 196 MB/
>>
>
> It needs to be able to be written to by the mysql user. Check the
> permissions.
>

The permissions of the new tmp directory are:

ls -l /sdc1 |grep tmp
drwxrwxrwt 2 root   root     4096 Jan 25 19:33 tmp

For grins, I did this:
su - mysql
touch /sdc1/tmp/foo

That worked fine.

However, it does complain about permissions denied for some reason that I
don't understand:

strace /usr/sbin/mysqld
<snip>
gettimeofday({1453831961, 595238}, NULL) = 0
open("/sdc1/tmp/ibELQk8J", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1
EACCES (Permission denied)
write(2, "\7", 1)                       = 1
write(2, "/usr/sbin/mysqld", 16/usr/sbin/mysqld)        = 16
write(2, ": ", 2: )                       = 2
write(2, "Can't create/write to file '/sdc"..., 61Can't create/write to
file '/sdc1/tmp/ibELQk8J' (Errcode: 13)) = 61
write(2, "\n", 1
)                       = 1
time(NULL)                              = 1453831961
write(2, "160126 10:12:41", 15160126 10:12:41)         = 15
write(2, "  InnoDB: Error: unable to creat"..., 60  InnoDB: Error: unable
to create temporary file; errno: 13
) = 60
time(NULL)                              = 1453831961
write(2, "160126 10:12:41 [ERROR] Plugin '"..., 70160126 10:12:41 [ERROR]
Plugin 'InnoDB' init function returned error.
) = 70
time(NULL)                              = 1453831961
write(2, "160126 10:12:41 [ERROR] Plugin '"..., 81160126 10:12:41 [ERROR]
Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
) = 81
time(NULL)                              = 1453831961
write(2, "160126 10:12:41 [ERROR] Unknown/"..., 67160126 10:12:41 [ERROR]
Unknown/unsupported storage engine: InnoDB
) = 67
time(NULL)                              = 1453831961
write(2, "160126 10:12:41 [ERROR] Aborting"..., 34160126 10:12:41 [ERROR]
Aborting

) = 34
munmap(0xb5102000, 16769024)            = 0
munmap(0xb42d9000, 14848000)            = 0
munmap(0xb4101000, 1933312)             = 0
time(NULL)                              = 1453831961
write(2, "160126 10:12:41 [Note] /usr/sbin"..., 60160126 10:12:41 [Note]
/usr/sbin/mysqld: Shutdown complete

) = 60
gettimeofday({1453831961, 599290}, NULL) = 0
exit_group(1)                           = ?
+++ exited with 1 +++




>
> The mythconverg directory you mention will likely be based in the database
> are, possibly under /var/lib/mysql, but this depends on your distro and
> setup.
>
> Check the output of:
>     locate mythconverg
> when logged in as root (or run it via sudo).
>
It is where you predicted.  Ie, there is a /var/lib/mysql/mythconverg


>
> Lets take a step back here, you're making change after change without
> really narrowing down what your actual original issue was, and creating
> furthe issues as you go. This "resolution" path seems to be spiralling into
> oblivion!
>

To my knowledge, I've done 2 things, neither of which worked:

1)  mysqlcheck -r -umythtv -pxxxxxxxx mythconverg
2) Changed tmpdir from /tmp to /sdc1/tmp

I can easily undo step 2.  I'm not sure if step 1 actually did anything or
not.


>
> When you had your initial issue, what was in the mysql log file? There
> should be some clues there.
>
> I was not aware I had an issue until more than a month after it happened.
So I'm not sure where to look.  The backend logs that are remaining are all
later than the last show that successfully recorded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160126/ca94cb2a/attachment.html>


More information about the mythtv-users mailing list