icinga2
icinga2 copied to clipboard
/v1/actions: run only one action per object at the same time
so that actions on the same object don't disturb or even deadlock each other.
fixes #9916 closes #9924
@ymartin-ovh What about this idea of mine? And if yes, does it actually fix your problem?
so that actions on the same object [...] deadlock each other
I doubt that would work out: Within Checkable::ProcessCheckResult(), there are three places where the ObjectLock on the checkable is released. As the ObjectLock is a recursive mutex, if you call that while holding one on the same object externally, these unlock operations effectively do nothing anymore. So this PR might actually even introduce new deadlocks.
Would you prefer a separate mutex?
@Al2Klimov I don't know if it will fix my issue. But, when your PR is ready, I can build Icinga2 with your diff to check.
Hello
I tested your proposal and I still experience deadlock on Icinga2 API with this. Have the issue twice last friday and today.
I still have two concurrent addcomment operations
all-threads-backtraces.txt lock-traces.txt
Regards