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(cli): handling of concurrent map read/write #3979

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

schoren
Copy link
Contributor

@schoren schoren commented Aug 21, 2024

This PR adds a mising defer for the calling of mutex Unlock when emmiting events. This avoids seeing this kinds of errors:

fatal error: concurrent map writes

goroutine 585 [running]:
github.com/kubeshop/tracetest/agent/ui/dashboard/sensors.(*sensor).Emit(0x140006c2270, {0x105980599, 0x12}, {0x105fb2380?, 0x107531060})
	/home/runner/work/tracetest/tracetest/agent/ui/dashboard/sensors/sensor.go:79 +0x154
github.com/kubeshop/tracetest/agent/collector.(*forwardIngester).ingestSpans(0x140006c40d0, 0x1400090a540)
	/home/runner/work/tracetest/tracetest/agent/collector/ingester.go:110 +0x1ac
created by github.com/kubeshop/tracetest/agent/collector.(*forwardIngester).Ingest in goroutine 597
	/home/runner/work/tracetest/tracetest/agent/collector/ingester.go:91 +0x70

Fixes

  • Defer mutex unlock call

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Loom video

Add your loom video here if your work can be visualized

Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tracetest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 4:31pm

@schoren schoren merged commit 411d910 into main Aug 21, 2024
38 checks passed
@schoren schoren deleted the fix-cli-dashboard-concurrency branch August 21, 2024 17:16
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.

3 participants