Percona Server crashes with segmentation fault when disk quota is reached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
George Ormond Lorch III | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Won't Fix
|
Low
|
George Ormond Lorch III |
Bug Description
Percona Server crashes with segmentation fault when mysqld tries to write data to a table that would mean extending the tablespace file, and disk quota is reached outside the database directory, but on the same volume.
=== OS:
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
2.6.32-341-ec2 #42-Ubuntu SMP Tue Dec 6 14:56:13 UTC 2011 x86_64 GNU/Linux
=== Percona Server version
Server version: 5.5.24-55-log Percona Server (GPL), Release 26.0
-- Filesystem and mount options
/dev/sdm /vol/ebs1 xfs rw,nodiratime,
=== Test case
-- create a new group and set quota of 10M for testing purposes
groupadd free2
xfs_quota -x -c 'limit -g bsoft=10m bhard=10m free2' /vol/ebs1
-- create database and change the group to free2 and setgid for the database directory so that all files created in the directory are owned by the user free2
mysql [(none)]> create database free2test;
chgrp -R free2 /vol/ebs1/
chmod +s /vol/ebs1/
-- create the table as follows in the database free2test
mysql [(none)]> use free2test;
Database changed
mysql [free2test]> CREATE TABLE `t1` ( `i` int(11) not null auto_increment primary key, c char(255) default 'dummy_text' ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.03 sec)
-- now create a 9M file outside of the database directory but in /vol/ebs1 where the quota is applied and change its group to free2 (the one on which quota is set)
dd if=/dev/zero of=/vol/
chgrp free2 /vol/ebs1/
-- now insert values into the table till MySQL crashes
insert into t1(i) values (null);
insert into t1 select null, c from t1; <-- 11th time this is executed and MySQL crashes
The gdb backtrace of the crash is attached. The section to look at is "Thread 1 (Thread 10457)", the segmentation fault is caused inside the function btr_page_
Related branches
- Laurynas Biveinis (community): Needs Fixing
- Alexey Kopytov (community): Approve
-
Diff: 16 lines (+5/-1)1 file modifiedPercona-Server/storage/innobase/fsp/fsp0fsp.c (+5/-1)
Is this reproducible with -
- Current 5.5 release?
- Current 5.1 release?
- Is this bug Percona Server-specific or is it reproducible with MySQL too?
Also would be useful to try reproducing this using a debug build.