{"record":{"id":"7a473f2c51f0ac53","repo":"nodejs/node","slug":"could-not-generate-pprof-results-7a473f","errorCode":null,"errorMessage":"Could not generate pprof results","messagePattern":"Could not generate pprof results","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/profiling/linux-perf-d8.py","lineNumber":305,"sourceCode":"\n    log(\"PPROF\")\n    has_gcert = False\n    try:\n      print(\"# Checking gcert status for googlers\")\n      subprocess.check_call(\"gcertstatus >&/dev/null || gcert\", shell=True)\n      has_gcert = True\n\n      cmd = [\n          \"pprof\", \"-symbolize=local\", \"-flame\",\n          f\"-add_comment={shlex.join(sys.argv)}\",\n          str(result.absolute())\n      ]\n      print(\"# Processing and uploading to pprofresult\")\n      url = subprocess.check_output(cmd).decode('utf-8').strip()\n      print(url)\n    except subprocess.CalledProcessError as e:\n      if has_gcert:\n        raise Exception(\"Could not generate pprof results\") from e\n      print(\"# Please run `gcert` for generating pprof results\")\n      print(f\"pprof -symbolize=local -flame {result}\")\n    except KeyboardInterrupt:\n      return 1\n\n  finally:\n    for cleanup_func in reversed(cleanup):\n      cleanup_func()\n\n  return 0\n\n\nsys.exit(main())\n","sourceCodeStart":287,"sourceCodeEnd":319,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/profiling/linux-perf-d8.py#L287-L319","documentation":"linux-perf-d8.py runs `pprof -symbolize=local -flame` on the d8 perf result and reads its stdout as a pprofresult URL. If pprof exits non-zero (CalledProcessError) and gcert (Google cert auth) is detected, the script re-raises this exception; otherwise it prints the local pprof command for manual use.","triggerScenarios":"pprof fails on the d8 perf result in an environment where gcert is on PATH.","commonSituations":"Corrupt or truncated perf data; missing symbols for d8; FlameGraph/pprof tooling issues; pprofresult upload endpoint down.","solutions":["Confirm the perf data file exists and is not truncated.","Verify pprof and FlameGraph are installed and on PATH.","Reproduce locally with the printed `pprof -symbolize=local -flame <result>` to see the real error.","Re-run the capture if the perf data is corrupt."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import os\nassert result.exists() and result.stat().st_size > 0, (\n    f\"perf data {result} missing or empty\")","typeGuard":null,"tryCatchPattern":"try:\n    url = subprocess.check_output(cmd, stderr=subprocess.PIPE).decode().strip()\nexcept subprocess.CalledProcessError as e:\n    if not has_gcert:\n        print(f'# run gcert then: pprof -symbolize=local -flame {result}')\n        return 1\n    raise RuntimeError('Could not generate pprof results') from e","preventionTips":["Confirm d8 perf data is complete before invoking pprof.","Install matching pprof + FlameGraph in the environment.","In CI, surface the captured stderr instead of just the wrapped exception."],"tags":["profiling","perf","pprof","subprocess","d8","v8"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}