If the roxiemem background OOM callback is active, calling a spillable row collector, and at the same time that row collector is being called to get its output stream and used by multiple outputs (e.g. because row collector is being used by a graph result), then deadlock can occur.
In this situation, the CThorRowCollectorBase::getStream locks the spillableRows mutex, and on the 1st call setups a shared spillable row set container for any remaining rows in memory. In doing to it calls back into roxiemem to setup a new callback.
If roxiemem is already blocked on the spillableRows mutex via it's background thread, then deadlock ensues.
The fix is likely to be to ensure that the new shared spillable row set object, only installs the new callback once it's released the row collector's spillableRows mutex.