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

Split iovec reading for tcp_recvmsg #1108

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

grcevski
Copy link
Contributor

@grcevski grcevski commented Aug 27, 2024

This is a regression fix for a refactor we did in the last 2 months to read multiple segments of the iov pointer inside msghdr. In case of a large incoming request, the kernel buffer used for iov might be replenished and we'll loose the pointer to the original buffer, if we read the iov address at probe return.

After the nice refactor of the code by @rafaelroquetto, it was easy to separate the acquisition of the iov pointer from the reading of the data. I had to duplicate the data structure for the purpose of keeping the iov pointers, since we can't use pointers in eBPF maps value structs.

@codecov-commenter
Copy link

codecov-commenter commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.93%. Comparing base (7adc34c) to head (3caacbf).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1108      +/-   ##
==========================================
- Coverage   81.96%   78.93%   -3.03%     
==========================================
  Files         140      140              
  Lines       11514    11514              
==========================================
- Hits         9437     9089     -348     
- Misses       1553     1898     +345     
- Partials      524      527       +3     
Flag Coverage Δ
integration-test 57.01% <ø> (-0.04%) ⬇️
k8s-integration-test 59.14% <ø> (-0.08%) ⬇️
oats-test ?
unittests 52.36% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rafaelroquetto
Copy link
Contributor

Please don't merge this just yet, I'm investigating a few failing tests on 5.x that may or may not be related.

Copy link
Contributor

@rafaelroquetto rafaelroquetto left a comment

Choose a reason for hiding this comment

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

Looks fantastic to me! Thank you so much! It fixes all the failing tests on 5.x as well

@rafaelroquetto
Copy link
Contributor

Retested on 5.x with latest changes, all tests pass. Merging so that I can rebase the tests.

@rafaelroquetto rafaelroquetto merged commit a3ffb2f into grafana:main Aug 27, 2024
6 checks passed
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.

5 participants