forked from cri-o/cri-o
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/oci: remove redundant ShouldBeStopped check for containers
Fixes cri-o#8030 This commit removes the ShouldBeStopped function to address the issue where stopping a container blocks all further stop attempts for the same container. That function acquired the `opLock` mutex to check the container's state, which could lead to contention and potential deadlocks if other goroutines were waiting to acquire the same lock. Additionally, the container's state is checked later in the `StopContainer` function by calling the `Living` method, which checks if the container's process is still running. Therefore, the `ShouldBeStopped` function is redundant and can be removed. Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
- Loading branch information
1 parent
05cad40
commit 8fb342b
Showing
5 changed files
with
15 additions
and
73 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
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