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

UPSTREAM: google/cadvisor: 1963: container: fix concurrent map acccess #3

Merged

Conversation

sjenning
Copy link

Needed so it is not dropped in the rebase
openshift/origin#20033 (comment)

@runcom @deads2k

GetSpec() can be called concurrently in
manager/container.go.updateSpec()
results into a concurrent map access on the labels map because we're
directly updating the map inside GetSpec(). The labels map from the
container handler is not a copy of the map itself, just a reference,
that's why we're getting the concurrent map access.
Fix this by moving the label update with restartcount to the handler's
initialization method which is not called concurrently.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 26, 2018
@runcom
Copy link
Member

runcom commented Jun 26, 2018

👍

@sjenning sjenning merged commit c38aa7d into openshift:origin-3.11-cadvisor-v0.30.1 Jun 26, 2018
@sjenning sjenning mentioned this pull request Jun 26, 2018
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants