{"record":{"id":"2623a803ac1c552c","repo":"vitessio/vitess","slug":"missing-value-for-path","errorCode":null,"errorMessage":"missing value for 'path'","messagePattern":"missing value for 'path'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/servenv/pprof.go","lineNumber":116,"sourceCode":"\t}\n\n\tfor _, kv := range pf[1:] {\n\t\tvar err error\n\t\tfields := strings.SplitN(kv, \"=\", 2)\n\n\t\tswitch fields[0] {\n\t\tcase \"rate\":\n\t\t\tif len(fields) == 1 {\n\t\t\t\treturn nil, errors.New(\"missing value for 'rate'\")\n\t\t\t}\n\t\t\tp.rate, err = strconv.Atoi(fields[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid profile rate %q: %v\", fields[1], err)\n\t\t\t}\n\n\t\tcase \"path\":\n\t\t\tif len(fields) == 1 {\n\t\t\t\treturn nil, errors.New(\"missing value for 'path'\")\n\t\t\t}\n\t\t\tp.path = fields[1]\n\n\t\tcase \"quiet\":\n\t\t\tif len(fields) == 1 {\n\t\t\t\tp.quiet = true\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tp.quiet, err = strconv.ParseBool(fields[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid quiet flag %q: %v\", fields[1], err)\n\t\t\t}\n\t\tcase \"waitSig\":\n\t\t\tif len(fields) == 1 {\n\t\t\t\tp.waitSig = true\n\t\t\t\tcontinue\n\t\t\t}","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/servenv/pprof.go#L98-L134","documentation":"Like the 'rate' case, the 'path' key in --pprof-profile-flag must be given as path=<value> so parseProfileFlag can set the profile output directory. A bare 'path' token (no '=') leaves no value to assign, so parsing fails immediately.","triggerScenarios":"Starting a server with --pprof-profile-flag=path (or a list segment 'path' without '=dir').","commonSituations":"Misspelled or value-dropped flags in systemd/k8s configs; copying an example like path=/tmp without the value in a heredoc that ate the '=' argument.","solutions":["Set --pprof-profile-flag=path=/desired/dir","Remove the bare 'path' token to use the default profile location","Inspect the actual argv of the failing process to verify the flag content"],"exampleFix":"// before\n--pprof-profile-flag=path,quiet\n// after\n--pprof-profile-flag=path=/tmp,quiet","handlingStrategy":"validation","validationCode":"for _, kv := range strings.Split(profileFlag, \",\") {\n    if strings.HasPrefix(kv, \"path\") && !strings.Contains(kv, \"=\") {\n        return errors.New(\"pprof flag 'path' needs a value: path=<dir>\")\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write path=<dir>, never bare path","Quote flag values in systemd/k8s configs","Diff process argv against expected flags in CI smoke tests"],"tags":["go","servenv","pprof","flags","parsing"],"backgroundTag":"invalid-flag-value","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}