{"record":{"id":"6f9d6cf7d7ae5ed3","repo":"go-delve/delve","slug":"ebpf-is-disabled","errorCode":null,"errorMessage":"eBPF is disabled","messagePattern":"eBPF is disabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/internal/ebpf/helpers_disabled.go","lineNumber":18,"sourceCode":"//go:build !linux || !amd64 || !go1.16\n\npackage ebpf\n\nimport (\n\t\"debug/elf\"\n\t\"errors\"\n)\n\ntype EBPFContext struct {\n}\n\nfunc (ctx *EBPFContext) Close() {\n\n}\n\nfunc (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint32) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) AttachURetprobe(pid int, name string, offset uint32) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams {\n\treturn nil\n}\n\nfunc SymbolToOffset(file, symbol string) (uint32, error) {\n\treturn 0, errors.New(\"eBPF disabled\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/internal/ebpf/helpers_disabled.go#L1-L36","documentation":"On builds without eBPF support (helpers_disabled.go, e.g. non-Linux platforms or builds with the ebpf tag off), EBPFContext is a stub and every attach operation returns 'eBPF is disabled'. eBPF-based non-stop tracing is simply unavailable in this binary.","triggerScenarios":"Running 'dlv trace --ebpf' or any code path calling AttachUprobe/AttachURetprobe with a Delve binary compiled without eBPF support (macOS/Windows, or linux build without the ebpf build tag / compiled object).","commonSituations":"Using delve installed from macOS/Windows package managers and passing --ebpf; a linux dlv binary built without the eBPF object (make build-ebpf-object not run); distro packages compiled without eBPF support.","solutions":["Use trace without --ebpf (regular breakpoint-based tracing) on unsupported platforms","On Linux, build delve with eBPF support: make build-ebpf-object followed by make build/install","Install a delve build for linux/amd64 or linux/arm64 that includes the compiled eBPF objects","Check 'dlv --help'/version or build tags to confirm whether your binary supports eBPF"],"exampleFix":"// before (macOS / unsupported build)\ndlv trace --ebpf main.foo\n// error: eBPF is disabled\n// after (linux, with eBPF built)\nmake build-ebpf-object && make build\n./dlv trace --ebpf main.foo","handlingStrategy":"fallback","validationCode":"// detect eBPF support before requesting it:\nif runtime.GOOS != \"linux\" {\n    return errors.New(\"eBPF tracing requires linux; omit --ebpf\")\n}","typeGuard":null,"tryCatchPattern":"if err := runTrace(useEBPF); err != nil {\n    if strings.Contains(err.Error(), \"eBPF is disabled\") {\n        log.Println(\"this delve build lacks eBPF; retrying with standard breakpoints\")\n        return runTrace(false)\n    }\n    return err\n}","preventionTips":["Check build support (GOOS/build tags) before using --ebpf","On linux install an eBPF-enabled delve build (make build-ebpf-object)","Keep a non-eBPF trace fallback in scripts and tooling"],"tags":["ebpf","build-tags","platform-support","tracing"],"backgroundTag":"ebpf-disabled-build","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}