Skip to content

[24.0 backport] daemon: fix panic on failed exec start#45794

Merged
neersighted merged 2 commits intomoby:24.0from
thaJeztah:24.0_backport_fix_45770_processevent_nil_check
Jun 23, 2023
Merged

[24.0 backport] daemon: fix panic on failed exec start#45794
neersighted merged 2 commits intomoby:24.0from
thaJeztah:24.0_backport_fix_45770_processevent_nil_check

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

backport of


If an exec fails to start in such a way that containerd publishes an exit event for it, daemon.ProcessEvent will race daemon.ContainerExecStart in handling the failure. This race has been a long-standing bug, which was mostly harmless until 4bafaa0. After that change, the daemon would dereference a nil pointer and crash if ProcessEvent won the race. Restore the status quo buggy behaviour by adding a check to skip the dereference if execConfig.Process is nil.

- 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)

thaJeztah and others added 2 commits June 22, 2023 23:25
Use `WithFields()` instead of chaining multiple `WithField()` calls.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit de363f1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
If an exec fails to start in such a way that containerd publishes an
exit event for it, daemon.ProcessEvent will race
daemon.ContainerExecStart in handling the failure. This race has been a
long-standing bug, which was mostly harmless until
4bafaa0. After that change, the daemon
would dereference a nil pointer and crash if ProcessEvent won the race.
Restore the status quo buggy behaviour by adding a check to skip the
dereference if execConfig.Process is nil.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 3b28a24)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 24.0.3 milestone Jun 22, 2023
@thaJeztah
Copy link
Copy Markdown
Member Author

@corhere @neersighted ptal (added one other commit for a clean cherry)

@thaJeztah
Copy link
Copy Markdown
Member Author

oh! Docker Hub having issues?

ERROR: failed to solve: golang:1.20.5-bullseye: failed to authorize: failed to fetch oauth token: unexpected status from POST request to https://auth.docker.io/token: 503 Service Unavailable
Error: buildx bake failed with: ERROR: failed to solve: golang:1.20.5-bullseye: failed to authorize: failed to fetch oauth token: unexpected status from POST request to https://auth.docker.io/token: 503 Service Unavailable

@thaJeztah
Copy link
Copy Markdown
Member Author

^^ issue was related to a failed deploy earlier, and they were in the middle of rolling out some changes, which could cause some small time interruptions (so we were lucky to hit those)

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