diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index eb515c000b..fc1d7df502 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -866,6 +866,10 @@ func (c *Container) getContainerNetworkInfo() (*define.InspectNetworkSettings, e if err != nil { return nil, err } + // see https://github.com/containers/podman/issues/10090 + // the container has to be locked for syncContainer() + netNsCtr.lock.Lock() + defer netNsCtr.lock.Unlock() // Have to sync to ensure that state is populated if err := netNsCtr.syncContainer(); err != nil { return nil, err