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.
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
SourceLineandSourceColumnare always0. 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:Dockerfile:deployment.yaml:To see the expected behaviour with right line and column values, use
node:20-bookworm-slimin theDockerfile.