[release/10.0] Defer DOTNET_DbgEnableMiniDump error message until dump creation by github-actions[bot] · Pull Request #126055 · dotnet/runtime (original) (raw)
AI and others added 8 commits
…Line
Move the error message from PalCreateDumpInitialize to BuildCreateDumpCommandLine. This prevents the error from appearing during initialization when createdump binary doesn't exist, and instead only shows it when a dump is actually being created. This allows DOTNET_DbgEnableMiniDump to be set even when crossgen is involved.
Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com
Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com
…mandLine
Keep the original logic where the path is not stored if the file doesn't exist. Only move the fprintf from PalCreateDumpInitialize to BuildCreateDumpCommandLine.
Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com
Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com
Add a new global flag g_warnCreateDumpMissing to distinguish between:
- DOTNET_DbgEnableMiniDump not set (no warning needed)
- DOTNET_DbgEnableMiniDump set but createdump missing (warning on dump creation)
Set the flag in PalCreateDumpInitialize when createdump is not found. Check the flag in both dump creation code paths:
- BuildCreateDumpCommandLine (called by PalGenerateCoreDump)
- PalCreateCrashDumpIfEnabled (called on crash)
This ensures the warning only appears when actually trying to create a dump, not during initialization.
Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com
Extract the error message into g_createDumpMissingMessage constant to avoid duplication and make future updates easier.
Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com
Remove g_warnCreateDumpMissing flag and stat() check during initialization. Instead, detect the missing createdump binary when execv() returns ENOENT error and print the error message at that point. This defers the check until dump creation time, avoiding unnecessary file system checks during initialization.
Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com
hoyosjs linked an issue
that may beclosed by this pull request
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
[ Show hidden characters]({{ revealButtonHref }})