-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
datapath: Extend METRICS_MAP to store prog ID / ifindex / LOC upon DROP_MISSED_TAIL_CALL #27748
Comments
In addition, we could also propagate it as |
We do that today. However, in the case of |
I meant setting the
You mean in case there's a fundamental problem with tail-calls, then the drop-notification also wouldn't make it out? Yep, true. Is that the typical problem? I would have figured we can also have scenarios where some tail-call is just not wired up correctly, but |
Yep, e.g., when there is a bug in our loader. |
I'll see if I can make some progress here in the coming weeks. Exporting this as a metric is not a terrible idea. Cardinality isn't much of an issue here, since there's a finite amount of call sites (file + loc tuples at least) for a given agent build. Not sure if ifindex is 100% relevant, perhaps local endpoint id is more useful since those correspond to dir names in the agent's state dir as well as prog array pin paths on bpffs? Sysdump picks those up, so easier to correlate. @brb wdyt? |
SGTM |
Some more data after investigating a few of these cases recently.
|
Keeping this on the radar, but deferring until tail call misses pop up again at some point. (#30248) There's room in the trailer of |
Fixes cilium#27748 Example output: ``` cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 6830 683492 198 trace.h Success EGRESS 6217 532344 198 trace.h Success INGRESS 4747 537660 86 l3.h Success INGRESS 4986 556878 229 trace.h Unsupported L3 protocol EGRESS 49 3670 1466 bpf_lxc.c ``` ``` cilium metrics list | grep drop cilium_drop_bytes_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 3740.000000 cilium_drop_count_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 50.000000 ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 6830 683492 198 trace.h Success EGRESS 6217 532344 198 trace.h Success INGRESS 4747 537660 86 l3.h Success INGRESS 4986 556878 229 trace.h Unsupported L3 protocol EGRESS 49 3670 1466 bpf_lxc.c ``` ``` cilium metrics list | grep drop cilium_drop_bytes_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 3740.000000 cilium_drop_count_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 50.000000 ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` cilium metrics list | grep -E "cilium_(drop|forward)" && cilium bpf metrics list cilium_drop_bytes_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 460.000000 cilium_drop_count_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 6.000000 cilium_forward_bytes_total direction="EGRESS" 285278.000000 cilium_forward_bytes_total direction="INGRESS" 448620.000000 cilium_forward_count_total direction="EGRESS" 1205.000000 cilium_forward_count_total direction="INGRESS" 2296.000000 REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 369 113022 40 encap.h Success EGRESS 690 163300 86 l3.h Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium metrics list | grep -E "cilium_(drop|forward)" cilium_drop_bytes_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 460.000000 cilium_drop_count_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 6.000000 cilium_forward_bytes_total direction="EGRESS" 285278.000000 cilium_forward_bytes_total direction="INGRESS" 448620.000000 cilium_forward_count_total direction="EGRESS" 1205.000000 cilium_forward_count_total direction="INGRESS" 2296.000000 ``` ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium metrics list | grep -E "cilium_(drop|forward)" cilium_drop_bytes_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 460.000000 cilium_drop_count_total direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol" 6.000000 cilium_forward_bytes_total direction="EGRESS" 285278.000000 cilium_forward_bytes_total direction="INGRESS" 448620.000000 cilium_forward_count_total direction="EGRESS" 1205.000000 cilium_forward_count_total direction="INGRESS" 2296.000000 ``` ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes #27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Fixes cilium#27748 Example output: ``` ~ cilium bpf metrics list REASON DIRECTION PACKETS BYTES LINE FILE Interface INGRESS 151 9368 1092 bpf_host.c Interface INGRESS 731 139248 659 bpf_overlay.c Success EGRESS 137 8212 1531 bpf_host.c Success EGRESS 9 744 1286 bpf_lxc.c Success INGRESS 11 926 86 l3.h Success INGRESS 1403 299078 231 trace.h Unsupported L3 protocol EGRESS 6 460 1466 bpf_lxc.c ``` ``` ~ cilium bpf metrics list -o json { "reason": "Success", "direction": "egress", "packets": 406587, "bytes": 78023315, "line": 40, "file": "encap.h" }, { "reason": "Unsupported L3 protocol", "direction": "egress", "packets": 167, "bytes": 12050, "line": 1466, "file": "bpf_lxc.c" } ``` Signed-off-by: Timo Beckers <timo@isovalent.com>
Currently, we get very little information when
DROP_MISSED_TAIL_CALL
happens - only the counter value is incremented (e.g., #26739).To fix that, we could extend the
METRICS_MAP
to store prog ID, ifindex, LOC in the metrics counter which could drastically help with troubleshooting. The meta info could be rendered into prometheus metric label.DROP_MISSED_TAIL_CALL
should be rare events, so the high cardinality of such a metric shouldn't be an issue.The text was updated successfully, but these errors were encountered: