Major Bug in ConnectedChildProcess

I’ve just spent the last three days hunting down a really subtle bug introduced in this commit:

It seems that with the move to making startPinging called manually, it wasn’t actually called manually from the parent ChildProcessCoordinator object. This basically meant the whole process would kill itself after the ping timeout as the parent wasn’t sending any pings.

I’ve added it locally here but not sure if you had another place for it to go?

        if (connection->isConnected())
        {
            connection->startPinging();
            sendMessageToWorker ({ startMessage, specialMessageSize });
            return true;
        }

I’d like to point out that this stuff is really painful to debug as you have to think in an additional dimension and multi-process stuff is inherently async and complicated. It really feels like there should be more tests around this very complex code.

2 Likes