-
Notifications
You must be signed in to change notification settings - Fork 88
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
Conversation
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() |
There was a problem hiding this comment.
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
pkg/bpf/bpf_kmesh_l4_workload.go
Outdated
} | ||
}() | ||
|
||
if err = l.obj.Load(); err != nil { | ||
l.Stop() |
There was a problem hiding this comment.
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>
Codecov ReportAttention: Patch coverage is
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[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 |
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?: