Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Race condition in qmpSetup #2139

Closed
YvesChan opened this issue Oct 17, 2019 · 0 comments · Fixed by #2140
Closed

Race condition in qmpSetup #2139

YvesChan opened this issue Oct 17, 2019 · 0 comments · Fixed by #2140
Labels
enhancement Improvement to an existing feature needs-review Needs to be assessed by the team.

Comments

@YvesChan
Copy link
Contributor

YvesChan commented Oct 17, 2019

Which feature do you think can be improved?

Currently, containerd-shim-kata-v2 maintain a persistent connection to qemu via qmp socket. But when we changed to ephemeral connection for some reason(e.g. debug), we found the qmpSetup() may cause a severe race condition, which leads to shim process not responding. It's because there's two qmp mainLoop goroutines exists at the same time.

How can it be improved?

Add a mutex in qmpSetup

@YvesChan YvesChan added enhancement Improvement to an existing feature needs-review Needs to be assessed by the team. labels Oct 17, 2019
YvesChan added a commit to YvesChan/runtime that referenced this issue Oct 17, 2019
Solve possible race condition in qmpSetup()

Fixes: kata-containers#2139

Signed-off-by: Yves Chan <[email protected]>
YvesChan added a commit to YvesChan/runtime that referenced this issue Oct 18, 2019
Solve possible race condition in qmpSetup()

Fixes: kata-containers#2139

Signed-off-by: Yves Chan <[email protected]>
YvesChan added a commit to YvesChan/runtime that referenced this issue Oct 24, 2019
Solve possible race condition in qmpSetup() and qmpShutdown()

Fixes: kata-containers#2139

Signed-off-by: Yves Chan <[email protected]>
YvesChan added a commit to YvesChan/runtime that referenced this issue Nov 6, 2019
Solve possible race condition in qmpSetup() and qmpShutdown()

Fixes: kata-containers#2139

Signed-off-by: Yves Chan <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature needs-review Needs to be assessed by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant