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

scx_rusty: Don't use PID to identify tasks between userspace and BPF #610

Open
htejun opened this issue Sep 5, 2024 · 0 comments
Open
Assignees
Labels
bpf help wanted Extra attention is needed scx_rusty

Comments

@htejun
Copy link
Contributor

htejun commented Sep 5, 2024

scx_rusty implements most of load balancing logic in userspace and uses PID to identify tasks between userspace and BPF. However, a task's PID can change when a non-leader thread exec(2)s as it swaps its PID with the group leader before killing all other threads and exec(2)ing. This PID change can lead to various malfunctions in scx_rusty including occasional crashes. #437 is likely one of the symptoms too.

It'd be useful to create a repro case which can demonstrate the problem reliably and fix it by changing the key to something actually persistent and unique - e.g. the task pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bpf help wanted Extra attention is needed scx_rusty
Projects
None yet
Development

No branches or pull requests

3 participants