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

fix: increase loop iteration count in pid lookup #3264

Closed
wants to merge 1 commit into from

Conversation

arthur-zhang
Copy link
Contributor

@arthur-zhang arthur-zhang commented Dec 27, 2024

Description

the process level is bigger than 4 in container like envs. If we start tetragon late after my process start, process may miss some parent process.

For example, in the popular orbstack(https://orbstack.dev/) implementation. Starting from the current process to the root process with pid 1, it takes 5 steps. Change the loop count to a higher value make tetragon work in orbstack vms. Or Tetragon will find parent failed, and affect many functions.

zsh-79260   [007] ....1 80569.428901: bpf_trace_printk: >>>>__event_find_parent: fork, pid=28997, value is null:1
 zsh-79260   [007] ....1 80569.428901: bpf_trace_printk: >>>>__event_find_parent: fork, pid=544, value is null:1
 zsh-79260   [007] ....1 80569.428902: bpf_trace_printk: >>>>__event_find_parent: fork, pid=508, value is null:1
 zsh-79260   [007] ....1 80569.428902: bpf_trace_printk: >>>>__event_find_parent: fork, pid=507, value is null:1
 zsh-79260   [007] ....1 80569.428902: bpf_trace_printk: >>>>__event_find_parent: fork, pid=1, value is null:0

Changelog

increase loop iteration count in event_find_curr function from 4 to 6

Signed-off-by: arthur-zhang <happyzhangya@gmail.com>
@arthur-zhang arthur-zhang requested a review from a team as a code owner December 27, 2024 10:05
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

Successfully merging this pull request may close these issues.

1 participant