Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime_vm: Avoid possible deadlock on UpdateContainerStatus()
StartContainer() function will hold the opLock, while a goroutine will be waiting for the container to terminate. Once it happens, the goroutine would update the container status, calling then UpdateContainerStatus() which will try to get the opLock and, consequently, a deadlock will happen. In order to avoid such situation, let's create the updateContainerStatus() helper, which actually does status update but does not try to get the opLock, leaving it up to the caller to do so. This new helper will be used from both StartContainer() and UpdateContainerStatus() functions. Signed-off-by: Fabiano Fidêncio <[email protected]>
- Loading branch information