User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 0381abe7-6c94-438f-b832-5899b6620be1
Description
What happened:
In pkg/api/handlers/exec.go:506, close(sizeQueue.ch) is called at line 506 but <-done (which waits for the read goroutine to exit) is at line 511. The read goroutine can still be executing the case sizeQueue.ch <- remotecommand.TerminalSize{...} select arm at line 481 when the channel is already closed. This is a guaranteed runtime panic whenever a resize or stdin message arrives in the window between lines 506 and 511.
What I expected:
close(sizeQueue.ch) should be moved to after <-done so the read goroutine has fully exited before the channel is closed.
Steps to reproduce:
- Start an exec session
- Send a terminal resize message at the same time the exec stream ends
- Observe a runtime panic from send on closed channel
This issue was automatically created from the KubeStellar Console.
User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 0381abe7-6c94-438f-b832-5899b6620be1
Description
What happened:
In
pkg/api/handlers/exec.go:506,close(sizeQueue.ch)is called at line 506 but<-done(which waits for the read goroutine to exit) is at line 511. The read goroutine can still be executing thecase sizeQueue.ch <- remotecommand.TerminalSize{...}select arm at line 481 when the channel is already closed. This is a guaranteed runtime panic whenever a resize or stdin message arrives in the window between lines 506 and 511.What I expected:
close(sizeQueue.ch)should be moved to after<-doneso the read goroutine has fully exited before the channel is closed.Steps to reproduce:
This issue was automatically created from the KubeStellar Console.