InnoDB reports that it's going to wait for I/O but the I/O is async
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Sergei Glushchenko | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Low
|
Sergei Glushchenko | ||
5.6 |
Fix Released
|
Low
|
Sergei Glushchenko |
Bug Description
Description:
Credit for discovery goes to MariaDB developers.
buf_read_page_low() reads:
thd_wait_
if (zip_size) {
fil_io(...);
} else {
fil_io(...);
}
thd_wait_end(NULL, THD_WAIT_DISKIO);
The problem is that fil_io might be async here, returning much sooner than the sync call would (buf_read_
Don't know if it's a real issue with a thread pool or just a minor code quality as I cannot test with the Oracle thread pool.
How to repeat:
Might be possible to concoct some benchmark with MySQL Enterprise Edition, which I don't have an access to.
Suggested fix:
Guard thd_wait_
Related branches
- Stewart Smith (community): Approve
- Laurynas Biveinis (community): Approve
- Daniel Nichter: Pending (toolkit compatibility) requested
- Hrvoje Matijakovic: Pending (doc) requested
-
Diff: 8010 lines (+6449/-396)57 files modifiedPercona-Server/include/my_sys.h (+2/-0)
Percona-Server/include/violite.h (+14/-0)
Percona-Server/mysql-test/include/have_pool_of_threads.inc (+4/-0)
Percona-Server/mysql-test/include/mysqld--help.inc (+1/-1)
Percona-Server/mysql-test/include/not_threadpool.inc (+1/-1)
Percona-Server/mysql-test/include/query_response_time-replication.inc (+2/-1)
Percona-Server/mysql-test/lib/My/ConfigFactory.pm (+14/-2)
Percona-Server/mysql-test/r/aborted_clients.result (+10/-0)
Percona-Server/mysql-test/r/have_pool_of_threads.require (+2/-0)
Percona-Server/mysql-test/r/mysqld--help-notwin.result (+8/-1)
Percona-Server/mysql-test/r/mysqld--help-win.result (+8/-1)
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+7/-0)
Percona-Server/mysql-test/r/percona_server_variables_release.result (+7/-0)
Percona-Server/mysql-test/r/pool_of_threads.result (+2169/-0)
Percona-Server/mysql-test/suite/perfschema/t/pool_of_threads-master.opt (+1/-1)
Percona-Server/mysql-test/suite/sys_vars/r/extra_max_connections_basic.result (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/r/extra_port_basic.result (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_min_threads_basic.result (+49/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_size_basic.result (+41/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/t/extra_max_connections_basic.test (+42/-0)
Percona-Server/mysql-test/suite/sys_vars/t/extra_port_basic.test (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_cache_size_func.test (+1/-2)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_max_threads_basic.test (+42/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test (+43/-0)
Percona-Server/mysql-test/t/aborted_clients.test (+28/-0)
Percona-Server/mysql-test/t/pool_of_threads.cnf (+15/-0)
Percona-Server/mysql-test/t/pool_of_threads.test (+80/-0)
Percona-Server/mysys/thr_lock.c (+5/-1)
Percona-Server/sql/CMakeLists.txt (+8/-1)
Percona-Server/sql/mysqld.cc (+260/-277)
Percona-Server/sql/mysqld.h (+5/-0)
Percona-Server/sql/net_serv.cc (+6/-2)
Percona-Server/sql/scheduler.cc (+41/-48)
Percona-Server/sql/scheduler.h (+18/-4)
Percona-Server/sql/signal_handler.cc (+5/-4)
Percona-Server/sql/sql_class.cc (+30/-36)
Percona-Server/sql/sql_class.h (+10/-1)
Percona-Server/sql/sql_client.cc (+1/-0)
Percona-Server/sql/sql_connect.cc (+4/-4)
Percona-Server/sql/sql_parse.cc (+2/-1)
Percona-Server/sql/sys_vars.cc (+124/-3)
Percona-Server/sql/threadpool.h (+69/-0)
Percona-Server/sql/threadpool_common.cc (+274/-0)
Percona-Server/sql/threadpool_unix.cc (+1669/-0)
Percona-Server/sql/threadpool_win.cc (+763/-0)
Percona-Server/storage/innobase/buf/buf0rea.c (+8/-2)
Percona-Server/vio/vio.c (+24/-1)
Percona-Server/vio/vio_priv.h (+5/-0)
Percona-Server/vio/viosocket.c (+78/-1)
Changed in percona-server: | |
assignee: | nobody → Sergei Glushchenko (sergei.glushchenko) |
status: | Confirmed → Fix Committed |
tags: | added: innodb |
Is this fixed by the 55-tp branch?