Bug #80714 Hold S mode rw_lock on bpage when flush dirty page until IO complete
Description:
Hi
I have encounter a scenc as below from error log。
```
InnoDB: Warning: a long semaphore wait:
--Thread 47102403548928 has waited at btr0cur.c line 253 for 241.00 seconds the semaphore:
X-lock (wait_ex) on RW-latch at 0x2ad6bdcf9738 '&block->lock'
a writer (thread id 47102403548928) has reserved it in mode wait exclusive
number of readers 1, waiters flag 0, lock_word: ffffffffffffffff
Last time read locked in file btr0sea.c line 945
Last time write locked in file storage/innobase/row/row0upd.c line 2155
```
```
--------
FILE I/O
--------
I/O thread 6 state: doing file i/o (write thread) ev set
Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 4 [4, 0, 0, 0] ,
0 pending preads, 1 pending pwrites
```
one thread hold s mode rw_lock on block which is flushing. since of the IO device problem, the pending write IO didn't complete for a long time.
but my doubt is:
If I have posted flushable block into double write buffer, It can release S mode rw_lock on the block safely,It is not necessary to hold S lock until the aio complete,so hope you sincere opinion。
How to repeat:
It is caused by very very slow IO device。
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.