Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
11.6.2, 11.8.5
-
None
-
Percona Toolkit System Summary Report ######################
Date | 2025-01-15 15:15:51 UTC (local TZ: EST -0500)
Hostname | node3
Uptime | 47 days, 22:10, 12 users, load average: 0.13, 0.24, 0.19
Platform | Linux
Release | Ubuntu 24.04.1 LTS (noble)
Kernel | 6.8.0-49-generic
Architecture | CPU = 64-bit, OS = 64-bit
Threading | NPTL 2.39
SELinux | No SELinux detected
Virtualized | No virtualization detected
# Processor ##################################################
Processors | physical = 2, cores = 28, virtual = 56, hyperthreading = yes
Speeds | 1x2499.895, 50x2500.000, 1x2500.157, 1x2500.336, 1x2501.067, 1x2501.502, 1x2503.899
Models | 56xIntel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz
Caches | 56x35840 KB
Designation Configuration Size Associativity
========================= ============================== ======== ======================
# Memory #####################################################
Total | 251.8G
Free | 3.5G
Used | physical = 13.9G, swap allocated = 0.0, swap used = 0.0, virtual = 13.9G
Shared | 6.0M
Buffers | 236.1G
Caches | 237.8G
Dirty | 540 kB
UsedRSS | 11.7G
Swappiness | 1
DirtyPolicy | 20, 10
DirtyStatus | 0, 0
Numa Nodes | 2
Numa Policy | default
Preferred Node | current
Node Size Free CPUs
==== ==== ==== ====
node1 128967 MB 1474 MB 14 15 16 17 18 19 20 21 22 23 24 25 26 27 42 43 44 45 46 47 48 49 50 51 52 53 54 55
node0 128842 MB 2133 MB 0 1 2 3 4 5 6 7 8 9 10 11 12 13 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Percona Toolkit System Summary Report ###################### Date | 2025-01-15 15:15:51 UTC (local TZ: EST -0500) Hostname | node3 Uptime | 47 days, 22:10, 12 users, load average: 0.13, 0.24, 0.19 Platform | Linux Release | Ubuntu 24.04.1 LTS (noble) Kernel | 6.8.0-49-generic Architecture | CPU = 64-bit, OS = 64-bit Threading | NPTL 2.39 SELinux | No SELinux detected Virtualized | No virtualization detected # Processor ################################################## Processors | physical = 2, cores = 28, virtual = 56, hyperthreading = yes Speeds | 1x2499.895, 50x2500.000, 1x2500.157, 1x2500.336, 1x2501.067, 1x2501.502, 1x2503.899 Models | 56xIntel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz Caches | 56x35840 KB Designation Configuration Size Associativity ========================= ============================== ======== ====================== # Memory ##################################################### Total | 251.8G Free | 3.5G Used | physical = 13.9G, swap allocated = 0.0, swap used = 0.0, virtual = 13.9G Shared | 6.0M Buffers | 236.1G Caches | 237.8G Dirty | 540 kB UsedRSS | 11.7G Swappiness | 1 DirtyPolicy | 20, 10 DirtyStatus | 0, 0 Numa Nodes | 2 Numa Policy | default Preferred Node | current Node Size Free CPUs ==== ==== ==== ==== node1 128967 MB 1474 MB 14 15 16 17 18 19 20 21 22 23 24 25 26 27 42 43 44 45 46 47 48 49 50 51 52 53 54 55 node0 128842 MB 2133 MB 0 1 2 3 4 5 6 7 8 9 10 11 12 13 28 29 30 31 32 33 34 35 36 37 38 39 40 41
-
Not for Release Notes
Description
Mariadb 11.6.2-MariaDB-log MariaDB Server issue with RR isolation and TPCC
--------------------------------------------------------------------------------
Hello folks.
While I was doing some routine checks, I had the following issue with the MariaDB 11.6.2 version.
When running sysbench tpcc in Repeatable Read mode, when using more than 3 threads I got the following error:
FATAL: mysql_drv_query() returned error 1020 (Record has changed since last read in table 'district6') for query 'SELECT d_next_o_id, d_tax
FROM district6
WHERE d_w_id = 1
AND d_id = 4 FOR UPDATE'
FATAL: `thread_run' function failed: [string "sysbench.sql.lua"]:304: SQL error, errno = 1020, state = 'HY000': Record has changed since last read in table 'district6'
If I reduce the rate (--rate=50) the error (at least with 4 threads) is nto coming up.
Of course any higher number of threads is causing the same issue.
The error is not presenting itself when test is run in Read Committed mode.
Checking the slow log (attached)
I see that the last action on the table district6 is from thread 347, before the thread 345 (which raised the error) issue the BEGIN.
Given the same test did run successfully on previous MariaDB versions and also in latest Percona and MySQL Server version, I think it may be something you want to investigate.
Hot to reproduce it
------------------------
In a decently fast machine
1) install MariaDB
2) apply configuration as below.
3) clone and compile sysbench from given repo.
4) clone also TPCc
5) populate the db (see section prepare below)
6) run the tests (see commands below)
Server configuration:
-----------------------
[client]
port = 3307
socket = /opt/mysql_instances/test-tpcc-maria-116/mysql.sock
[mysqldump]
quick
quote-names
max_allowed_packet = 48M
[mysql]
prompt=(\\u@
h) \\d>
[isamchk]
key_buffer = 16M
[mysqld_safe]
log-error = /opt/mysql_instances/test-tpcc-maria-116/mysql-3307.err
open-files-limit= 65536
[mysqld]
basedir =/opt/mysql_templates/maria-116/
datadir = /opt/mysql_instances/test-tpcc-maria-116/data
lc_messages_dir =/opt/mysql_templates/maria-116/share/
local_infile = 1
log-error = /opt/mysql_instances/test-tpcc-maria-116/mysql-3307.err
pid-file = /opt/mysql_instances/test-tpcc-maria-116/mysql.pid
plugin-dir =/opt/mysql_templates/maria-116/lib/plugin/
port = 3307
secure-file-priv =""
server-id = 3307
socket = /opt/mysql_instances/test-tpcc-maria-116/mysql.sock
tmpdir = /opt/mysql_instances/test-tpcc-maria-116/temp
user =mysql
default_time_zone='+01:00'
max-connections =2500
table_open_cache = 4096
table-open-cache-instances =4
thread_cache_size = 1024
thread_stack = 256K
thread_handling = one-thread-per-connection
binlog_cache_size = 1M
binlog_stmt_cache_size = 1M
join_buffer_size = 32M
max_heap_table_size = 16M
read_buffer_size = 1M
read_rnd_buffer_size = 16M
sort_buffer_size = 1M
tmp_table_size = 16M
innodb-adaptive-hash-index =FALSE
innodb-buffer-pool-instances =3
innodb-buffer-pool-size =10G
innodb-data-file-path =ibdata1:100M:autoextend
innodb_data_home_dir = /opt/mysql_instances/test-tpcc-maria-116/data
innodb-flush-method =O_DIRECT
innodb-log-file-size =800M
innodb-log-files-in-group =4
innodb_monitor_enable =all
innodb_write_io_threads =4
innodb_read_io_threads =4
innodb_io_capacity = 1000
innodb_io_capacity_max = 4000
skip-log-bin
log_bin = /opt/mysql_instances/test-tpcc-maria-116/logs/binlog
binlog_expire_logs_seconds=10
slave_connections_needed_for_purge=0
sync-binlog =1
long_query_time=240
slow-query-log = 0
slow-query-log-file = /opt/mysql_instances/test-tpcc-maria-116/logs/slow.log
general-log-file = /opt/mysql_templates/maria-116/logs/general.log
general-log =0
Sysbench version
-------------------------------
sysbench --version
sysbench 1.1.0-75c2f63
Repo: https://github.com/Tusamarco/sysbench
Sysbench-Tpcc
--------------------------------
Repo: https://github.com/Tusamarco/sysbench-tpcc
Sysbench commands
--------------------------------
To Prepare:
-----------
sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307 --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1 --histogram --report_csv=yes --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=30 --threads=10 --mysql-ignore-errors=none --reconnect=0 prepare
Working:
sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307 --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1 --histogram --report_csv=yes --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=30 --threads=2 --mysql-ignore-errors=none --reconnect=0 run
OR
sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307 --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1 --histogram --report_csv=yes --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=30 --threads=4 --mysql-ignore-errors=none --reconnect=0 --rate=50 run
Not Working:
sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307 --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1 --histogram --report_csv=yes --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=30 --threads=4 --mysql-ignore-errors=none --reconnect=0 run
OR
sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307 --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1 --histogram --report_csv=yes --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=30 --threads=64 --mysql-ignore-errors=none --reconnect=0 run
Error
-------------------------------
1,4,651.49,19319.11,8846.45,8563.10,1909.56,12.08,2.00,0.00
FATAL: mysql_drv_query() returned error 1020 (Record has changed since last read in table 'district6') for query 'SELECT d_next_o_id, d_tax
FROM district6
WHERE d_w_id = 1
AND d_id = 4 FOR UPDATE'
FATAL: `thread_run' function failed: [string "sysbench.sql.lua"]:304: SQL error, errno = 1020, state = 'HY000': Record has changed since last read in table 'district6'
And similar.
Attachments
Issue Links
- relates to
-
MDEV-35124 Set innodb_snapshot_isolation=ON by default
-
- Closed
-