{"record":{"id":"72c27ed298eca074","repo":"tailscale/tailscale","slug":"unknown-profile","errorCode":null,"errorMessage":"Unknown profile","messagePattern":"Unknown profile","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"ipn/ipnlocal/c2n_pprof.go","lineNumber":29,"sourceCode":"\t\"runtime\"\n\t\"runtime/pprof\"\n\t\"strconv\"\n)\n\nfunc init() {\n\tc2nLogHeap = func(w http.ResponseWriter, r *http.Request) {\n\t\t// Support same optional gc parameter as net/http/pprof:\n\t\tif gc, _ := strconv.Atoi(r.FormValue(\"gc\")); gc > 0 {\n\t\t\truntime.GC()\n\t\t}\n\t\tpprof.WriteHeapProfile(w)\n\t}\n\n\tc2nPprof = func(w http.ResponseWriter, r *http.Request, profile string) {\n\t\tw.Header().Set(\"X-Content-Type-Options\", \"nosniff\")\n\t\tp := pprof.Lookup(string(profile))\n\t\tif p == nil {\n\t\t\thttp.Error(w, \"Unknown profile\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tgc, _ := strconv.Atoi(r.FormValue(\"gc\"))\n\t\tif profile == \"heap\" && gc > 0 {\n\t\t\truntime.GC()\n\t\t}\n\t\tdebug, _ := strconv.Atoi(r.FormValue(\"debug\"))\n\t\tif debug != 0 {\n\t\t\tw.Header().Set(\"Content-Type\", \"text/plain; charset=utf-8\")\n\t\t} else {\n\t\t\tw.Header().Set(\"Content-Type\", \"application/octet-stream\")\n\t\t\tw.Header().Set(\"Content-Disposition\", fmt.Sprintf(`attachment; filename=\"%s\"`, profile))\n\t\t}\n\t\tp.WriteTo(w, debug)\n\t}\n}\n","sourceCodeStart":11,"sourceCodeEnd":46,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/ipn/ipnlocal/c2n_pprof.go#L11-L46","documentation":"HTTP 404 from the c2n pprof handler when pprof.Lookup returns nil for the requested profile name. No registered Go pprof profile matches the name given in the URL path (valid names include heap, goroutine, profile, etc.).","triggerScenarios":"Thrown at ipn/ipnlocal/c2n_pprof.go:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request a valid pprof profile name such as heap, goroutine, or allocs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}