I’m frequently tracking semaphores waits, and if you’ve examined them before, it can be a little matching up the threads listed in the SEMAPHORES section with the transactions in the TRANSACTIONS section.
Semaphore waits are related to internal synchronization between threads in mysqld, and not directly to row locks or other items associated with user queries, so that’s why the SEMAPHORES section only reports the OS thread id.
Fortunately, the TRANSACTIONS sections also reports the OS thread handle, but in hex format.
Here is an example semaphore wait:
--Thread 1079654736 has waited at ibuf0ibuf.c line 3549 for 943.00 seconds the semaphore: X-lock …[Read more...]