wsd: avoid deadlock when restoring forkit
LOOLWSD::checkAndRestoreForKit() eventually takes NewChildrenLock, which is also taken in getNewChild_Blocks(). Luckily, we can defer that to the Prisoner poll, which we do. Change-Id: Ib65c0be08870d1c4c68efd72192dac2e73c79f7c Reviewed-on: https://gerrit.libreoffice.org/38992 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
7ae37aff0d
commit
c28992758d
1 changed files with 2 additions and 2 deletions
|
@ -401,9 +401,9 @@ std::shared_ptr<ChildProcess> getNewChild_Blocks()
|
|||
++numPreSpawn; // Replace the one we'll dispatch just now.
|
||||
if (rebalanceChildren(numPreSpawn) < 0)
|
||||
{
|
||||
LOG_DBG("getNewChild: rebalancing of children failed. Checking and restoring forkit.");
|
||||
LOG_DBG("getNewChild: rebalancing of children failed. Scheduling housekeeping to recover.");
|
||||
|
||||
LOOLWSD::checkAndRestoreForKit();
|
||||
LOOLWSD::doHousekeeping();
|
||||
|
||||
// Let the caller retry after a while.
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in a new issue