[MDEV-77] Possible deadlock in innodb buffer pool on Windows Created: 2012-01-08  Updated: 2020-05-15  Resolved: 2018-04-06

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 5.5.20, 5.3.4, 5.5, 10.0, 10.1, 10.2
Fix Version/s: 5.3.4

Type: Bug Priority: Critical
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Done Votes: 0
Labels: None

Attachments: Text File 10.2.txt     Text File callstacks.txt    
Issue Links:
Duplicate
is duplicated by MDEV-15707 Long semaphore wait : deadlock in In... Closed

 Description   

With current asynchronous IO handling, it is possible to deadlock Innodb. The deadlock can happen in the case all Innodb IO threads are handling completion of async reads, and as part of completion routine do insert buffer processing merges. Attachment contains callstacks taken from the process dump in one such case (note all IO threads are blocked waiting for a buffer pool page)



 Comments   
Comment by Vladislav Vaintroub [ 2018-04-04 ]

Looking back, this was not fixed properly, Now we have read and write io threads, but we still can have all read io threads wait for IBUF completion. IBUF needs own thread

Comment by Vladislav Vaintroub [ 2018-04-04 ]

Reproduced in 10.2, running sysbench 0.4 with small bufferpool 20MB

sysbench --test=oltp --oltp-table-size=1000000 --mysql-host=localhost --mysql-db=sbtest --mysql-user=root --mysql-password= --db-driver=mysql 
--mysql-table-engine=innodb --max-time=300 --oltp-test-mode=complex --oltp-read-only=off --max-requests=0 --num-threads=1024
--oltp-point-selects=0 --oltp-simple-ranges=0 --oltp-sum-ranges=0 --oltp-order-ranges=0 --oltp-distinct-ranges=0 
--oltp-index-updates=1 --oltp-delete-inserts=0 --oltp-non-index-updates=0  --oltp-skip-trx=on --oltp-dist-type=uniform --mysql-socket=MySQL run

Comment by Vladislav Vaintroub [ 2018-04-06 ]

Surprisingly, cannot reproduce prior to 10.1. Will re-close the bug, and continuing in MDEV-15707.

Generated at Thu Feb 08 06:26:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.