Protect node.ents and node.entsCached with a mutex in fs/layer/node.go by iain-macdonald · Pull Request #1381 · containerd/stargz-snapshotter (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

ktock

merged 1 commit into

Sep 13, 2023

Conversation

@iain-macdonald

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.

@iain-macdonald

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

ktock

Choose a reason for hiding this comment

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

Thanks!

This file contains hidden or 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

[ Show hidden characters]({{ revealButtonHref }})

2 participants

@iain-macdonald @ktock