Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wolfi-base: timeout process is running as PPID = 1 instead of PID of the shell running it. #39407

Open
ib-ak opened this issue Jan 13, 2025 · 0 comments

Comments

@ib-ak
Copy link

ib-ak commented Jan 13, 2025

I am running wolfi-base container image.
I am running two shells.
first one

docker run -it chainguard/wolfi-base sh

second one - I execed into the container from docker desktop(also tried from a different osx Terminal)

When I run
timeout 10 sleep 10 from the second terminal

and checked process details from first terminal, I see the timeout is run under PPID = 1 instead of the second shell pid.

/ # ps -eo ppid,pid,user,sid,comm
PPID  PID   USER     SID   COMMAND
    0     1 root         1 sh
    0    12 root        12 sh
    0    92 root        92 sh
   92   103 root        92 sleep
    1   105 root       105 timeout
    1   106 root         1 ps

child command (sleep in above example) under timeout is executed under assumingely correct ppid(92 sh)

Since timeout command is not running with correct ppid I suspect it is creating zombie processes and unable to reap process correctly. If I run command from shell window with pid =1 it clears up zombie process.

/ # ps aux
PID   USER     TIME  COMMAND
    1 root      0:00 sh
   12 root      0:00 /bin/sh
   92 root      0:00 sh
  105 root      0:00 [timeout]
  109 root      0:00 [timeout]
  112 root      0:00 [timeout]
  115 root      0:00 [timeout]
  116 root      0:00 ps aux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant