dotnet/runtime · error

DOTNET_DbgEnableMiniDump is set and the createdump binary do

Error message

DOTNET_DbgEnableMiniDump is set and the createdump binary does not exist: %s\n

What it means

When DOTNET_DbgEnableMiniDump is set, the runtime tries to exec the createdump helper to write a crash dump. If execv fails with ENOENT (PalCreateDump.cpp:271-273), the createdump binary path in argv[0] does not exist on disk, so the child prints this and exits. No dump will be produced on the next crash.

Source

Thrown at src/coreclr/nativeaot/Runtime/unix/PalCreateDump.cpp:273

        if (bytesRead != 1)
        {
            fprintf(stderr, "Problem reading from createdump child_read_pipe: %s (%d)\n", strerror(errno), errno);
            close(child_write_pipe);
            exit(-1);
        }

        // Only dup the child's stderr if there is error buffer
        if (errorMessageBuffer != nullptr)
        {
            dup2(child_write_pipe, STDERR_FILENO);
        }
        // Execute the createdump program
        if (execv(argv[0], (char* const *)argv) == -1)
        {
            if (errno == ENOENT)
            {
                fprintf(stderr, "DOTNET_DbgEnableMiniDump is set and the createdump binary does not exist: %s\n", argv[0]);
            }
            else
            {
                fprintf(stderr, "Problem launching createdump (may not have execute permissions): execv(%s) FAILED %s (%d)\n", argv[0], strerror(errno), errno);
            }
            exit(-1);
        }
    }
    else
    {
        close(child_read_pipe);
        close(child_write_pipe);
#if HAVE_PRCTL_H && HAVE_PR_SET_PTRACER
        // Gives the child process permission to use /proc/<pid>/mem and ptrace
        if (prctl(PR_SET_PTRACER, childpid, 0, 0, 0) == -1)
        {
            // Ignore any error because on some CentOS and OpenSUSE distros, it isn't
            // supported but createdump works just fine.

View on GitHub (pinned to 290d5ab72c)

Solutions

  1. Reinstall or re-publish the runtime so the createdump binary is present alongside the host.
  2. Ensure the createdump path is reachable (absolute path, correct arch).
  3. If you do not need dumps, unset DOTNET_DbgEnableMiniDump to silence this.
  4. For self-contained apps, do not trim out the createdump asset.

Example fix

# before: createdump missing from install
export DOTNET_DbgEnableMiniDump=1   # ... 'createdump binary does not exist'
# after: restore the binary or disable the var
unset DOTNET_DbgEnableMiniDump   # (or copy createdump next to the host)
Defensive patterns

Strategy: validation

Validate before calling

// Ensure createdump exists before enabling minidumps.
#include <sys/stat.h>
struct stat st;
const char* path = getenv("DOTNET_DbgMiniDumpName");
if (getenv("DOTNET_DbgEnableMiniDump") && (stat(path ? path : DEFAULT_CREATEDUMP_PATH, &st) != 0)) {
  fprintf(stderr, "createdump not found at %s; disabling minidump\n", path);
  unsetenv("DOTNET_DbgEnableMiniDump");
}

Prevention

When it happens

Trigger: Mini-dump env var enabled on an install whose createdump binary was deleted, renamed, or never deployed; the runtime pointing at a relative path that no longer resolves.

Common situations: Trimmed/self-contained publish that excluded createdump; a custom install layout that moved the binary; DOTNET_DbgMiniDumpName pointing at a non-existent helper.

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/a0a2673d3b76b184. Report an issue: GitHub.