Hi Christopher, On Tue, Nov 28, 2017 at 10:28:20AM +0100, Christopher Faulet wrote: > Here is a patch that should fix the deadlock. Could you confirm it fixes > your bug ?
At least it works for me, previously a config with a mailer would immediately go to 100% CPU once reporting a down backend, now it's OK. > Emeric, this patch should be good, but take a look on it, just to be sure. >From what I've seen, the tcpcheck_main() function isn't called from anywhere else, so removing the lock was indeed the best thing to do. I'm a bit sad that we're still missing the conditions to call many functions in the function's documentation. That used to be a problem in the past, but it becomes critical with locking as we must always know whether they must not/may/must be called with a lock held or not. This will definitely need to be documented, or such bugs will happen routinely. I've applied your fix, thanks! Willy

