Skip to content

[24.0 backport] Fix npe in exec resize when exec errored#45643

Merged
AkihiroSuda merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_exec_npe
May 29, 2023
Merged

[24.0 backport] Fix npe in exec resize when exec errored#45643
AkihiroSuda merged 1 commit intomoby:24.0from
thaJeztah:24.0_backport_exec_npe

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

In cases where an exec start failed the exec process will be nil even though the channel to signal that the exec started was closed.

Ideally ExecConfig would get a nice refactor to handle this case better (ie. it's not started so don't close that channel). This is a minimal fix to prevent NPE. Luckilly this would only get called by a client and only the http request goroutine gets the panic (http lib recovers the panic).

(cherry picked from commit 487ea81)

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

In cases where an exec start failed the exec process will be nil even
though the channel to signal that the exec started was closed.

Ideally ExecConfig would get a nice refactor to handle this case better
(ie. it's not started so don't close that channel).
This is a minimal fix to prevent NPE. Luckilly this would only get
called by a client and only the http request goroutine gets the panic
(http lib recovers the panic).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 487ea81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 24.0.3 milestone May 28, 2023
@thaJeztah thaJeztah requested review from AkihiroSuda and cpuguy83 May 28, 2023 17:07
@thaJeztah
Copy link
Copy Markdown
Member Author

FWIW; I checked if this was needed for the 23.0 branch, but this looks to have been introduced in 4bafaa0#diff-706db5cf0385b14587b021d64bb7edf3ef1b35cf349e8368b1fdfeeeec573a87 (#43564), which is not part of the 23.0 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants