opencontainers / opencontainers/runc

exec fails when called from a chroot

Open
#1,499 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

runc exec ... fails with errors like

exec failed: container_linux.go:259: starting container process caused "open /proc/391/status: no such file or directory"

I assume because it is looking at /proc when it should be looking at $chrootfs/proc since an equivalent nsenter command would be like

nsenter -t $CT_PID -p -u -n -i -m chroot $chrootfs ps x

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failure points to container_linux.go:259; begin by tracing runc exec from that location and compare its /proc lookup with the nsenter/chroot command shown. Done means runc exec works from a chroot without producing the reported missing /proc status error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.