ACK: [PATCH][SRU][ARTFUL] UBUNTU:SAUCE: exec: fix lockup because retry loop may never exit
seth.forshee at canonical.com
Fri Dec 8 21:30:58 UTC 2017
On Thu, Dec 07, 2017 at 05:32:33PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> BugLink: https://launchpad.net/bugs/1730717
> My early fix for bug LP#1672819 could get stuck in an infinite
> retry loop causing lockups. Currently the retry is aggressively
> spinning on a check and will never abort. Relax the aggressive
> retry by adding a small interruptible delay and limit the number
> of retries.
> I've analyzed the retries and 95% of the cases on an 8 CPU Xeon
> host never hit the retry loop and less that 0.5% of retries are
> ever more than 1 retry using the original reproducer program.
> Considering that the reproducer is an extreeme case of forcing
> the race condition I believe we now have a suitable balance of
> non-aggressive CPU eating retries and a mechanism to bail out
> after enough retries and avoid a lockup.
> Admittedly this workaround is a bit of an ugly hack, but the
> retry path is never executed for the majority of use cases and
> only hits the retry/delay for the racy condition we hit with the
> original bug.
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
Looks reasonable. I have tested this to confirm that it fixes the
Acked-by: Seth Forshee <seth.forshee at canonical.com>
More information about the kernel-team