# SEMAPHORES - waiting on an RW-latch created\_ in btr0sea.c

**URL:** <https://forums.percona.com/t/semaphores-waiting-on-an-rw-latch-created-in-btr0sea-c/6956>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [April 9, 2019, 5:20am UTC](https://forums.percona.com/t/semaphores-waiting-on-an-rw-latch-created-in-btr0sea-c/6956 "2019-04-09T05:20:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pooja.gupta](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@pooja.gupta](https://forums.percona.com/u/pooja.gupta)\
**Post date:** [April 9, 2019, 5:20am UTC](https://forums.percona.com/t/semaphores-waiting-on-an-rw-latch-created-in-btr0sea-c/6956/1 "2019-04-09T05:20:10Z")

</div>

Can see lots of latches in the error log.

Its increasing load on the server, high CPU utilization and High I/O.

Mysql version is - 5.6.39-83.1

Error log -

* * *

## SEMAPHORES

OS WAIT ARRAY INFO: reservation count 202249793  
–Thread 139909786564352 has waited at btr0pcur.cc line 467 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0row.cc line 823  
–Thread 139909795370752 has waited at btr0sea.cc line 954 for 0.0000 seconds the semaphore:

S-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 3, waiters flag 0, lock\_word: ffffd  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909849413376 has waited at row0sel.cc line 3346 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0row.cc line 823  
–Thread 139909862520576 has waited at row0row.cc line 823 for 0.0000 seconds the semaphore:  
X-lock (wait\_ex) on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0row.cc line 823  
–Thread 139909900818176 has waited at btr0cur.cc line 3786 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0row.cc line 823  
–Thread 139909836089088 has waited at row0sel.cc line 3346 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f406d31ed20 ‘&block-\>lock’  
number of readers 1, waiters flag 0, lock\_word: fffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0ins.cc line 2718  
–Thread 139909349865216 has waited at btr0sea.cc line 1380 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 2, waiters flag 0, lock\_word: ffffe  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909854123776 has waited at buf0buf.cc line 3303 for 0.0000 seconds the semaphore:

Mutex at 0x7f40a4ad8840 ‘&block-\>mutex’, lock var 0  
waiters flag 0  
–Thread 139909777962752 has waited at btr0sea.cc line 1380 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 4, waiters flag 0, lock\_word: ffffc  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909864568576 has waited at btr0sea.cc line 1380 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 3, waiters flag 0, lock\_word: ffffd  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909845509888 has waited at btr0pcur.cc line 467 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/row/row0row.cc line 823  
–Thread 139909875422976 has waited at btr0sea.cc line 1380 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 2, waiters flag 0, lock\_word: ffffe  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909325494016 has waited at btr0sea.cc line 705 for 0.0000 seconds the semaphore:  
X-lock on RW-latch at 0x23d9658 ‘&btr\_search\_latch\_arr[i]’  
number of readers 2, waiters flag 0, lock\_word: ffffe  
Last time read locked in file btr0sea.cc line 954  
Last time write locked in file /mnt/workspace/percona-server-5.6-redhat-binary/label\_exp/centos7-64/rpmbuild/BUILD/percona-server-5.6.39-83.1/storage/innobase/btr/btr0sea.cc line 705  
–Thread 139909864158976 has waited at btr0pcur.cc line 467 for 0.0000 seconds the semaphore:  
S-lock on RW-latch at 0x7f41132df320 ‘&block-\>lock’  
a writer (thread id 139909862520576) has reserved it in mode wait exclusive  
number of readers 1, waiters flag 1, lock\_word: ffffffffffffffff  
Last time read locked in file row0sel.cc line 3346
