Skip to content

createdump requires root user #62781

@dzrhythm

Description

@dzrhythm

Description

This troubleshooting article mentions that createdump can be run as a non-root user, but I have not been successful in doing so. I get the error:

open(/proc/7/mem) FAILED 13 (Permission denied)

I have not found any documentation stating that it requires a root user, only SYS_PTRACE capability.

Reproduction Steps

  1. Run dotnet as a non-root user in a Linux container in Kubernetes with the SYS_PTRACE capability added.
  2. Use kubectl exec to get a shell into the container as the non-root user and try to run createdump on the dotnet process.

Expected behavior

createdump can be run as a non-root user.

Actual behavior

Fails with: open(/proc/7/mem) FAILED 13 (Permission denied)

Regression?

No response

Known Workarounds

Run the container as root in Kubernetes.

Configuration

  • .NET Core 3.1 and .NET 6.0.
  • mcr.microsoft.com/dotnet/runtime:6.0 or mcr.microsoft.com/dotnet/runtime:3.1 base image.

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions