dotnet/runtime · error
Problem reading from createdump child_read_pipe: %s (%d)\n
Error message
Problem reading from createdump child_read_pipe: %s (%d)\n
What it means
In the createdump child process (PalCreateDump.cpp:253-260), after the parent signals readiness via the pipe, the child performs `read(child_read_pipe, &buffer, 1)`. If bytesRead != 1 (the parent did not write the expected single byte — e.g. it died, closed early, or the write failed) the child prints this with the errno and exits. It indicates the parent/child coordination handshake broke down.
Source
Thrown at src/coreclr/nativeaot/Runtime/unix/PalCreateDump.cpp:258
{
close(pipe_descs[i]);
}
return false;
}
else if (childpid == 0)
{
close(parent_read_pipe);
close(parent_write_pipe);
// Wait for prctl(PR_SET_PTRACER, childpid) in parent
char buffer;
int bytesRead;
while((bytesRead = read(child_read_pipe, &buffer, 1)) < 0 && errno == EINTR);
close(child_read_pipe);
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
{View on GitHub (pinned to 290d5ab72c)
Solutions
- Check the parent-side logs/stderr for the preceding failure (often the prctl or write error).
- On Linux, ensure ptrace scope permits the operation (e.g. `/proc/sys/kernel/yama/ptrace_scope`).
- Update to a current .NET build where the handshake is hardened.
- If reproducible, capture strace of the parent to see why the byte was never written.
Example fix
# before: createdump spawned but parent died / blocked by ptrace_scope=3 # after: allow ptrace sudo sysctl kernel.yama.ptrace_scope=2
Defensive patterns
Strategy: retry
Validate before calling
// In the parent, ensure the write completes; surface the real failure.
ssize_t w;
do { w = write(parent_write_pipe, "S", 1); } while (w < 0 && errno == EINTR);
if (w != 1) { fprintf(stderr, "parent write to createdump pipe failed: %s\n", strerror(errno)); } Try / catch
// Around the createdump spawn in the parent; treat EINTR as retry, others as fatal.
for (;;) {
rc = spawn_createdump(...);
if (rc == 0) break;
if (errno != EINTR) { log_and_disable_minidump(); break; }
} Prevention
- Relax ptrace_scope if Yama LSM blocks the parent/child ptrace handshake.
- Keep .NET updated; the pipe handshake has been hardened over releases.
- Capture stderr from the parent alongside createdump to see the originating failure.
When it happens
Trigger: The parent process crashing or being killed between fork and the `write(parent_write_pipe,...)`; the parent failing the prctl/ptracer step and closing the pipe; a race where the pipe is closed before the byte is written.
Common situations: The crashing process exits before createdump is fully primed; system restrictions on ptrace (Yama LSM) killing the parent; resource exhaustion closing file descriptors.
Related errors
- Problem writing to createdump parent_write_pipe: %s (%d)\n
- DOTNET_DbgEnableMiniDump is set and the createdump binary do
- Problem launching createdump (may not have execute permissio
- Problem waiting for createdump: waitpid() FAILED result %d w
- Problem reading from createdump child_read_pipe: %s (%d)\n
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/05a42149ff1d8e4a.
Report an issue: GitHub.