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

process priority sometimes fails #11986

Closed
utam0k opened this issue Aug 9, 2022 · 2 comments · Fixed by #14111
Closed

process priority sometimes fails #11986

utam0k opened this issue Aug 9, 2022 · 2 comments · Fixed by #14111
Assignees
Labels
team: workspace Issue belongs to the Workspace team type: improvement Improves an existing feature or existing code

Comments

@utam0k
Copy link
Contributor

utam0k commented Aug 9, 2022

Bug description

The process priority plugin is sometimes only applied to some processes. In the following cases, the group of 504971 must have a nice value of -5.

$ ps axf -o pid,ni,cmd
...
 504739   0 /usr/local/bin/containerd-shim-runc-v2 -namespace k8s.io -id 5fa477a5741ed9e1f0a24f5e8322c6665731bbf72bd688272b97fde2182141f3 -address /run/containerd/containerd.sock
 504759   0  \_ /pause
 504811   0  \_ /.supervisor/workspacekit ring0
 504864   0      \_ /proc/self/exe ring1 --mapping-established
 504892 -10          \_ supervisor init
 504948 -10              \_ supervisor run
 504970   0                  \_ /bin/bash
 505934   0                  |   \_ go test ./...
 507868   0                  |       \_ /home/gitpod/go/pkg/tool/linux_amd64/link -o /tmp/go-build2190347413/b107/cgroups.test -importcfg /tmp/go-build2190347413/b107/importcfg.link -s -w -buildmode=exe -buildid=Cne5zAgKwTeQw5tPwGIe/Pjz7hu6jf2589CNGO-UL/sdMx9k7i2eBg5bMzvCR_/Cne5zAgKwTeQw5tPwGIe -e
 507917   0                  |       \_ /home/gitpod/go/pkg/tool/linux_amd64/vet -atomic -bool -buildtags -errorsas -ifaceassert -nilfunc -printf -stringintconv /tmp/go-build2190347413/b109/vet.cfg
 504971   0                  \_ sh /ide/bin/gitpod-code --install-builtin-extension gitpod.gitpod-theme --install-builtin-extension github.vscode-pull-request-github --port 23000 --host 0.0.0.0 --without-connection-token --server-data-dir /workspace/.vscode-remote --do-not-sync --start-server
 507103   0                      \_ /ide/node /ide/out/server-main.js --install-builtin-extension gitpod.gitpod-theme --install-builtin-extension github.vscode-pull-request-github --port 23000 --host 0.0.0.0 --without-connection-token --server-data-dir /workspace/.vscode-remote --do-not-sync --sta
 507171   0                          \_ /ide/node /ide/out/bootstrap-fork --type=ptyHost --logsPath /workspace/.vscode-remote/data/logs/20220809T063816
 507824   0                          \_ /ide/node /ide/out/bootstrap-fork --type=fileWatcher

Probably depends on the time of this sleep

Steps to reproduce

It should be easier to reproduce if the waiting time before setting the process priority is very short.

Workspace affected

No response

Expected behavior

In all cases, the nice value is set correctly.

Example repository

No response

Anything else?

No response

@utam0k utam0k added type: bug Something isn't working team: workspace Issue belongs to the Workspace team labels Aug 9, 2022
@aledbf
Copy link
Member

aledbf commented Aug 22, 2022

In all cases, the nice value is set correctly.

That requires we run the plugin periodically.

@aledbf aledbf added type: improvement Improves an existing feature or existing code and removed type: bug Something isn't working labels Aug 22, 2022
@utam0k
Copy link
Contributor Author

utam0k commented Aug 22, 2022

That requires we run the plugin periodically.

That's one way to do it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: workspace Issue belongs to the Workspace team type: improvement Improves an existing feature or existing code
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants