-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem manifested itself when Docker Engine (>= v24.0), running inside a Sysbox container, created a bind-mount using a source path such as /proc/self/task/<tid>/ns/net. That mount unexpectedly failed with EPERM. Turns out the problem was caused by a bug in sysbox-fs' mount syscall interception, where it was not properly resolving mount paths such as "/proc/self/task/<tid>/...". The reason is that <tid> is a thread-ID in the container's pid-namespace, not in sysbox's pid-namespace, so sysbox-fs could not resolve it properly in function process.ResolveProcSelf() (i.e., when it did stat() on the path it failed). I've not found a proper way to translate the <tid> from the container's pid-ns to Sysbox's pid-ns. That would have been the proper fix. For now, this commit works around the problem by assuming that <tid> = <pid>; that's not ideal, but it's usually (likely always) the case for mount syscalls we normally intercept. Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
- Loading branch information
Showing
3 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters