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

Add support for dynamically adding forked processes to the active pid list #18

Open
aymericDD opened this issue Dec 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@aymericDD
Copy link
Contributor

aymericDD commented Dec 30, 2022

Ebpfault does not inject child process of a program. If an application creates a fork and this fork open a file, ebpfault will not catch the event. Example:

bash -c "echo 'create file to read from: /mnt/data/disk-read-file' && dd if=/dev/zero of=/mnt/data/disk-read-file bs=10k count=1; while true; do time dd if=/mnt/data/disk-read-file of=/dev/null iflag=direct; sleep 1; done"

The previous command will not be impacted by ebpfault because the dd command will be executed in a child process:

strace  -e trace=openat -p xxx
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16039, si_uid=0, si_status=0, si_utime=0, si_stime=1} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16042, si_uid=0, si_status=0, si_utime=1, si_stime=0} ---

Do you think we can implement this feature (We could add a flag like -f --follow)?

@alessandrogario alessandrogario added the enhancement New feature or request label Jan 6, 2023
@alessandrogario alessandrogario changed the title Support child process injection Add support for dynamically adding forked processes to the active pid list Jan 6, 2023
@zouyonghao
Copy link

Any idea for this?
Is it possible to generate a new BPF program when a new process found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants