{"record":{"id":"f34e3466e6d2c4b2","repo":"go-delve/delve","slug":"chan-type-not-yet-supported-by-ebpf-tracing","errorCode":null,"errorMessage":"chan type not yet supported by ebpf tracing","messagePattern":"chan type not yet supported by ebpf tracing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/proc/internal/ebpf/helpers.go","lineNumber":567,"sourceCode":"\t\tiparam.RealType = &godwarf.UintType{BasicType: godwarf.BasicType{CommonType: godwarf.CommonType{ByteSize: vs, ReflectKind: reflect.Uintptr}}}\n\tcase reflect.Slice:\n\t\tiparam.Kind = reflect.Uintptr\n\t\tiparam.RealType = &godwarf.UintType{BasicType: godwarf.BasicType{CommonType: godwarf.CommonType{ByteSize: 8, ReflectKind: reflect.Uintptr}}}\n\tcase reflect.String:\n\t\tif len(iparam.Data) >= 16 {\n\t\t\tiparam.Base = fakeAddressUnresolv + uint64(valSize)\n\t\t\tiparam.Len = int64(binary.LittleEndian.Uint64(iparam.Data[8:16]))\n\t\t}\n\t\tiparam.RealType = &godwarf.StringType{\n\t\t\tStructType: godwarf.StructType{\n\t\t\t\tCommonType: godwarf.CommonType{ByteSize: 16, ReflectKind: reflect.String},\n\t\t\t\tKind:       \"struct\",\n\t\t\t},\n\t\t}\n\tcase reflect.Map:\n\t\tiparam.Unreadable = fmt.Errorf(\"map type not yet supported by ebpf tracing\")\n\tcase reflect.Chan:\n\t\tiparam.Unreadable = fmt.Errorf(\"chan type not yet supported by ebpf tracing\")\n\tcase reflect.Interface:\n\t\tiparam.Unreadable = fmt.Errorf(\"interface type not yet supported by ebpf tracing\")\n\tcase reflect.Func:\n\t\tiparam.Unreadable = fmt.Errorf(\"func type not yet supported by ebpf tracing\")\n\tcase reflect.Struct:\n\t\tiparam.Unreadable = fmt.Errorf(\"struct type not yet supported by ebpf tracing without DWARF type\")\n\tcase reflect.Array:\n\t\tiparam.Unreadable = fmt.Errorf(\"array type not yet supported by ebpf tracing without DWARF type\")\n\tdefault:\n\t\tiparam.Unreadable = fmt.Errorf(\"unrecognized reflect.Kind %d from eBPF\", iparam.Kind)\n\t}\n}\n\nfunc createFunctionParameterList(entry uint64, goidOffset int64, args []UProbeArgMap, isret bool) function_parameter_list_t {\n\tvar params function_parameter_list_t\n\tparams.goid_offset = uint32(goidOffset)\n\tparams.fn_addr = entry\n\tparams.is_ret = isret","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/internal/ebpf/helpers.go#L549-L585","documentation":"Same fallback path as the map case: when the eBPF argument map provides only a reflect.Kind and the kind is Chan, synthesizeTypeFromKind marks the parameter Unreadable because channel internals cannot be reconstructed from the 0x30 raw bytes captured by the uprobe. The trace event is not lost; only this channel-typed argument is undisplayable.","triggerScenarios":"Tracing a function with a chan-typed parameter or return value via the eBPF backend when no DWARF type is available for the argument, so handleParamEvent falls back to synthesizeTypeFromKind and hits 'case reflect.Chan'.","commonSituations":"'dlv trace --ebpf' on producer/consumer functions taking channels; eBPF type tests against fixtures with chan parameters; tracing functions in binaries with insufficient DWARF info.","solutions":["Do not attach eBPF tracepoints to functions whose arguments are channels; trace a scalar-returning wrapper instead.","Keep DWARF info in the traced binary so the full channel element type resolution path can be attempted instead of the Kind-only fallback.","Treat the parameter as unreadable in tooling: check iparam.Unreadable before loading the value.","Watch delve's eBPF type-support roadmap for chan support."],"exampleFix":"// before\ndlv trace --ebpf worker.Send   // Send(ch chan Job)\n// parameter shows: chan type not yet supported by ebpf tracing\n// after\n// trace with a pointer/scalar-friendly signature:\nfunc (w *Worker) SendID(id int) { w.send(jobs[id]) }\ndlv trace --ebpf worker.SendID","handlingStrategy":"type-guard","validationCode":"// Reject chan-typed arguments before creating the tracepoint:\nfunc argSupportsEBPF(t godwarf.Type) bool {\n\treturn t != nil && t.Common().ReflectKind != reflect.Chan\n}","typeGuard":"func isChanParam(p *RawUProbeParam) bool {\n\treturn p != nil && p.Kind == reflect.Chan\n}","tryCatchPattern":"if p.Unreadable != nil && strings.Contains(p.Unreadable.Error(), \"chan type not yet supported\") {\n\tlog.Printf(\"skipping chan parameter %s (eBPF unsupported)\", p.Name)\n\tcontinue\n}","preventionTips":["Do not select functions with chan parameters as eBPF trace targets.","Keep DWARF info intact in the traced binary to use the typed resolution path.","Check Unreadable on every returned parameter before rendering values.","Use breakpoint-based tracing for channel-heavy code paths."],"tags":["ebpf","tracing","unsupported-type","reflect"],"backgroundTag":"ebpf-unsupported-arg-type","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}