google / google/pprof-nodejs

Failed to find node-v115-linux-x64-musl/pprof.node, glibc available

Aperta
#301 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
291
Fork
37
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

System info: Linux 6bb9818c4ed1 5.15.0-119-generic #129-Ubuntu SMP x86_64 GNU/Linux
Node version: v20.11.1
Yarn version: 3.8.3

Hey folks, I'm trying to run pprof for a NestJS app, I've followed the instructions and added:
```
"pprof": "^4.0.0",
"@google-cloud/profiler": "^6.0.2",
```

to dependencies. I've added basic profiling setup, but I'm getting error:
```
Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed.

Source path: /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-musl/pprof.node
Not found: /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-musl/pprof.node
Not found: /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-musl/pprof.node.js
Not found: /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-musl/pprof.node.json
Not found: /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-musl/pprof.node.node

Require stack:
- /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/out/src/heap-profiler-bindings.js
- /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/out/src/heap-profiler.js
- /home/user/projects/atom-core/.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/out/src/index.js
```

Seems like the problem is `pprof.node` binary being present in:
`.yarn/unplugged/pprof-npm-4.0.0-ee08b7ccd3/node_modules/pprof/build/node-v115-linux-x64-glibc` dir, but it's being looked at in:
`node-v115-linux-x64-musl`. I tried copying the binary - if fixes the error, but the traces coming out of it are empty.

Is there something I'm missing in the setup of pprof, or configuring per `musl` instead of `glibc`? I don't know where those values are pulled from.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da out/src/heap-profiler-bindings.js e confronta il percorso richiesto build/node-v115-linux-x64-musl/pprof.node con il binario disponibile build/node-v115-linux-x64-glibc/pprof.node. Riproduci il malfunzionamento usando Node v20.11.1, Yarn 3.8.3 e la configurazione pprof 4.0.0 indicata. Il lavoro è completato quando viene risolto il binario nativo corretto senza copiare binari e il profiling produce tracce non vuote.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, node.js
Ambito
observability-sre
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.