Race condition in HA+MT
As reported by a customer in support#20887, Kea 2.0.2 can crash under heavy load under certain conditions.
@marcin investigated this an found the root cause of the problem. See support#20887 for details.
Summary: Marcin suspected there is a race condition between parking packet after lease-update was scheduled in one thread and the lease response being received and packet processing continues in another thread. To simulate it more reliably, Marcin modified HA code to only pretend the lease update is being sent. With this modification, the code crashed on the first packet.
Marcin was able to reproduce this on unmodified code on VM after couple minutes.