Fix truncated exe file name in .NET core mini dump file name#123192
Merged
barosiak merged 6 commits intodotnet:mainfrom Jan 21, 2026
Merged
Fix truncated exe file name in .NET core mini dump file name#123192barosiak merged 6 commits intodotnet:mainfrom
barosiak merged 6 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the truncated executable file name issue in mini dump file names on Linux. When DOTNET_DbgMiniDumpName is set to %e.dmp, the executable name was being truncated to 15 characters because it was read from /proc/<pid>/status which uses a 16-byte buffer. The fix changes the code to first attempt reading the full executable path from /proc/<pid>/exe symlink (which has no length limit), falling back to the original /proc/<pid>/status method if that fails.
Changes:
- Add logic to read executable name from
/proc/<pid>/exesymlink before falling back to/proc/<pid>/status - Extract basename from the full path obtained via
readlink - Maintain backward compatibility by keeping the original status-based method as fallback
noahfalk
reviewed
Jan 16, 2026
Co-authored-by: Noah Falk <[email protected]>
Member
|
/ba-g Known issue #123260 closed. No need to run another round of CI |
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.
When creating mini dumps on Linux with the DOTNET_DbgMiniDumpName set to %e.dmp, the exe file name (%e) gets truncated to 15 characters as it's read from /proc/<pid>/status, which stores it in a 16-byte buffer.
This PR changes it, so that the executable name is read from /proc/<pid>/exe, with no length limit, and if that fails, then it fallbacks to reading from /proc/<pid>/status.
Tested locally by a local single-file test in the diagnostics repo, which will be added after these changes flow into the diagnostics repo.
Fix #83419