Skip to content

Conversation

@benkilimnik
Copy link
Member

@benkilimnik benkilimnik commented Aug 28, 2023

Summary: Updates the currently broken tcp_drops PxL script to use a different BPFtrace program depending on the kernel version of the host it is deployed to.

Related issues: Fixes #1582

Type of change: /kind bug

Test Plan: Verified that new script works on kernels >=5.19. Note: due to backported changes (i.e. the kprobe was removed in older versions of the kernel), the old bpftrace script may not work on some older kernels <5.19. Unfortunately, the new script may also not work on older kernels because of other unsupported features. More testing is required to modify the old tcp_drops script to work on kernels <5.19.

…cripts depending on host

Signed-off-by: Benjamin Kilimnik <bkilimnik@pixielabs.ai>
Signed-off-by: Benjamin Kilimnik <bkilimnik@pixielabs.ai>
# flake8: noqa:E501

import pxtrace
import px
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why we have these files duplicated? I wonder if we should symlink them to avoid any potential divergence if they are truly supposed to be identical.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, it seems like there are a couple PxL scripts which are duplicated in the pxl_scripts/px and pxl_scripts/bpftrace directories. I agree that it would make sense to symlink them or remove a duplicate. It also looks like they were added in separate commits, so it could simply be an oversight.

$ join -j 1 <(find px/ -type f -exec md5sum {} + | sort) <(find bpftrace/ -type f -exec md5sum {} + | sort) | awk '{print $2, $3}'
px/tcp_drops/manifest.yaml bpftrace/tcp_drops/manifest.yaml
px/tcp_drops/data.pxl bpftrace/tcp_drops/data.pxl
px/tcp_drops/vis.json bpftrace/tcp_drops/vis.json
px/tcp_retransmits/manifest.yaml bpftrace/tcp_retransmits/manifest.yaml
px/tcp_retransmits/vis.json bpftrace/tcp_retransmits/vis.json
px/tcp_restransmits/data.pxl bpftrace/tcp_retransmits/data.pxl

Copy link
Member Author

@benkilimnik benkilimnik Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the duplicate tcp_drops script in px in the most recent commit. Going to open a separate PR for tcp_retransmits.

… issues

Signed-off-by: Benjamin Kilimnik <bkilimnik@pixielabs.ai>
@benkilimnik benkilimnik marked this pull request as ready for review September 27, 2023 21:10
Signed-off-by: Benjamin Kilimnik <bkilimnik@pixielabs.ai>
@JamesMBartlett JamesMBartlett merged commit e11c95e into pixie-io:main Oct 3, 2023
@RagalahariP
Copy link
Contributor

@benkilimnik It appears that the README contains references to px/tcp_drops that have been deleted.

@ddelnano
Copy link
Member

ddelnano commented Oct 4, 2023

@RagalahariP thanks for mentioning this. I've updated the README in #1725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

px/tcp_drops pxl script broken due to missing tcp_drop kprobe

4 participants