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

Fix race condition in Expiry Map #946

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

mariomac
Copy link
Contributor

Fixes this race condition:

WARNING: DATA RACE
Write at 0x00c00052a300 by goroutine 89:
  runtime.mapassign_faststr()
      /opt/hostedtoolcache/go/1.22.4/x64/src/runtime/map_faststr.go:203 +0x0
  github.com/grafana/beyla/pkg/internal/export/expire.(*ExpiryMap[go.shape.*uint8]).GetOrCreate()
      /home/runner/work/beyla/beyla/pkg/internal/export/expire/expiry_map.go:58 +0x459

(....)

Previous read at 0x00c00052a300 by goroutine 107:
  github.com/grafana/beyla/pkg/internal/export/expire.(*ExpiryMap[go.shape.*uint8]).All()
      /home/runner/work/beyla/beyla/pkg/internal/export/expire/expiry_map.go:92 +0xc4

(....)

@mariomac mariomac requested review from grcevski and marctc as code owners June 19, 2024 07:57
@mariomac mariomac merged commit 53e9f24 into grafana:main Jun 19, 2024
5 checks passed
@mariomac mariomac deleted the fix-race branch June 19, 2024 08:35
@mariomac mariomac added the bug label Jun 26, 2024
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