Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 29, 2023

Conversation

thaJeztah
Copy link
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
Copy link
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.

@AkihiroSuda AkihiroSuda merged commit 143a251 into moby:24.0 May 29, 2023
101 checks passed
@thaJeztah thaJeztah deleted the 24.0_backport_exec_npe branch May 29, 2023 05:46
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.

None yet

3 participants