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
feature(proctree): Introduce a process tree #3364
feature(proctree): Introduce a process tree #3364
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There are some key questions for the the control plane in this, hopefully i've laid out my concerns clearly enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't finished going over all of the PR, but I have the following general comments:
- This PR is a merge of 3 different concepts - control plane signals, user-mode process tree and procfs initialization. Each of them is independent, and I think would be better to be his unique PR (though maybe the control plane and process tree division now will be hard, so its your choice).
- From what I have seen (and I might be wrong) you only have threads in the tree. I think it will be hard to get interesting information about threads and processes this way. I will read it more deeply when I will review the rest of the code.
- I like the idea of exporting the responsibility of parsing the events from the tree. It looks much cleaner.
- I am a bit afraid that we use 3rd party for uesr-mode hashing but our for the eBPF hashing. We should think how to avoid the 3rd party changes creating inconsistency in the code.
- The whole control plane events should have much more designing, as the current design has a lot of issues that arose here.
- I don't think we can merge it till all the memory is capped, but I guess you didn't plan to as well :).
Nice work overall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished reviewing all the code, but might add some comments about the code as a whole in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting in the conversations
7756208
to
d25d8c6
Compare
d25d8c6
to
a7cf5c4
Compare
4abf20d
to
2a3d852
Compare
2a3d852
to
ea4f697
Compare
- Also: avoid duplicate entries in changelog
- improve proctree boottime calculation - use same function for tracee singleton starttime calculation
It is hard to debug the process tree. This commit removes the debug messages used during process tree development. The reason why there is a commit for this is because one might want to revert this commit in order to debug a new issue found until process tree is considered stable.
... at least until it is fully implemented, tested and stable.
- add debug message when same timestamp gets 2 diff values
... other than caching only.
3c79d54
to
5321b26
Compare
This set of commits introduce the Process Tree feature to tracee.
1cd7123 debug(proctree): remove debug information
25c7c0e chore(time): centralize timing functions
30abbef chore(changelog): change values if given timestamp exists
16cd971 debug(proctree): split evictions from procs and threads
9482357 chore(proctree): move anon procfs functions to real ones
b89b97b chore(proctree): turn async procfs channel writes non blocking
b37197c feature(proctree): create config setting for proctree cache size
d7cf7e8 feature(proctree): enable async procfs updates to proctree
e3ae4a4 feature(proctree): add changelog support to fileinfo
ab5e285 feature(proctree): add name to processes and threads
45e337d debug(proctree): display proctree cache status in debug mode
bc5b89e chore(proctree): do not update parent and leader when they exist
4297538 chore(proctree) adjust the place for process tree initialization
f08de61 feature(proctree): read single PID from procfs
ce564bb chore(controlplane): comment how to debug proctree
4928826 chore(controlplane): rename containers file and eventID var
8f06bbe feature(proctree): start the process tree data structure
8bef843 feature(changelog): introduce the changelog package
e06e284 feature(utils/proc): add stat and status file parsing
80df989 chore(controlplane): rename local variable to ctrl
d7cb57c feature(controller): create processes lifecycle functions
f5e6b5b chore(parse): tell argument type on argument parsing errors
9aca78c chore(ebpf): move functions with inline asm
55a782e feature(controlplane): create signal events to be used by controlplane
0e2de67 feature(events): task unique identifier murmur hashing
126c929 chore(types): update to latest containing entityID
Missing features:
All those being worked at: #3468