RDKEMW-16955: Log firebolt state of the app in OOMCrash plugin#436
Draft
ks734 wants to merge 1 commit into
Draft
RDKEMW-16955: Log firebolt state of the app in OOMCrash plugin#436ks734 wants to merge 1 commit into
ks734 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the OOMCrash plugin so it can run without an explicit path, auto-enables it during spec generation, and changes OOM detection to use memory.oom_control plus usage-based fallbacks while logging Firebolt state.
Changes:
- Made OOMCrash
pathoptional and skipped mount/crash-file setup when it is absent. - Added automatic
oomcrashplugin injection inDobbySpecConfig. - Reworked OOM detection to parse
memory.oom_control, add max-usage fallback checks, and log Firebolt annotations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
rdkPlugins/OOMCrash/source/OOMCrashPlugin.h |
Declares the new memory-limit helper used by OOM detection. |
rdkPlugins/OOMCrash/source/OOMCrashPlugin.cpp |
Implements optional-path handling, new OOM detection logic, and Firebolt state logging. |
bundle/runtime-schemas/defs-plugins.json |
Relaxes the OOMCrash schema so path is no longer required. |
bundle/lib/source/DobbySpecConfig.cpp |
Auto-injects the oomcrash RDK plugin into generated specs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bool oomDetected = false; | ||
| if (mUtils->exitStatus != 0) | ||
| oomDetected = checkForOOM(); | ||
| bool oomDetected = checkForOOM(); |
Comment on lines
+321
to
+324
| // Priority 3: on kernel < 4.13 under_oom may have cleared — check max_usage | ||
| else if (isMemoryAtLimit()) | ||
| { | ||
| AI_LOG_WARN("oom_control did not confirm OOM but max memory usage reached limit " |
Comment on lines
+342
to
+347
| auto prevIt = annotations.find(FIREBOLT_STATE_PREV); | ||
| if (prevIt != annotations.end()) | ||
| { | ||
| fireboltState = prevIt->second; | ||
| AI_LOG_INFO("Using previous fireboltState '%s' (current may have been " | ||
| "set after OOM kill)", fireboltState.c_str()); |
This file contains hidden or 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
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.
Description
Test Procedure
Type of Change
Requires Bitbake Recipe changes?
meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updatingSRC_REV)