Skip to content

terminalSizeQueue channel never closed preventing SPDY executor goroutine from terminating #7047

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 949a2954-7543-403d-97e0-540f8ed4acd7

Description

What happened:
In pkg/api/handlers/exec.go:215-220, terminalSizeQueue.Next() blocks on <-q.ch and returns nil only when the channel is closed. The channel is created at line 416 but is never closed anywhere in HandleExec. When the exec stream ends, the SPDY executor's internal goroutine calling Next() can remain blocked indefinitely since nil is never returned to signal end-of-stream.

What I expected:
defer close(sizeQueue.ch) should be added after StreamWithContext returns to signal the SPDY executor's goroutine to terminate.

Steps to reproduce:

  1. Start an exec session
  2. End the session
  3. Observe the SPDY executor's size-queue goroutine remains blocked on the unclosed channel

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.triage/neededNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions