Percona Server with XtraDB

main.percona_innodb_buffer_pool_shm fails on Debian and CentOS

Reported by Aleksandr Kuzminsky on 2010-12-22
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server
Critical
Stewart Smith
5.5
Critical
Stewart Smith

Bug Description

On Percona-Server 5.1.53-12.4 main.percona_innodb_buffer_pool_shm fails:

On debian:
$ less log/mysqld.1.err
CURRENT_TEST: main.percona_innodb_buffer_pool_shm
101222 18:00:02 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
101222 18:00:02 [Note] Flashcache bypass: disabled
101222 18:00:02 [Note] Flashcache setup error is : open flash device failed

101222 18:00:02 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3.3
InnoDB: Warning: The innodb_buffer_pool_shm_key option has been specified.
InnoDB: Do not change the following between restarts of the server while this option is being used:
InnoDB: * the mysqld executable between restarts of the server.
InnoDB: * the value of innodb_buffer_pool_size.
InnoDB: * the value of innodb_page_size.
InnoDB: * datafiles created by InnoDB during this session.
InnoDB: Otherwise, data corruption in datafiles may result.
InnoDB: The shared memory segment containing the buffer pool is: key 0x1e240 (123456).
InnoDB: Warning: Failed to allocate 137789440 bytes. (new) errno 22
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
101222 18:00:02 [ERROR] Plugin 'InnoDB' init function returned error.
101222 18:00:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
101222 18:00:02 [Warning] /var/lib/buildbot/slaves/percona-server-51-12/DEB_Debian_lenny_amd64_test/work/percona-server-5.1.53-12.4-176.lenny/sql/mysqld: unknown variable 'loose-debug-sync-timeout=300'
101222 18:00:02 [Note] Event Scheduler: Loaded 0 events
101222 18:00:02 [Note] /var/lib/buildbot/slaves/percona-server-51-12/DEB_Debian_lenny_amd64_test/work/percona-server-5.1.53-12.4-176.lenny/sql/mysqld: ready for connections.

On CentOS:
main.percona_innodb_buffer_pool_shm [ fail ]
        Test ended at 2010-12-21 09:07:53

CURRENT_TEST: main.percona_innodb_buffer_pool_shm
--- /home/buildbot/slaves/percona-server-51-12/CentOS-5-x86-RPM_CentOS_5_x86_64/work/BUILD/Percona-Server/mysql-test/r/percona_innodb_buffer_pool_shm.result 2010-12-21 16:45:38.000000000 +0300
+++ /home/buildbot/slaves/percona-server-51-12/CentOS-5-x86-RPM_CentOS_5_x86_64/work/BUILD/Percona-Server/mysql-test/r/percona_innodb_buffer_pool_shm.reject 2010-12-21 17:07:53.000000000 +0300
@@ -1,6 +1,8 @@
 show variables like 'innodb_buffer_pool_shm%';
 Variable_name Value
+innodb_buffer_pool_shm_checksum ON
 innodb_buffer_pool_shm_key 123456
 show variables like 'innodb_buffer_pool_shm%';
 Variable_name Value
+innodb_buffer_pool_shm_checksum ON
 innodb_buffer_pool_shm_key 123456

mysqltest: Result length mismatch

Related branches

lp:~stewart/percona-server/bug693415
Rejected for merging into lp:percona-server/5.5
Stewart Smith (community): Disapprove on 2011-06-21
Oleg Tsarev (community): Needs Fixing on 2011-06-20
Yasufumi Kinoshita: Pending requested 2011-06-20
Changed in percona-server:
milestone: none → 5.1.53-12.4
Alexey Kopytov (akopytov) wrote :

The reason for the failure on Debian is likely a limit for shared memory size. Please check /proc/sys/kernel/shmmax and /proc/sys/kernel/shmall on that machine.

The CentOS failure is simple. innodb_buffer_pool_shm_checksum was added recently, but the test case was not updated accordingly. On Debian it just fails before there are any results to be compared.

Changed in percona-server:
assignee: nobody → Aleksandr Kuzminsky (akuzminsky)
Changed in percona-server:
status: New → In Progress
Changed in percona-server:
status: In Progress → Fix Committed
status: Fix Committed → Confirmed

The test is labelled as big (http://dev.mysql.com/doc/mysqltest/2.0/en/mysql-test-run-pl.html).
It requires kern.ipc.shmall and kern.ipc.shmmax > 33M

Changed in percona-server:
status: Confirmed → Won't Fix

Correction: kern.ipc.shmall and kern.ipc.shmmax should be > 128M

Stewart Smith (stewart) wrote :

<Yasufumi> At Jenkins, cannot we confirm the reason? It should be fail to allocate shm
 "fail to allocate shm" is depend on system. if not allocated, shm should fail.
<stewart> Yasufumi, yes, I verified on local Ubuntu too. the default kernel configuration for Ubuntu isn't adequate for what we ask.
* stewart forgets what that is... hopefully I put it in the bug report
<Yasufumi> /sbin/sysctl -a | grep shm ?
<stewart> good idea
* stewart tries that
<KAlexey> shmmax / shmall
 see also https://bugs.launchpad.net/percona-server/+bug/693415
<stewart> kernel.shmmax = 33554432
 kernel.shmall = 2097152
 kernel.shmmni = 4096
 (on laptop)
<Yasufumi> kernel.shmmax = 18446744073709551615
 kernel.shmall = 1152921504606846720
 kernel.shmmni = 4096
 (SuSE 11.2)
<stewart> small difference
 only by many many orders of magnitude :)

Stewart Smith (stewart) wrote :

causes test failure, so we need a way to at least fail more gracefully

Alexey Kopytov (akopytov) wrote :

I've been looking at it. Since the failure occurs on server startup (i.e. even before reading the .test file), there's not much we can do to handle it gracefully. Fixing test environment to avoid failures looks much more feasible.

Stewart Smith (stewart) wrote :

"Fix Released" as we have removed buffer_pool_shm functionality, leaving only a skeleton test to ensure my.cnf compatibility - which passes everywhere.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers