Closed supercharge-xsy closed 2 months ago
/assign
also met this before. Sometimes increasing it will work: print more verifier logs, but the log size is not as expected.
This env will not take effect once we upgrade the pkg https://github.com/kmesh-net/kmesh/pull/717
BPF_LOG_SIZE has been removed, but the verifier's log cannot be dumped completely, We can temporarily modify the following code to ensure that all logs are exported
func (cl *collectionLoader) loadProgram(progName string) (*Program, error) {
... ...
prog, err := newProgramWithOptions(progSpec, cl.opts.Programs)
if err != nil {
return nil, fmt.Errorf("program %s: %+w", progName, err)// %w can be modified to %+w
}
cl.programs[progName] = prog
return prog, nil
}
if err = l.workloadObj.Load(); err != nil {
l.Stop()
return fmt.Errorf("bpf Load failed, %s", err)
}
We should always use %w to print error instead of %s
close now, as BPF_LOG_SIZE is no longer needed. If there is truncated issue, should report to cilium ebpf repo
What happened: BPF_LOG_SIZE is used to set the err buffer size of the verification result returned when the BPF program fails to be loaded. However, the setting does not take effect.:
like this,the log is also be truncated: load program: bad address: 12124: (25) if r2 > 0xd goto pc+165: The sequence of 8193 jumps is too complex. (truncated, 108 line(s) omitted)" What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment: