Bug 1085282
Summary: | mysql 5.5 stops working with "InnoDB: Fatal error: cannot initialize AIO sub-system" | ||||||
---|---|---|---|---|---|---|---|
Product: | OpenShift Online | Reporter: | Andre Dietisheim <adietish> | ||||
Component: | Image | Assignee: | Michal Fojtik <mfojtik> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | admiller, bparees, chunchen, jhadvig, wzheng, xtian | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-05-15 15:28:36 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Andre Dietisheim
2014-04-08 09:41:01 UTC
Created attachment 883943 [details]
mysql log
Ben, this bug is hard to reproduce in devenv, but I saw this before. The problem is that MySQL 5.5 has an internal issue[1] how it detects the AIO. In some cases (especially in PROD), we hit this issue in some gears... We have several options here: 1) Disable innodb_use_native_aio in config file. This will hit performance of MySQL, but the MySQL should work... 2) Make it configurable (rhc env), so in case users hit this issue they can start the MySQL, backup data, etc... 3) Work on getting this fixed in upstream or investigate if this is not already fixed there (then just bump the mysql version in SCL)> [1] http://help.directadmin.com/item.php?id=529 Also worked on this issue and prepared an PR, after which I realized that disabling the innodb_use_native_aio setting, will slow the performance of the MySQL. Closed PR: https://github.com/openshift/origin-server/pull/5189 From documentation: aio-nr & aio-max-nr: aio-nr is the running total of the number of events specified on the io_setup system call for all currently active aio contexts. If aio-nr reaches aio-max-nr then io_setup will fail with EAGAIN. Note that raising aio-max-nr does not result in the pre-allocation or re-sizing of any kernel data structures. https://www.kernel.org/doc/Documentation/sysctl/fs.txt OPS: Do you think we can tune this to fix this bug? PR: https://github.com/openshift/origin-server/pull/5204 There is nothing more we can do from a cartridge point of view here except provide users a way to disable Native AIO in MySQL when this issue occurs. This will make the MySQL performance a bit worse, but MySQL will still operate without any problems and so users can take a snapshot of MySQL database and remove/add the MySQL cartridge. To QA: To test this, just set the OPENSHIFT_MYSQL_AIO=0 and restart the mysql cartridge in application. Then rhc ssh into mysql gear and verify that the 'innodb_use_native_aio' is disabled (set to 0) Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/8c0633c07d90d4b27f450d653ecc574a5fc877ff Bug 1085282 - Added OPENSHIFT_MYSQL_AIO variable to allow users to disable mysql AIO support It's fixed, verified on devenv_4655, please refer to the following results: 1. Create an app with mysql-5.5 rhc app create cpy27 python-2.7 mysql-5.5 --no-git 2. Set the OPENSHIFT_MYSQL_AIO=0 for mysql cart rhc env-set OPENSHIFT_MYSQL_AIO=0 -a cpy27 3. Restart the mysql-5.5 rhc cartridge restart mysql-5 -a cpy27 4. SSH into this app rhc ssh cpy27 mysql mysql> show variables where Variable_name = 'innodb_use_native_aio'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_use_native_aio | OFF | +-----------------------+-------+ 1 row in set (0.00 sec) The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |