Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-1948

LP #1079596: Percona Server crashes with segmentation fault when disk quota is reached

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Ovais Tariq last update 21-12-2012 10:56:46

      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_RELEASE=10.04
      DISTRIB_CODENAME=lucid
      DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"

      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,relatime,nouuid,nobarrier,allocsize=2048k,logbufs=8,logbsize=32k,grpquota 0 0

      === 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/mysql/free2test
      chmod +s /vol/ebs1/mysql/free2test

      – 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/ebs1/testfile_9M bs=9000000 count=1
      chgrp free2 /vol/ebs1/testfile_9M

      – now insert values into the table till MySQL crashes
      insert into t1 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_split_and_insert.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist