You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a race between cleanupPortBindings() and another go routine running a container remove operation. Specifically, the GetContainer() call may not find the container that has already been removed, but was still in the cache when the containerByPort map was checked.
Result: container start fails for a new container that may have conflicting port mappings with the container that was removed. This condition persists for any new container that is trying to create the same port mapping, since the containerByPort still has the port binding in there.
Fix: UnmapPorts and cleanupPortBindings should be idempotent, i.e. they should ignore conditions where they find the container is missing in the cache, and assume that it has been removed by another go routine, and that port mappings have already been cleaned up.
The text was updated successfully, but these errors were encountered:
There is a race between cleanupPortBindings() and another go routine running a container remove operation. Specifically, the
GetContainer()
call may not find the container that has already been removed, but was still in the cache when thecontainerByPort
map was checked.Result: container start fails for a new container that may have conflicting port mappings with the container that was removed. This condition persists for any new container that is trying to create the same port mapping, since the
containerByPort
still has the port binding in there.Fix:
UnmapPorts
andcleanupPortBindings
should be idempotent, i.e. they should ignore conditions where they find the container is missing in the cache, and assume that it has been removed by another go routine, and that port mappings have already been cleaned up.The text was updated successfully, but these errors were encountered: