Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker-proxy cannot exit after send SIGINT
Signed-off-by: mingfukuang <[email protected]> When stop or delete one container with docker-proxy, stop container will call Unmap() to release port , func Unmap() need to acquire pm.lock.Lock() firstly, then stop docker-proxy, and then pm.lock.UnLock(). but some situation(cannot be reproduced), stop docker-proxy will hang on. Once one container cann't stop docker-proxy, above mentioned pm.lock cann't be released, so this container cann’t be stopped, Also all operation of this container could be hang on. Furthermore, if other containers enter stop or delete process, those containers also need to acquire the global pm.lock, and get stuck. As result, other operations to those containers also hang on, such as docker inspect, docker exec, etc. To fix this, I add protective measures to avoid the situation of global lock(pm.lock)cann't being released.
- Loading branch information