Sysbench breaks on multiple table test with MariaDB 5.2.7 + Aria

Bug #805930 reported by Vladimir Cvetkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Undecided
Michael Widenius

Bug Description

I run a benchmark test on pitbull.askmonty.org with the following settings:
   - sysbench 0.5
   - number of tables: 24
   - table size: 2 000 000 rows
   - DB: MariaDB 5.2.7
   - Storage engine: Aria with TRANSACTIONAL=0
   - Workload: slightly modified oltp.lua so that it supports multiple tables and locking of tables for Aria (see attached file oltp_aria.lua)

Sometime after a few minutes of testing, an error occurs and breaks the benchmark.
Here is the error that breaks sysbench:
ALERT: failed to execute MySQL query: `UPDATE sbtest13 SET k=k+1 WHERE id=4097`:
ALERT: Error 1062 Duplicate entry '1001243' for key 'k'
FATAL: failed to execute function `event': (null)

The problem is that the column 'k' does not have a unique constraint. Here is the "show create table sbtest13" output:
CREATE TABLE `sbtest13` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT '0',
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=Aria AUTO_INCREMENT=2000001 DEFAULT CHARSET=latin1 MAX_ROWS=2000000 PAGE_CHECKSUM=1 TRANSACTIONAL=0

This error may occur (or may not) randomly after a few minutes of testing and didn't happen on my local computer. The error occurred while testing with 1, 2, 4, 8 and 12 threads during a 10 minute test, and everything was OK with 16, 24, 48, 64 and 128 threads. Considering that pitbull has 12 CPUs with hyperthreading on: 24 virtual CPUs, this could be a clue (or just a coincidence though).

Here is an example call to sysbench prepare statement:
sysbench --mysql-host=localhost --mysql-socket=/home/vlado/Projects/MariaDB/temp/mysql.sock --mysql-user=root --test=/home/vlado/Projects/MariaDB/sysbench/sysbench/tests/db/parallel_prepare.lua --num-threads=24 --oltp-tables-count=24 --mysql-table-engine=aria --oltp-table-size=2000000 prepare

Here is an example call to sysbench run with 4 threads:
sysbench --mysql-host=localhost --mysql-socket=/home/vlado/Projects/MariaDB/temp/mysql.sock --mysql-user=root --test=/home/vlado/Projects/MariaDB/sysbench/sysbench/tests/db/oltp_aria.lua --oltp-tables-count=24 --max-time=600 --max-requests=0 --num-threads=4 --mysql-table-engine=aria run

Related branches

Revision history for this message
Vladimir Cvetkov (vlado-p) wrote :
Changed in maria:
milestone: none → 5.2
assignee: nobody → Michael Widenius (monty)
Michael Widenius (monty)
Changed in maria:
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

Fix pushed into 5.1 ; Will be pushed into 5.2 as soon as 5.1 test has passed on buildbot

Michael Widenius (monty)
Changed in maria:
status: In Progress → Fix Committed
Michael Widenius (monty)
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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