Skip to content

V8 user-code frames report line=0, column=0 on Node 22+ #3180

@manojVivek

Description

@manojVivek

When profiling a Node.js process with the V8 interpreter unwinder, frames originating from user code carry the correct function name and source file, but SourceLine and SourceColumn are always 0. Even though the function name and source file are valid, line and column being zero breaks sourcemapping logic for these frames on the server side.

It works fine on Node-v20 but is broken in both v22 and v24.

Minimal repro:

app.mjs:

function fib(n) {
  return n < 2 ? n : fib(n - 1) + fib(n - 2);
}

function cpuBurn() {
  fib(34);
  setImmediate(cpuBurn);
}

cpuBurn();
setInterval(() => {}, 1000); // keep event loop alive

Dockerfile:

FROM node:24-bookworm-slim
WORKDIR /app
COPY app.mjs .
CMD ["node", "app.mjs"]

deployment.yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: v8-line-col-repro
spec:
  selector:
    matchLabels:
      app: v8-line-col-repro
  template:
    metadata:
      labels:
        app: v8-line-col-repro
    spec:
      containers:
        - name: app
          image: v8-line-col-repro:dev

To see the expected behaviour with right line and column values, use node:20-bookworm-slim in the Dockerfile.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions