It seems that this hang can be explained as follows:
- 'vacuum-cleaner' thread tries to clean up a cache entry and so it needs to acquire the checkpoint read lock.
It is important to note that gateway lock for the corresponding cache is already acquired.
Let's assume the checkpoint read lock cannot be acquired right now because there are many dirty pages, and, therefore, the 'vacuum' has to wait for a next checkpoint.
- On the other hand, the checkpoint thread can be already stopped by Ignition#stop(cancel = true)
In that case, scheduledCp.cpFinishFut is not completed (it seems to me, this is definitely a bug) and leads to a deadlock: