nodejs/node · error · Exception

Could not generate pprof results

Error message

Could not generate pprof results

What it means

linux-perf-chrome.py shells out to `pprof -symbolize=local -flame ...` (largest result, then combined) and reads its stdout as an upload URL. If pprof exits non-zero (CalledProcessError) and gcert (Google cert auth) is detected, the script re-raises this exception; otherwise it prints a remediation hint with the local pprof command.

Source

Thrown at deps/v8/tools/profiling/linux-perf-chrome.py:332

  subprocess.check_call("gcertstatus >&/dev/null || gcert", shell=True)
  has_gcert = True

  cmd = [
      "pprof", "-symbolize=local", "-flame",
      f"-add_comment={shlex.join(sys.argv)}"
  ]
  print("# Processing and uploading largest pprof result")
  url = subprocess.check_output(cmd + [largest_result]).decode('utf-8').strip()
  print("# PPROF RESULT")
  print(url)

  print("# Processing and uploading combined pprof result")
  url = subprocess.check_output(cmd + abs_path_strings).decode('utf-8').strip()
  print("# PPROF RESULT")
  print(url)
except subprocess.CalledProcessError as e:
  if has_gcert:
    raise Exception("Could not generate pprof results") from e
  print("# Please run `gcert` for generating pprof results")
  print(f"pprof -symbolize=local -flame {' '.join(rel_path_strings)}")
except KeyboardInterrupt:
  exit(1)

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Inspect the underlying CalledProcessError (return code, stderr) to find the failing pprof invocation.
  2. Re-run the perf capture to regenerate clean data.
  3. Ensure symbol files and the FlameGraph tooling are available.
  4. If the upload endpoint is down, retry later or fall back to the printed local `pprof -symbolize=local -flame ...` command.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    url = subprocess.check_output(cmd + [largest_result], stderr=subprocess.PIPE).decode().strip()
except subprocess.CalledProcessError as e:
    if not has_gcert:
        print('# run gcert then: pprof -symbolize=local -flame ...')
        return
    raise RuntimeError('Could not generate pprof results') from e

Prevention

When it happens

Trigger: pprof fails on the largest-profile or combined-profile step in an environment where gcert is on PATH.

Common situations: Truncated/corrupt perf capture; missing debug symbols; FlameGraph/pprof tooling version mismatch; pprofresult upload endpoint unreachable.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/21e06e0e6e6db8e5. Report an issue: GitHub.