k9s: 0.25.13 - Leaving Logs View Causes Crash: "panic: send on closed channel"




Describe the bug When I press ESC to leave a pod’s logs, k9s crashes with:

panic: send on closed channel
   goroutine 303 [running]:       (NOTE: the number here seems to change and may not be relevant)
     github.com/derailed/k9s/internal/dao.readLogs({SNIP, SNIP}, {SNIP, SNIP}, SNIP, SNIP)
       github.com/derailed/k9s/internal/dao/pod.go:393

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘Pods view’
  2. Press “l” (lowercase L) to view a pod’s logs
  3. Press ESC to leave the logs screen (
  4. See error

Expected behavior I am expecting to not receive the error.

Screenshots n/a

Versions (please complete the following information):

  • OS: Windows 10
  • K9s: 0.25.13
  • K8s: 1.19.15

Additional context Occasionally, this doesn’t occur the first time I enter the logs, but I am reliably producing once I’ve gone into the logs more that once. It’s also possible that it has happened once or twice without me pressing ESC, but I cannot confirm that this is anything other than my bad memory of the first couple of times it happened. I went from 0.24.X(not sure) to latest version today and this started occurring.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I am still getting this on v0.25.14 😦 It completely crashes, such that I have to close down the terminal completely, in order to continue

@farzadmf @jscheytt Thank you so much Farzad and Josia!! How refreshing and so unexpected! You guys totally made my day! This is so humbling and I must say tho a tad rocky of recent ;( your testimonies, support and act of kindness are in the true spirit of what I’ve always imagined the k9s community should always be! For this I feel truly blessed as the majority of folks on this channel have been nothing but kind, patient, willing to help and understanding knowing very well that k8s is complicated and hence so is k9s and that we may screw the pouch from time to time. We don’t have an army of paid FT devs on this gig, but do our very best to address blockers quickly, maintain some sanity and stability so all of us here can leverage this tool to get our jobs done quickly and efficiently. This is exactly what k9s was designed for in the first place since we set sails on this venture back in Jan 2019. Yikes! anniversary coming up soon better get those ties ironed out 😉 Woof Woof!!

@farzadmf Thank you for your kindness! fix is on the way. As for the red message it is indeed intended and kind of what got us into this predicament in the first place 😭 We’ll get thru it!! Sorry for the disruptions! hopefully this time for sure…

I manually downgraded to 0.25.12, and it’s working fine now. No rush on my side 😆

Also, I noticed something in the new version that when getting the logs, it shows a “red” message saying “pod received EOF …” (or something like that), which I find confusing. Of course, if that’s intended, all good, but just mentioning it in case it’s not 🙂

Just the fact that you say all these things in reply to us proves what kind of a human being you are, confirming that you deserve all the praise you get. It’s not easy at all to maintain a project like this. Again, kudos and well done.

And … just … thank you again

Thank you all for the heads up!! Meow! back to the drawing board on this deal… Sorry for the disruption 😭 Fix on the way…

Still getting the error if i change logs view to 1m, 5m, etc