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(session): fix panic: close of closed channel #97

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

oiooj
Copy link
Contributor

@oiooj oiooj commented Feb 2, 2024

This new version breaks our internal service, the panic stack:

panic: close of closed channel

goroutine 41 [running]:
github.com/grafana/pyroscope-go.(*cpuProfileCollector).Stop(0x1400018e090)
	/tmp/pyroscope-go/collector.go:181 +0xa0
github.com/grafana/pyroscope-go.(*Session).takeSnapshots(0x14000192000)
	/tmp/pyroscope-go/session.go:164 +0x21c
github.com/grafana/pyroscope-go.(*Session).Start.func1()
	/tmp/pyroscope-go/session.go:183 +0x54
created by github.com/grafana/pyroscope-go.(*Session).Start in goroutine 35
	/tmp/pyroscope-go/session.go:181 +0x98
exit status 2
FAIL	github.com/grafana/pyroscope-go	0.221s

@korniltsev

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@korniltsev korniltsev left a comment

Choose a reason for hiding this comment

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

lgtm

@korniltsev
Copy link
Collaborator

cc @kolesnikovae

Copy link
Contributor

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the fix @oiooj!

@kolesnikovae kolesnikovae merged commit c8d7ec9 into grafana:main Feb 2, 2024
8 checks passed
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.

4 participants