-
Notifications
You must be signed in to change notification settings - Fork 444
register normalizeTimeArg processor only when proctree is on #4332
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
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.
In what case will a time arg be nil?
Currently, when not using proctree, see:
|
That's odd. Sounds to me like that is the bug. |
If you're not using proctree, it should have been fed by the control plane signal, right? |
Ok so these arguments are sort of "metadata" arguments which are submitted on a need basis for the process tree (see here). I then question what merit they have as arguments. Arguments or as want to call it "event data" should reflect user informative data on the event. If this is not such data, that is, it is some sort of "metadata" argument, then that reflects an issue in the event format. |
It is: Lines 100 to 102 in 1a0065b
|
The relevant processor is here Lines 87 to 93 in 1a0065b
|
Nice. This makes sense to me now. So yeah, I believe it should be in the condition below. |
3e967ae
to
eba5649
Compare
eba5649
to
0b35baa
Compare
// | ||
// Process Tree Processors | ||
// | ||
|
||
// Processors registered when proctree source "events" is enabled. | ||
switch t.config.ProcTree.Source { | ||
case proctree.SourceEvents, proctree.SourceBoth: | ||
// Event Timestamps Normalization |
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.
Logically this works. But I would rather have it in a separate section to convey the intention of all timestamp arguments being registered and processed first. I do think that an effort in another PR of yours may help us move this logic from the processing alltogether, I'll elaborate there.
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 want to resolve this properly with the changes to argument typing (and thus move this logic to decoding timestamp args).
So for now, lets merge this and more importantly cherry-pick to the v0.22.3 release so that users don't receive the repeated errors.
The normalizeTimeArg function was not checking if the value was nil before asserting it as an uint64. This also adds the type to the error message.
Register SchedProcessFork processors, including normalizeTimeArg, only if proctree is enabled.
0b35baa
to
30b33a4
Compare
/fast-forward |
Close: #4330
1. Explain what the PR does
0b35baa fix(ebpf): register processor conditionally
206e160 fix(ebpf): try to assert only when it is not nil
2. Explain how to test it
sudo ./dist/tracee -e sched_process_fork
sudo ./dist/tracee --proctree source=both -e sched_process_fork
to have related args filled.3. Other comments