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

PID/HostPID and PPID/HostPPID values getting printed in e-notation #123

Open
nyrahul opened this issue Aug 19, 2022 · 13 comments · May be fixed by #473
Open

PID/HostPID and PPID/HostPPID values getting printed in e-notation #123

nyrahul opened this issue Aug 19, 2022 · 13 comments · May be fixed by #473
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nyrahul
Copy link
Contributor

nyrahul commented Aug 19, 2022

== Alert / 2022-08-19 04:27:34.376499 ==
ClusterName: default
HostName: gke-core-trial-core-trail-pool-c7857dc6-nlgl
NamespaceName: demo-app
PodName: emailservice-764655647c-t84h6
Labels: app=emailservice
ContainerName: server
ContainerID: e997fdf138710f366726a6bf9fda5caff29aa4c11771349ae5860289f3dc11f3
ContainerImage: docker.io/knoxuser/emailservice:latest@sha256:09d9aace64450c47c24d7b99b4c90772cf14910142efc5346d065657b6fd8929
Type: MatchedPolicy
PolicyName: DefaultPosture
Source: /bin/grpc_health_probe -addr=:8080
Resource: /bin/grpc_health_probe
Operation: File
Action: Block
Data: syscall=SYS_OPENAT fd=-100 flags=O_RDONLY|O_CLOEXEC
Enforcer: eBPF Monitor
Result: Permission denied
HostPID: 3.586496e+06
HostPPID: 2.949047e+06
PID: 171927
PPID: 2.949047e+06
ParentProcessName: /usr/bin/containerd-shim-runc-v2
ProcessName: /bin/grpc_health_probe

PID/PPID, HostPID/HostPPID needs to be printed in normal integer notation.

@nyrahul nyrahul added bug Something isn't working good first issue Good for newcomers labels Aug 19, 2022
@daemon1024
Copy link
Member

Valid for PID and PPID as well, when you keep the containers running long enough...

@nyrahul nyrahul changed the title HostPID and HostPPID values getting printed in e-notation (scientific notation) PID/HostPID and PPID/HostPPID values getting printed in e-notation Aug 19, 2022
@sahilsarawagi
Copy link

please assign me this issue, I want to work on this.

@daemon1024
Copy link
Member

Thanks a lot @sahilsarawagi for your interest to work on this, feel free to ask anything related to this issue in this thread or on our slack channel ✌🏽

@Ankurk99
Copy link
Member

Hey @sahilsarawagi! Is there any update on this issue? Do you need any help?

@sahilsarawagi
Copy link

@Ankurk99, this happens when the process ID gets a value greater than a million. I am still trying to solve the problem that is causing this output.

@nyrahul
Copy link
Contributor Author

nyrahul commented Sep 1, 2022

@Ankurk99, this happens when the process ID gets a value greater than a million. I am still trying to solve the problem that is causing this output.

@sahilsarawagi , it is completely normal to get a PID/PPID value greater than a million. The default pid_max value in Linux kernel is 2^22.

The ask here is to print the pid/ppid in a regular non-enotation format.

@sahilsarawagi
Copy link

sahilsarawagi commented Sep 1, 2022

@nyrahul, I was saying that the $ karmor log starts giving the PID value in enotation form, when the value of PID exceeds greater than a million. I am still trying to find out which coding error which is causing this enotation format. As I am new to this enviroment that's why it taking so long.

@daemon1024
Copy link
Member

@sahilsarawagi no worries, take your time. A hint here might be this started happening when we changed to a generic printing format for all the fields in the telemetry event,

str = str + fmt.Sprintf("%s: %v\n", k, res[k])

@KapilSareen
Copy link

Hi @nyrahul, has this been completed, or is it still open for contributions?

@nyrahul
Copy link
Contributor Author

nyrahul commented Dec 14, 2024

Hi @nyrahul, has this been completed, or is it still open for contributions?

I am not sure if this was fixed. I just tried in my env, but I was unable to get higher order PIDs/PPIDs and hence couldn't reproduce. @daemon1024 , WDYT?

@KapilSareen
Copy link

Thanks @nyrahul for the update. Since it seems like the issue hasn't been fully addressed yet, I’d be happy to take a look and work on reproducing the issue. Let me know if you'd like me to dive deeper into it.

@nyrahul
Copy link
Contributor Author

nyrahul commented Dec 17, 2024

Thanks @nyrahul for the update. Since it seems like the issue hasn't been fully addressed yet, I’d be happy to take a look and work on reproducing the issue. Let me know if you'd like me to dive deeper into it.

Go for it! Many thanks for handling this.

@KapilSareen
Copy link

All done @nyrahul! Take a look and let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
5 participants