Skip to content
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

DELIA-67400: Trim minidump filename length #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ks734
Copy link
Contributor

@ks734 ks734 commented Feb 11, 2025

Description

Minidump compression is failing due to "File name too long" issue. So, limiting the minidump file name length to 70 characters

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (doesn't fit into the above categories - e.g. documentation updates)

Requires Bitbake Recipe changes?

  • The base Bitbake recipe (meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updating SRC_REV)

@ks734 ks734 requested a review from goruklu February 11, 2025 12:07
@@ -136,7 +136,8 @@ bool Minidump::postHalt()
* @return Destination minidump file path string
*/
#define FIREBOLT_STATE "fireboltState"
#define MINIDUMP_FN_SEPERATOR "<#=#>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use the <#=#> seperator to make sure minidump scripts work properly.

fileName = mUtils->getContainerId() + "_" + it->second.c_str() + "_" + timeString.str();
if (fileName.length() > MINIDUMP_FILENAME_LENGTH)
fileName.resize(MINIDUMP_FILENAME_LENGTH);
destFile = dir + "/" + fileName + ".dmp";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 70 char limit includes the directory and the .dmp extension.
so the limit for filename is actually (70-dir.length()-4)
if dir is /opt/secure/minidumps, then limit becomes 70 - 22 - 4 = 44 chars.

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.

2 participants