go-delve/delve · error
eBPF disabled
Error message
eBPF disabled
What it means
SymbolToOffset in helpers_disabled.go is the no-eBPF stub that maps an ELF symbol name to a byte offset for uprobe attachment. Without eBPF support compiled in, this lookup is meaningless and always fails. It indicates the delve binary lacks eBPF tracing capability.
Source
Thrown at pkg/proc/internal/ebpf/helpers_disabled.go:34
func (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint32) error {
return errors.New("eBPF is disabled")
}
func (ctx *EBPFContext) AttachURetprobe(pid int, name string, offset uint32) error {
return errors.New("eBPF is disabled")
}
func (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error {
return errors.New("eBPF is disabled")
}
func (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams {
return nil
}
func SymbolToOffset(file, symbol string) (uint32, error) {
return 0, errors.New("eBPF disabled")
}
func LoadEBPFTracingProgram(path string) (*EBPFContext, error) {
return nil, errors.New("eBPF disabled")
}
func AddressToOffset(f *elf.File, addr uint64) (uint32, error) {
return 0, errors.New("eBPF disabled")
}
View on GitHub (pinned to a23773e6c3)
Solutions
- Rebuild with the ebpf build tag on Linux
- Verify target binary and delve are both ELF (SymbolToOffset parses ELF symbols)
- Use standard breakpoints instead of eBPF tracepoints
Defensive patterns
Strategy: fallback
Validate before calling
// check that the binary is ELF and eBPF is available before SymbolToOffset
f, err := elf.Open(file)
if err != nil { return err } // not ELF; ebpf path unusable
_ , err2 := ebpf.SymbolToOffset(file, symbol) // probe availability in tests Try / catch
off, err := ebpf.SymbolToOffset(file, sym)
if err != nil && strings.Contains(err.Error(), "eBPF disabled") {
return fallbackToBreakpoint(sym)
} Prevention
- Only invoke the eBPF path when the binary was built with the ebpf tag
- Validate the target is an ELF Linux binary first
- Keep a non-eBPF trace fallback in tooling that calls delve programmatically
When it happens
Trigger: Calling SymbolToOffset(file, symbol) on a delve build without the 'ebpf' tag; it is invoked as part of uprobe setup when attaching tracepoints to functions in a binary.
Common situations: Non-Linux build or Linux build without the ebpf tag attempting 'dlv trace --ebpf'; users of prebuilt binaries that omit ebpf.
Related errors
- could not find symbol in executable sections of binary
- eBPF is disabled
- could not open elf file to resolve symbol offset: %w
- ErrCouldNotDetermineRelocation
- ErrNoDebugInfoFound
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/024cf002cfd791a5.
Report an issue: GitHub.