Description:
I use the term 'hang' loosely as I can connect to MySQL and run commands. But sysbench gets stuck waiting for query responses. The hang is intermittent.
This is for:
* mysql 6.0.9 alpha
* linux 2.6
* my.cnf has thread_pool_size=20, thread_handling=pool-of-threads
* run sysbench readonly for 16 concurrent users
* server has 16 cores
* sysbench and mysqld run on the same server
mysql> show processlist;
+----+------+-------------------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-------------------+------+---------+------+-------+------------------+
| 10 | root | 10.13.154.1:54152 | test | Sleep | 441 | NULL | NULL |
| 11 | root | 10.13.154.1:54153 | test | Sleep | 441 | NULL | NULL |
| 12 | root | 10.13.154.1:54154 | test | Sleep | 441 | NULL | NULL |
| 13 | root | 10.13.154.1:54155 | test | Sleep | 486 | NULL | NULL |
| 14 | root | 10.13.154.1:54156 | test | Sleep | 441 | NULL | NULL |
| 15 | root | 10.13.154.1:54157 | test | Sleep | 441 | NULL | NULL |
| 16 | root | 10.13.154.1:54158 | test | Sleep | 441 | NULL | NULL |
| 17 | root | 10.13.154.1:54159 | test | Sleep | 441 | NULL | NULL |
| 18 | root | 10.13.154.1:54160 | test | Sleep | 441 | NULL | NULL |
| 19 | root | 10.13.154.1:54161 | test | Sleep | 441 | NULL | NULL |
| 20 | root | 10.13.154.1:54162 | test | Sleep | 441 | NULL | NULL |
| 21 | root | 10.13.154.1:54163 | test | Sleep | 453 | NULL | NULL |
| 22 | root | 10.13.154.1:54164 | test | Sleep | 441 | NULL | NULL |
| 23 | root | 10.13.154.1:54165 | test | Sleep | 441 | NULL | NULL |
| 24 | root | 10.13.154.1:54166 | test | Sleep | 441 | NULL | NULL |
| 25 | root | 10.13.154.1:54167 | test | Sleep | 441 | NULL | NULL |
| 29 | root | 10.13.154.1:52895 | NULL | Query | 0 | NULL | show processlist |
+----+------+-------------------+------+---------+------+-------+------------------+
Flattened gdb thread stacks for mysqld:
30,pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone,??
29,pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone,??
28,pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone,??
27,pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone,??
26,select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone,??
25,select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone,??
24,pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,srv_master_thread,start_thread,clone,??
23,pthread_cond_timedwait@@GLIBC_2.3.2,ma_checkpoint_background,start_thread,clone,??
22,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
21,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
20,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
19,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
18,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
17,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
16,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
15,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
14,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
13,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
12,syscall,epoll_wait,epoll_dispatch,event_base_loop,libevent_thread_proc,start_thread,clone,??
11,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
10,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
9,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
8,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
7,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
6,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
5,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
4,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
3,__lll_mutex_lock_wait,_L_mutex_lock_214,pthread_mutex_lock,libevent_thread_proc,start_thread,clone,??
2,do_sigwait,sigwait,signal_hand,start_thread,clone,??
1,select,handle_connections_sockets,main,select
How to repeat:
see above
Suggested fix:
see above