Percona Server with XtraDB

Deadlock on simultaneous TRUNCATE and SELECT FROM information_schema

Reported by wojtek on 2011-12-13
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
High
Sergei Glushchenko
5.1
High
Sergei Glushchenko

Bug Description

Hello,

We are having trouble with servers suspending (sometimes crashing) when a TRUNCATE TABLE is done together
with selecting data over same table from information_schema.
When suspended no query is executed, it is not possible to shutdown the server. The only solution is kill -9.

We are also experiencing it in production.

To reproduce:
 CREATE DATABASE IF NOT EXISTS testdb;
 use testdb;
 DROP TABLE IF EXISTS test;
 CREATE TABLE test (
         id INTEGER,
         text VARCHAR(60)
 )ENGINE InnoDB;

 --------
 #!/bin/bash

 for i in $(seq 1 100); do
        mysql testdb -e 'TRUNCATE TABLE test' & # <---- note the &
        mysql information_schema -e 'SELECT * FROM tables WHERE table_schema="testdb" AND table_name="test"';
 done

Server version: 5.1.59-rel13.0-log from Percona downloads
OS: Debian Squeeze amd64

yinfeng (yinfeng-zwx) wrote :

cant't repeat in Percona-Server-5.5.18-rel23.0

wojtek (vojtekb) wrote :

5.1.60-rel13.1 is affected
Would it be possible to fix this in 5.1 series?
It is actually quite serious as it causes db crashes on standard actions in certain webapplications (all sorts of 'Clean X' buttons which launch TRUNCATE TABLE).

Stewart Smith (stewart) on 2012-02-07
Changed in percona-server:
importance: Undecided → High
Changed in percona-server:
assignee: nobody → Sergei Glushchenko (sergei.glushchenko)
Changed in percona-server:
status: New → In Progress
Changed in percona-server:
status: In Progress → Fix Committed

Thank you for reporting this bug. Fix will be released in next PS 5.1release (Percona Server 5.1.62-13.3).

Changed in percona-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.