-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Goroutine leaks in zstd initialization #2029
Comments
With the default configuration, this causes a leak of runtime.NumCPU() goroutines. |
I am also seeing this issue, please check. Logs |
Yes, this was sort of a known problem flagged up under #1937 and is something that we'd like to fix (by having the encoders/decoders owned on a per client basis). However, the "leaked" goroutines aren't so much of a problem by themselves, they're not increasing in number and they are only created once at package initialization. We use github.com/fortytw2/leaktest ourselves and its per-test snapshot-based approach isn't concerned by them. |
This comment was marked as outdated.
This comment was marked as outdated.
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
n/a
Logs
When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set
sarama.Logger
to alog.Logger
to capture Sarama debugoutput.
logs: CLICK ME
Problem Description
The fix for #1869 changed from initializing the zstd variables on demand (with sync.Once) to in init. Behind the scenes, this causes goroutines to be started (and calling
.Close()
on Sarama resources doesn't propagate through to calling.Close()
on the zstd instances).This causes tests that verify no leaked goroutines (i.e. using https://github.com/uber-go/goleak) to start to fail if they use Sarama.
The text was updated successfully, but these errors were encountered: