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

fix verifier log omitted #800

Merged
merged 2 commits into from
Sep 2, 2024
Merged

fix verifier log omitted #800

merged 2 commits into from
Sep 2, 2024

Conversation

weli-l
Copy link
Contributor

@weli-l weli-l commented Aug 31, 2024

What type of PR is this?
fix verifier log omitted

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Signed-off-by: weli-l <1289113577@qq.com>
pkg/bpf/bpf.go Outdated
@@ -79,7 +81,11 @@ func (l *BpfLoader) StartAdsMode() (err error) {
}()

if err = l.obj.Load(); err != nil {
return fmt.Errorf("bpf Load failed, %s", err)
l.Stop()
Copy link
Member

Choose a reason for hiding this comment

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

this is not needed there is a defer above

}
}()

if err = l.obj.Load(); err != nil {
l.Stop()
Copy link
Member

Choose a reason for hiding this comment

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

remove

Signed-off-by: weli-l <1289113577@qq.com>
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Project coverage is 51.95%. Comparing base (9db2d28) to head (1375e39).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
pkg/bpf/bpf_kmesh_l4_workload.go 28.57% 4 Missing and 1 partial ⚠️
pkg/bpf/bpf.go 0.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
pkg/bpf/bpf.go 41.81% <0.00%> (-0.78%) ⬇️
pkg/bpf/bpf_kmesh_l4_workload.go 31.03% <28.57%> (+1.40%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 835d85e...1375e39. Read the comment docs.

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

Missed there is a bug

@@ -68,6 +69,7 @@ func NewBpfLoader(config *options.BpfConfig) *BpfLoader {
}

func (l *BpfLoader) StartAdsMode() (err error) {
var ve *ebpf.VerifierError
Copy link
Member

Choose a reason for hiding this comment

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

This should be var ve ebpf.VerifierError, otherwise the below &ve will panic

Copy link
Contributor Author

@weli-l weli-l Sep 2, 2024

Choose a reason for hiding this comment

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

This should be var ve ebpf.VerifierError, otherwise the below &ve will panic

The function we finally call is

func ErrorWithLog(source string, err error, log []byte, truncated bool) *VerifierError {
       ... ...
}

So, this ve should be *ebpf.VerifierError, And actually when I change *ebpf.VerifierError to ebpf.VerifierError, it will panic
image

Copy link
Member

Choose a reason for hiding this comment

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

IC, this is related to VerifierError implementation

@kmesh-bot kmesh-bot removed the approved label Sep 2, 2024
Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hzxuzhonghu hzxuzhonghu merged commit 304ae91 into kmesh-net:main Sep 2, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants