Closed raghurampai closed 4 years ago
Noticed an issue in NetFlow decoder's stop logic which can result in- fatal error: all goroutines are asleep - deadlock!
Below is the issue described in decoders/decoder.go code-
func (w Worker) Start() { go func() { //log.Debugf("Worker %v started", w.Id) for { // w.WorkerPool <- w.InMsg -- Issue commented select { case <-w.Quit: break // case msg := <-w.InMsg: -- Issue commented case w.WorkerPool <- w.InMsg: // -- Fix added msg := <-w.InMsg // -- Fix added timeTrackStart := time.Now()
Go playground for quick check- https://play.golang.org/p/LnDFz8vT_4G
Thanks!
Thanks @raghurampai for the report. Made a PR for the fix. Will test.
Noticed an issue in NetFlow decoder's stop logic which can result in-
fatal error: all goroutines are asleep - deadlock!
Below is the issue described in decoders/decoder.go code-
Go playground for quick check-
https://play.golang.org/p/LnDFz8vT_4G
Thanks!