-
Notifications
You must be signed in to change notification settings - Fork 152
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
kargo-controller creates zombie [git] processes #2926
Comments
This is an interesting issue as we appear to make use of Needs a more thorough investigation. |
Update: I have thus far been unable to reproduce this on a development setup of |
Appear to have found one variation of this, steps:
|
Similarly, just now, I've been able to do the same with HTTPS:
|
Before our custom credential helper is implicated... This has the same result:
The zombies are It is interesting that @hiddeco was able to make ssh zombies instead of git zombies, but the overall smell is similar. |
@krancour does this go away if you set |
Changes the error message, but the zombies still get created. |
|
This is interesting... Remove GIT_ASKPASS from the equation and this can still be triggered:
|
The problem is likely that the
We can confirm this theory by running @krancour's original example with the $ docker run --init -d --rm -e GIT_ASKPASS=/usr/local/bin/credential-helper -w /tmp ghcr.io/akuity/kargo:v1.0.3 sleep 1000
$ docker exec <id> git clone https://github.com/some/repository.git
...
$ docker exec <id> git clone https://github.com/some/repository.git
...
$ docker exec <id> git clone https://github.com/some/repository.git
...
$ docker exec 197f93ca78208788f3ee1ebdf62a27a5380d37f4db70e955add7fa97013e111e ps aux
PID USER TIME COMMAND
1 nonroot 0:00 /sbin/docker-init -- sleep 1000
7 nonroot 0:00 sleep 1000
38 nonroot 0:00 ps aux To avoid this, we should likely make use of a lightweight supervisor like |
Nice find @hiddeco! |
Checklist
kargo version
.Description
We use kargo in openshift cluster. Openshift runs it with the following user:
runAsUser: 1001910000
(ps output for this user attached as screenshots). Since 1.0.3 update we have noticed it creates zombie processes [git]. Those process slowly bulk up and make controller unusable (unix fork can't create more processes).Warehouse
set to discover new tags usingNewestTag
strategy speeds up this process (you can see a 'zombie' spawn on each refresh of WH in the UI). With 1m interval and 20 discovery limit kargo-controller was dead in half a day (we had about 44 active WHs with 'NewestTag' subscription)Screenshots
Steps to Reproduce
ps auxf | grep 'defunct' | wc -l
NewestTag
in the UIps auxf | grep 'defunct' | wc -l
- count will increment as new 'zombie' has spawned.Version
Kargo v1.0.3
Logs
The text was updated successfully, but these errors were encountered: