containerd/runtime/v2/runc
Chen Yiyang 68dd47ef70 containerd-shim-runc-v2: avoid potential deadlock in create handler
After pr #8617, create handler of containerd-shim-runc-v2 will
call handleStarted() to record the init process and handle its exit.
Init process wouldn't quit so early in normal circumstances. But if
this screnario occurs, handleStarted() will call
handleProcessExit(), which will cause deadlock because create() had
acquired s.mu, and handleProcessExit() will try to lock it again.

So, I added a parameter muLocked to handleStarted to indicate whether
or not s.mu is currently locked, and thus deciding whether or not to
lock it when calling handleProcessExit.

Fix: #9103
Signed-off-by: Chen Yiyang <cyyzero@qq.com>
2023-10-02 17:44:41 +00:00
..
manager Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
options Remove the CriuPath field from runc's options 2023-03-16 17:12:51 +08:00
pause Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
task containerd-shim-runc-v2: avoid potential deadlock in create handler 2023-10-02 17:44:41 +00:00
container.go Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00
platform.go chore: use go fix to cleanup old +build buildtag 2022-12-29 14:25:14 +08:00
util.go Move to use github.com/containerd/log 2023-09-22 07:53:23 -07:00