Describe the bug
In huge query with a lot of spills, OnHeapSpillManager may run into a deadlock, and the query hangs:
this is caused by the following code, where a synchronized writing may trigger another synchronized spill:
To Reproduce
Expected behavior
Screenshots
Additional context