-
Notifications
You must be signed in to change notification settings - Fork 21
Print CORE_COLLECTOR as debug info #117
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
base: main
Are you sure you want to change the base?
Conversation
Printing CORE_COLLECTOR helps developers identify which core collector, along with its respective options, was used to capture the dump. It is also helpful when writing kdump and kdump-utils tests using external test frameworks like op-tests. Suggested-by: Shirisha G <shirisha@linux.ibm.com> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Summary of ChangesHello @sourabhjains, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a minor but impactful change to the kdump script by adding debug output for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces debug logging for the CORE_COLLECTOR variable in the kdump.sh script. The added ddebug statements will help developers identify the core collector used during dump capture, which can be useful for debugging and testing. I have identified a potential issue where the debug log might expose sensitive information if CORE_COLLECTOR contains secrets.
| fi | ||
|
|
||
| dinfo "saving vmcore" | ||
| ddebug "Core Collector: $CORE_COLLECTOR" |
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.
The CORE_COLLECTOR variable might contain sensitive information (e.g., passwords, API keys) if custom configurations are used. Printing it as debug information could expose these secrets. Consider sanitizing the output or using a more secure way to log this information.
For example, you could log a hash of the sensitive parts, or redact them entirely.
| ddebug "Core Collector: $CORE_COLLECTOR" | |
| ddebug "Core Collector: $(echo "$CORE_COLLECTOR" | sed 's/password=\S*//g')" # Redact sensitive information |
prudo1
left a comment
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.
Hi Sourabh,
I don't understand the problem you are trying to solve with this PR. Can you please explain in what situation printing of the CORE_COLLECTOR helps and why it needs special handling compared to the other config options.
Thanks
Philipp
First, while debugging kdump, one can see which CORE_COLLECTOR along with its options was used to capture the dump. Second, to automate the kdump and kdump-utils tests, if CORE_COLLECTOR is printed on the console, one can parse it to verify that the configured CORE_COLLECTOR option was actually used during dump capture.
I just want to print the CORE_COLLECTOR during dump collection to see which options were used by the CORE_COLLECTOR. For example, what was the value of --num-threads= for the makedumpfile CORE_COLLECTOR. |
|
Hi @prudo1, Do you still request any change after Sourabh has provided the explanation? |
|
Hi Coiby, sorry for the late reply. I still don't see the benefit in adding those debug messages. For me it looks like a workaround without addressing the underlying problem. I'd prefer see a cleanup so that the Thanks |
I understand there might be some confusion around CORE_COLLECTOR, as we don’t yet have a common function to manage it. That said, this patch only adds a print for CORE_COLLECTOR, and that too only when debug mode is enabled. The kdump service already prints several details, including its log level, but it currently misses one key piece of information - the CORE_COLLECTOR. I believe adding this would help both while debugging and during test automation. |
|
Hi Sourabh,
you are not only adding a print. You are also adding a dependency of an external test on that print, which isn't documented anywhere. So this print adds a big maintenance overhead for us in the long term. That's why I want to have a more generic solution that helps with not just this single problem. All in all the best way forward is to fix the xtrace issue @coiby is tracking in #108. When this is fixed you can add Thanks |
|
I will try the changes introduce in #108 and close this pull request. |
Printing CORE_COLLECTOR helps developers identify which core collector, along with its respective options, was used to capture the dump.
It is also helpful when writing kdump and kdump-utils tests using external test frameworks like op-tests.