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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
console: Fix crash if debug console disabled #555
Merged
lifupan
merged 6 commits into
kata-containers:2.0-dev
from
jodh-intel:2.0-dev-agent-fix-shutdown-crash
Aug 26, 2020
Merged
console: Fix crash if debug console disabled #555
lifupan
merged 6 commits into
kata-containers:2.0-dev
from
jodh-intel:2.0-dev-agent-fix-shutdown-crash
Aug 26, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Print a simple version string rather than delaying the output to display a structured version string. The structured output is potentially more useful but: - This output is not consistent with other components. - Delaying the output makes `--version` unusable in some environments (since a lot of setup is called before the version string can be output). Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add the configuration details in the announcement log call. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Move the sandbox creation into a new function. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Remove confusing commented out code and some stray testing code. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Don't create a thread to wait for the ttRPC server to end - it isn't required as the operation should be blocked on. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The logic for the debug console meant that if the debug console was _disabled_, the agent was guaranteed to crash on function exit due to the unsafe code block. Fixed by simplifying the code to use the standard `Option` idiom for optional values. Fixes: kata-containers#554. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
force-pushed
the
2.0-dev-agent-fix-shutdown-crash
branch
from
August 21, 2020 16:53
cd64544
to
d12f920
Compare
/test |
devimc
approved these changes
Aug 24, 2020
bergwolf
reviewed
Aug 26, 2020
let _ = server.start().unwrap(); | ||
|
||
handle.join().unwrap(); | ||
let _ = rx.recv().map_err(|e| format!("{:?}", e)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really unnecessary, I think it's inherited from the init debug code.
lifupan
approved these changes
Aug 26, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The logic for the debug console meant that if the debug console was disabled, the agent was guaranteed to crash on function exit due to the unsafe code block. Fixed by simplifying the code to use the standard
Option
idiom for optional values.Fixes: #554.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com
Note: This PR includes a few other fixes which are part of #411. However, the tracing PR is still not ready and since these fixes are not actual trace changes, I'd like to land them before yet-more rebase hell caused by tracking the branch head 馃槃