# Mysql Server stuck with a long semaphore wait

**URL:** <https://forums.percona.com/t/mysql-server-stuck-with-a-long-semaphore-wait/3385>\
**Category:** Other MySQL® Questions\
**Created:** [April 6, 2014, 5:57am UTC](https://forums.percona.com/t/mysql-server-stuck-with-a-long-semaphore-wait/3385 "2014-04-06T05:57:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![infdude666](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/infdude666/32/11425_2.png) [@infdude666](https://forums.percona.com/u/infdude666)\
**Post date:** [April 6, 2014, 5:57am UTC](https://forums.percona.com/t/mysql-server-stuck-with-a-long-semaphore-wait/3385/1 "2014-04-06T05:57:37Z")

</div>

Today my server become unresponsive due to a long semaphore wait. From slow query logs i can see that commit, rollback and select(which usually takes 0.1sec) took abnormally large amount of time i.e more than 10sec max 5min

Im running Percona 5.5.32 x64

InnoDB: Warning: a long semaphore wait:  
–Thread 1327466816 has waited at buf0flu.c line 1353 for 241.00 seconds the semaphore:  
S-lock on RW-latch at 0x2ab01b59f1b0 ‘&block-\>lock’  
a writer (thread id 1339287872) has reserved it in mode exclusive  
number of readers 0, waiters flag 1, lock\_word: 0  
Last time read locked in file buf0flu.c line 1336  
Last time write locked in file /mnt/workspace/percona-server-5.5-rpms/label\_exp/centos5-64/target/BUILD/Percona-Server-5.5.32-rel31.0/storage/innobase/btr/btr0cur.c lin  
e 306  
InnoDB: ###### Starts InnoDB Monitor for 30 secs to print diagnostic info:  
InnoDB: Pending preads 0, pwrites 0

# ===================================== 140405 23:21:51 INNODB MONITOR OUTPUT

Per second averages calculated from the last 26 seconds

mysql\> show global variables like ‘%adaptive\_hash\_index%’;  
±--------------------------------------±------+  
| Variable\_name | Value |  
±--------------------------------------±------+  
| innodb\_adaptive\_hash\_index | ON |  
| innodb\_adaptive\_hash\_index\_partitions | 1 |  
±--------------------------------------±------+

Please help

---

<div class="post-metadata">

**Author:** ![jagatveer](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jagatveer](https://forums.percona.com/u/jagatveer)\
**Post date:** [April 7, 2014, 7:59am UTC](https://forums.percona.com/t/mysql-server-stuck-with-a-long-semaphore-wait/3385/2 "2014-04-07T07:59:25Z")

</div>

Hi, It was reported as a bug in mysql at “[MySQL Bugs: #48050: A proposition for the alternative handling of InnoDB semaphore timeouts](http://bugs.mysql.com/bug.php?id=48050)”. The triage shows that it has been taken as a feature request.
