Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect node.ents and node.entsCached with a mutex in fs/layer/node.go #1381

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Protect node.ents and node.entsCached with a mutex in fs/layer/node.go #1381

merged 1 commit into from
Sep 13, 2023

Conversation

iain-macdonald
Copy link
Contributor

We run a modified version of the soci-snapshotter (which is based on the stargz-snapshotter) in production at BuildBuddy and recently enabled the golang race detector in our dev environment. It flagged racy accesses to node.ents and node.entsCached, here are the logs (line numbers should be the same). This commit protects access to those two fields with a mutex.

We run a modified version of the soci-snapshotter (which is based on the stargz-snapshotter) in production at BuildBuddy and recently enabled the golang race detector in our dev environment. It flagged racy accesses to node.ents and node.entsCached. This commit protects access to those two fields with a mutex.

Signed-off-by: Iain Macdonald <xiainx@gmail.com>
Copy link
Member

@ktock ktock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ktock ktock merged commit 7275d45 into containerd:main Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants