Skip to content

Log the graceful-stop error instead of silently discarding it in gracefulStopContainer#1782

Open
radheradhe01 wants to merge 1 commit into
apple:mainfrom
radheradhe01:fix/log-graceful-stop-error
Open

Log the graceful-stop error instead of silently discarding it in gracefulStopContainer#1782
radheradhe01 wants to merge 1 commit into
apple:mainfrom
radheradhe01:fix/log-graceful-stop-error

Conversation

@radheradhe01

Copy link
Copy Markdown

Closes #1756.

RuntimeService.gracefulStopContainer(_:signal:timeout:) wraps the graceful-stop attempt in do { … } catch {} — an empty catch that silently discards any thrown error before falling through to the unconditional lc.stop(). It is the only catch in this file that does not log; every other one uses self.log.error(…, metadata: ["error": "\(error)"]).

This adds a single log line matching that convention, so a failed graceful stop (and the resulting fall-through to a forced VM shutdown) is diagnosable. The intentional fall-through to lc.stop() is unchanged.

The catch around the graceful-stop attempt in gracefulStopContainer was empty, swallowing any error before the fall-through to lc.stop(). Add a log line matching the file convention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gracefulStopContainer silently swallows the graceful-stop error in an empty catch {} (no log)

1 participant