crowdsec
crowdsec copied to clipboard
Bug/ Go routine leak on reloading crowdsec
Describe the bug When crowdsec agent is reloaded, it leaks 1 go routine. This happens only when crowdsec is logging to a file. This leak is related to lumberjack at https://github.com/crowdsecurity/crowdsec/blob/4bb34d8e77ccd7191b8695ee4a3ebe03eae1c721/pkg/types/utils.go#L25 . The leaked go routine is tracked upstream at https://github.com/natefinch/lumberjack/issues/56
Note that doing LogOutput .Close() should stop the leaking go routine, but it doesn't. This is an issue with upstream.
To Reproduce Steps to reproduce the behavior: 1.Do sudo systemctl reload crowdsec 2. Check number of go routines. They increase on each reload
Expected behavior Reload should not increase number of go routines