mysql/mariadb can not be installed on Raspberry Pi

Ask questions about Arch Linux ARM. Please search before making a new topic.

mysql/mariadb can not be installed on Raspberry Pi

Postby hp4 » Thu Jul 31, 2014 2:12 pm

After one of the last system updates I've got serious problems with mysqld (mariadb):

- during startup problems were reported with system tables in system.log : this seemed to be corrected by running "mysqlcheck"
- after this the following Out-of-memory-error during startup remains :
-----------------------------------------------------------------------------------------------------------------------------------------
Jul 31 16:04:03 mars mysqld[8657]: 140731 16:04:03 [Note] InnoDB: Waiting for purge to start
Jul 31 16:04:03 mars mysqld[8657]: 140731 16:04:03 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.17-65.0 started; log sequence nu
mber 5497377
Jul 31 16:04:03 mars mysqld[8657]: 140731 16:04:03 [ERROR] mysqld: Out of memory (Needed 130760704 bytes)
Jul 31 16:04:03 mars mysqld[8657]: 140731 16:04:03 [Note] Plugin 'FEEDBACK' is disabled.
-----------------------------------------------------------------------------------------------------------------------------------------
he effect: mysqld runs with 98% CPU-load permanently after startup. although no client is running (no apache, no minidlna,...)!!!!

Therefore I decided to reinstall mariadb. But after deinstalling no new installation was possible, since the default memory requirements in the pacman-package cause the installation sequence to fail !!!

Any idea how to get mysql running on Raspberry Pi ?

Here the failure of the installation via pacman:

(13/13) Prüfe auf Dateikonflikte [##################################################] 100%
(13/13) Überprüfe verfügbaren Festplattenspeicher [##################################################] 100%
( 1/13) Installiere mariadb [##################################################] 100%
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
140731 15:15:35 [Note] InnoDB: Using mutexes to ref count buffer pool pages
140731 15:15:35 [Note] InnoDB: The InnoDB memory heap is disabled
140731 15:15:35 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
140731 15:15:35 [Note] InnoDB: Compressed tables use zlib 1.2.8
140731 15:15:35 [Note] InnoDB: Using Linux native AIO
140731 15:15:35 [Note] InnoDB: Not using CPU crc32 instructions
140731 15:15:35 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
140731 15:15:35 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
140731 15:15:35 [ERROR] Plugin 'InnoDB' init function returned error.
140731 15:15:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140731 15:15:35 [ERROR] mysqld: Out of memory (Needed 130760704 bytes)
140731 15:15:35 [ERROR] Unknown/unsupported storage engine: InnoDB
140731 15:15:35 [ERROR] Aborting

140731 15:15:35 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm

Re: mysql/mariadb can not be installed on Raspberry Pi

Postby hp4 » Mon Aug 04, 2014 9:14 am

I've got help from the Raspberry Pi forum which solved the problem:

mariadb can't be installed on a standard Raspberry Pi with standard Archlinuxarm without modifying the memory split in /boot/config.txt ( set gpu_mem to a lower value).

This maybe caused by increased memory requirements for mariadb in one of the last updates or by other applications on my system with increasing memory requirements (although I had nearly nothing activated apart from a ftp-server).
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm

Re: mysql/mariadb can not be installed on Raspberry Pi

Postby WarheadsSE » Mon Aug 04, 2014 11:39 am

$this->bbcode_second_pass_quote('', '1')40731 15:15:35 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12

Perhaps tweaking this setting would help.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: mysql/mariadb can not be installed on Raspberry Pi

Postby hp4 » Mon Aug 04, 2014 7:34 pm

How should I tweak a configuration parameter if the installation fails???

If pacman stops with an error the state of the interrupted installation seems to be undefined (so software itself doesn't run, but is left on disk and dependent packages can be installed!!)

To my opinion it's a bug in the package:

The installation of the package is not possible on widespread platforms like Raspberry Pi because the delivered configuration file contains parameters which only work on larger servers. There are probably several options to correct the bug:
- start with small values and leave it to the administrator to increase them later on
- put the initialization script outside the pacman-installation and start it later

To my opinion you don't need official distribution packages if they don't work. At least this seems to be common sense in other distributions.

Therefore I've written an github-issue

https://github.com/archlinuxarm/PKGBUILDs/issues/933

but it has been turned down and I was told to be an incompetent Linux user (seems to be a developer with extraordinary capabilities in remote analysis of other people), and I was sent to the forum to look for solutions. Maybe it's better to switch to other distributions with more cooperative developers....
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm

Re: mysql/mariadb can not be installed on Raspberry Pi

Postby WarheadsSE » Mon Aug 04, 2014 8:17 pm

Well, for one, you keep coming to us, like we're the ones maintaining that package. We don't alter the sources for packaging, or anything of the ilk. It comes undisturbed from ABS.

Now, in this case, you're essentially demanding we start maintaining an alteration because of your specific use case. I'm sorry, but whimpering about it is not going to change that fact that there is actually no issue with the packaging in any way other than the fact that your device does not have the memory immediately available for the default memory allocation from the original developer.

Now, not using a Pi on the regular basis, does the actually cause the installation of the package to fail? Or just this warning?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: mysql/mariadb can not be installed on Raspberry Pi

Postby hp4 » Mon Aug 04, 2014 10:31 pm

I don't think that this is a "specific use case". To my interpretation special use cases are those where people deviate from standard distros, build packages from source, modify packages, apply unofficial patches,...

I'm just using the standard (maybe you don't see the Pi as standard?)

- a standard Pi off the shelf
- the standard archlinuxarm distro for the Pi (downloaded about one year ago)
- no modifications !! No manipulation of packages. Memory split from the original archlinuxarm distro !!
- only regular updates with pacman -S

I've updated the installation on a regular basis and it was running fine for about a year. Then after one of the last updates (without any error message):

- mariadb seemed to be destroyed, reinstallation failed (topic of this post)
- crond jobs didn't run anymore (topics of another post in this forum)
- system dbus problems reported in syslog (not yet posted)
- lightdm problems caused the journal to overflow (not posted, I simply deinstalled lightdm, I only use remote login via ssh)

Maybe the whole installation has been destroyed by the last update via pacman and I should think about installing my Pi from scratch.

Concerning your last question: I don't see the message "Installation of system tables failed!" as warning. To me that indicates a serious installation problem. Since I'm not a mariadb-developer (but an experienced embedded developer including ARM-platforms), I don't know how to manually fix this. And I would like to avoid any side-effects from an inconsistent installation.
hp4
 
Posts: 45
Joined: Thu May 30, 2013 12:09 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 14 guests