{"record":{"id":"c75a700fcadbd6c1","repo":"cilium/cilium","slug":"failed-marshalling-uuid-to-v-w","errorCode":null,"errorMessage":"failed marshalling UUID to %v: %w","messagePattern":"failed marshalling UUID to (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/bgp/gobgp/server.go","lineNumber":242,"sourceCode":"func (g *GoBGPServer) AdvertisePath(ctx context.Context, p types.PathRequest) (types.PathResponse, error) {\n\tgobgpPath, err := ToGoBGPPath(p.Path)\n\tif err != nil {\n\t\treturn types.PathResponse{}, fmt.Errorf(\"failed converting Path to %v: %w\", p.Path.NLRI, err)\n\t}\n\n\tresp, err := g.server.AddPath(apiutil.AddPathRequest{Paths: []*apiutil.Path{gobgpPath}})\n\tif err != nil {\n\t\treturn types.PathResponse{}, fmt.Errorf(\"failed adding Path to %v: %w\", gobgpPath.Nlri, err)\n\t}\n\n\tagentPath, err := ToAgentPath(gobgpPath)\n\tif err != nil {\n\t\treturn types.PathResponse{}, fmt.Errorf(\"failed converting Path to %v: %w\", gobgpPath.Nlri, err)\n\t}\n\tif len(resp) > 0 {\n\t\tagentPath.UUID, err = resp[0].UUID.MarshalBinary()\n\t\tif err != nil {\n\t\t\treturn types.PathResponse{}, fmt.Errorf(\"failed marshalling UUID to %v: %w\", gobgpPath.Nlri, err)\n\t\t}\n\t} else {\n\t\treturn types.PathResponse{}, fmt.Errorf(\"empty AddPath reply for %v\", gobgpPath.Nlri)\n\t}\n\n\treturn types.PathResponse{\n\t\tPath: agentPath,\n\t}, err\n}\n\n// WithdrawPath withdraws a Path produced by AdvertisePath from this BgpServer.\nfunc (g *GoBGPServer) WithdrawPath(ctx context.Context, p types.PathRequest) error {\n\tid, err := uuid.FromBytes(p.Path.UUID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed converting UUID %v: %w\", p.Path.UUID, err)\n\t}\n\terr = g.server.DeletePath(apiutil.DeletePathRequest{\n\t\tUUIDs: []uuid.UUID{id},","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/pkg/bgp/gobgp/server.go#L224-L260","documentation":"AdvertisePath marshals the UUID returned by gobgp's AddPath reply into the agent Path's UUID bytes via resp[0].UUID.MarshalBinary(). This error means the binary UUID marshalling failed - the reply's UUID is malformed or of an unexpected type/version.","triggerScenarios":"AdvertisePath receives a non-empty AddPath reply whose first Path carries a UUID that fails MarshalBinary (wrong length, nil, or corrupt UUID from gobgp).","commonSituations":"gobgp library version skew where the UUID type changed; corrupted or uninitialized path UUIDs in the gobgp reply; extremely rare, usually indicates an internal bug or mismatched gobgp API version.","solutions":["Check the wrapped error to confirm the UUID length/type problem","Pin and align gobgp/api versions with the Cilium build (uuid.APIv1 vs v2 mismatches)","Restart/recreate the BGP server to get fresh, valid UUIDs from AddPath","If reproducible, file/report a bug - a valid AddPath reply should always carry a marshalable UUID"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"resp, err := srv.AdvertisePath(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"failed marshalling UUID\") {\n    return fmt.Errorf(\"gobgp returned a corrupt UUID; check gobgp version pinning: %w\", err)\n}","preventionTips":["Pin gobgp/api versions to the ones Cilium was built against","Restart the BGP server if corrupt UUIDs persist","Report reproducible UUID marshal failures as library bugs","Watch for upgrades that change the uuid package (APIv1 vs v2)"],"tags":["go","bgp","gobgp","uuid","version-skew"],"backgroundTag":"uuid-marshal-failed","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}