Skip to content

createdump SIGSEGVs when generating a heap-type minidump for an interpreter process on Linux #128044

@max-charlamb

Description

@max-charlamb

Note

The body of this issue was AI/Copilot-generated.

Description

On Linux, createdump segfaults when generating a heap-type minidump (DOTNET_DbgMiniDumpType=2, MiniDumpWithPrivateReadWriteMemory) for a process that uses the interpreter (DOTNET_Interpreter=...).

Full dumps (DOTNET_DbgMiniDumpType=4) and Windows minidumps work correctly.

This was hit by the cDAC dump-test infrastructure when InterpreterStack's DumpTypes was set to Heap. The PR (#126520) had to revert to Full to unblock CI.

Repro

Run any interpreter-using debuggee on Linux with createdump configured to produce a heap dump:

DOTNET_Interpreter=MethodA \
DOTNET_DbgEnableMiniDump=1 \
DOTNET_DbgMiniDumpType=2 \
DOTNET_DbgMiniDumpName=/tmp/interp.dmp \
dotnet exec InterpreterStack.dll

Observed log signature

[createdump] Gathering state for process 146 dotnet
[createdump] Crashing thread 0092 signal 6 (0006)
waitpid() returned successfully (wstatus 0000000b) WEXITSTATUS 0 WTERMSIG b
Aborted
  • WTERMSIG b = signal 11 (SIGSEGV) — createdump itself crashed
  • No "Writing minidump with heap to file ..." line
  • No "Dump successfully written" line

Compare to a working heap-dump run on the same Linux build (non-interpreter debuggee):

[createdump] Gathering state for process N
[createdump] Crashing thread NN signal 6
[createdump] Writing minidump with heap to file ...
[createdump] Written N bytes to core file
[createdump] Dump successfully written

Suspected area

Heap-type minidump generation requires createdump to walk runtime metadata to select which regions to include (vs full dump, which dumps the whole address space). The crash happens between "Gathering state" and "Writing minidump", which corresponds to the region-selection walk. Interpreter regions (g_interpModule / interp stub manager state) are likely tripping a null deref or unsupported codepath in createdump or the native DAC's region enumeration.

Workaround

Use DOTNET_DbgMiniDumpType=4 (Full) for interpreter scenarios on Linux.

Reference

See https://dev.azure.com/dnceng-public/public/_build/results?buildId=1414141&runId=39343878 for a CI repro on azurelinux.3.amd64.open.rt.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions