sentry-javascript
sentry-javascript copied to clipboard
Unable to install profiling-node on alpine
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.2.1
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
- Try to install @sentry/profiling-node on a machine running alpine (musl), that same result for x86 and arm64
docker run --rm -it -w /app node:20-alpine sh -c 'npm init -y && npm install @sentry/profiling-node
Expected Result
The package installs
Actual Result
There is a segfault.
docker run --rm -it -w /app node:20-alpine sh -c 'npm init -y && npm install @sentry/profiling-node || cat /root/.npm/_logs/*.log'
Wrote to /app/package.json:
{
"name": "app",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
npm ERR! path /app/node_modules/@sentry/profiling-node
npm ERR! command failed
npm ERR! signal SIGSEGV
npm ERR! command sh -c node scripts/check-build.js
npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load /app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-musl-115.node
npm ERR! @sentry/profiling-node: Precompiled binary found, skipping build from source.
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-22T14_58_21_466Z-debug-0.log
npm debug log
0 verbose cli /usr/local/bin/node /usr/local/bin/npm 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/.npmrc Completed in 0ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:/root/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms 14 timing config:load:global Completed in 1ms 15 timing config:load:setEnvs Completed in 0ms 16 timing config:load Completed in 7ms 17 timing npm:load:configload Completed in 9ms 18 timing config:load:flatten Completed in 2ms 19 timing npm:load:mkdirpcache Completed in 1ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm 22 verbose argv "--version" 23 timing npm:load:setTitle Completed in 0ms 24 timing npm:load:display Completed in 1ms 25 verbose logfile logs-max:10 dir:/root/.npm/_logs/2024-05-09T20_28_39_914Z- 26 verbose logfile /root/.npm/_logs/2024-05-09T20_28_39_914Z-debug-0.log 27 timing npm:load:logFile Completed in 2ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 28ms 31 verbose exit 0 32 timing npm Completed in 36ms 33 info ok 0 verbose cli /usr/local/bin/node /usr/local/bin/npm 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/app/.npmrc Completed in 0ms 10 timing config:load:project Completed in 1ms 11 timing config:load:file:/root/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 0ms 16 timing config:load Completed in 5ms 17 timing npm:load:configload Completed in 5ms 18 timing config:load:flatten Completed in 2ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm init 22 verbose argv "init" "--yes" 23 timing npm:load:setTitle Completed in 1ms 24 timing npm:load:display Completed in 0ms 25 verbose logfile logs-max:10 dir:/root/.npm/_logs/2024-05-22T14_58_21_200Z- 26 verbose logfile /root/.npm/_logs/2024-05-22T14_58_21_200Z-debug-0.log 27 timing npm:load:logFile Completed in 1ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 16ms 31 silly logfile done cleaning log files 32 silly package data { 32 silly package data name: 'app', 32 silly package data version: '1.0.0', 32 silly package data main: 'index.js', 32 silly package data scripts: { test: 'echo "Error: no test specified" && exit 1' }, 32 silly package data keywords: [], 32 silly package data author: '', 32 silly package data license: 'ISC', 32 silly package data description: '' 32 silly package data } 33 timing command:init Completed in 40ms 34 verbose exit 0 35 timing npm Completed in 215ms 36 info ok 0 verbose cli /usr/local/bin/node /usr/local/bin/npm 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms 6 timing config:load:builtin Completed in 0ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/app/.npmrc Completed in 0ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:/root/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 1ms 16 timing config:load Completed in 5ms 17 timing npm:load:configload Completed in 5ms 18 timing config:load:flatten Completed in 2ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm install @sentry/profiling-node 22 verbose argv "install" "@sentry/profiling-node" 23 timing npm:load:setTitle Completed in 0ms 24 timing npm:load:display Completed in 1ms 25 verbose logfile logs-max:10 dir:/root/.npm/_logs/2024-05-22T14_58_21_466Z- 26 verbose logfile /root/.npm/_logs/2024-05-22T14_58_21_466Z-debug-0.log 27 timing npm:load:logFile Completed in 1ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 16ms 31 timing arborist:ctor Completed in 1ms 32 silly logfile done cleaning log files 33 timing arborist:ctor Completed in 1ms 34 timing idealTree:init Completed in 5ms 35 timing idealTree:userRequests Completed in 2ms 36 silly idealTree buildDeps 37 silly fetch manifest @sentry/profiling-node@* 38 http fetch GET 200 https://registry.npmjs.org/@sentry%2fprofiling-node 250ms (cache miss) 39 silly placeDep ROOT @sentry/[email protected] OK for: [email protected] want: * 40 silly fetch manifest @sentry/[email protected] 41 silly fetch manifest @sentry/[email protected] 42 silly fetch manifest @sentry/[email protected] 43 silly fetch manifest @sentry/[email protected] 44 silly fetch manifest detect-libc@^2.0.2 45 silly fetch manifest node-abi@^3.61.0 46 http fetch GET 200 https://registry.npmjs.org/@sentry%2fcore 134ms (cache miss) 47 http fetch GET 200 https://registry.npmjs.org/detect-libc 146ms (cache miss) 48 http fetch GET 200 https://registry.npmjs.org/node-abi 189ms (cache miss) 49 http fetch GET 200 https://registry.npmjs.org/@sentry%2futils 272ms (cache miss) 50 http fetch GET 200 https://registry.npmjs.org/@sentry%2fnode 278ms (cache miss) 51 http fetch GET 200 https://registry.npmjs.org/@sentry%2ftypes 299ms (cache miss) 52 timing idealTree:#root Completed in 563ms 53 silly placeDep ROOT @sentry/[email protected] OK for: @sentry/[email protected] want: 8.2.1 54 silly placeDep ROOT @sentry/[email protected] OK for: @sentry/[email protected] want: 8.2.1 55 silly placeDep ROOT @sentry/[email protected] OK for: @sentry/[email protected] want: 8.2.1 56 silly placeDep ROOT @sentry/[email protected] OK for: @sentry/[email protected] want: 8.2.1 57 silly placeDep ROOT [email protected] OK for: @sentry/[email protected] want: ^2.0.2 58 silly placeDep ROOT [email protected] OK for: @sentry/[email protected] want: ^3.61.0 59 silly fetch manifest @opentelemetry/api@^1.8.0 60 silly fetch manifest @opentelemetry/context-async-hooks@^1.23.0 61 silly fetch manifest @opentelemetry/core@^1.24.1 62 silly fetch manifest @opentelemetry/instrumentation@^0.51.1 63 silly fetch manifest @opentelemetry/[email protected] 64 silly fetch manifest @opentelemetry/[email protected] 65 silly fetch manifest @opentelemetry/[email protected] 66 silly fetch manifest @opentelemetry/[email protected] 67 silly fetch manifest @opentelemetry/[email protected] 68 silly fetch manifest @opentelemetry/[email protected] 69 silly fetch manifest @opentelemetry/[email protected] 70 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-express 94ms (cache miss) 71 silly fetch manifest @opentelemetry/[email protected] 72 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2fapi 109ms (cache miss) 73 silly fetch manifest @opentelemetry/[email protected] 74 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation 119ms (cache miss) 75 silly fetch manifest @opentelemetry/[email protected] 76 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2fcontext-async-hooks 133ms (cache miss) 77 silly fetch manifest @opentelemetry/[email protected] 78 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-connect 137ms (cache miss) 79 silly fetch manifest @opentelemetry/[email protected] 80 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2fcore 141ms (cache miss) 81 silly fetch manifest @opentelemetry/[email protected] 82 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-hapi 165ms (cache miss) 83 silly fetch manifest @opentelemetry/[email protected] 84 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-fastify 186ms (cache miss) 85 silly fetch manifest @opentelemetry/resources@^1.23.0 86 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-koa 95ms (cache miss) 87 silly fetch manifest @opentelemetry/sdk-trace-base@^1.23.0 88 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-graphql 196ms (cache miss) 89 silly fetch manifest @opentelemetry/semantic-conventions@^1.23.0 90 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-mongodb 104ms (cache miss) 91 silly fetch manifest @prisma/[email protected] 92 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-ioredis 224ms (cache miss) 93 silly fetch manifest @sentry/[email protected] 94 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-mongoose 113ms (cache miss) 95 silly fetch manifest [email protected] 96 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-mysql2 97ms (cache miss) 97 silly fetch manifest semver@^7.3.5 98 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-nestjs-core 109ms (cache miss) 99 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-http 252ms (cache miss) 100 http fetch GET 200 https://registry.npmjs.org/@opentelemetry%2finstrumentation-mysql 127ms (cache miss) ... ... Dropped for maximum comment character limits ... ... 600 http fetch GET 200 https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz 247ms (cache miss) 601 timing reifyNode:node_modules/@types/http-errors Completed in 279ms 602 http fetch GET 200 https://registry.npmjs.org/@types/mysql/-/mysql-2.15.22.tgz 246ms (cache miss) 603 timing reifyNode:node_modules/@types/mysql Completed in 278ms 604 http fetch GET 200 https://registry.npmjs.org/@types/koa/-/koa-2.14.0.tgz 259ms (cache miss) 605 timing reifyNode:node_modules/@types/koa Completed in 291ms 606 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.40.1.tgz 266ms (cache miss) 607 timing reifyNode:node_modules/@opentelemetry/sql-common Completed in 299ms 608 http fetch GET 200 https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz 285ms (cache miss) 609 timing reifyNode:node_modules/@types/connect Completed in 319ms 610 http fetch GET 200 https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.3.0.tgz 284ms (cache miss) 611 timing reifyNode:node_modules/require-in-the-middle Completed in 319ms 612 http fetch GET 200 https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz 286ms (cache miss) 613 timing reifyNode:node_modules/shimmer Completed in 320ms 614 http fetch GET 200 https://registry.npmjs.org/semver/-/semver-7.6.2.tgz 288ms (cache miss) 615 timing reifyNode:node_modules/semver Completed in 324ms 616 http fetch GET 200 https://registry.npmjs.org/@types/koa__router/-/koa__router-12.0.3.tgz 301ms (cache miss) 617 timing reifyNode:node_modules/@types/koa__router Completed in 333ms 618 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.2.tgz 300ms (cache miss) 619 http fetch GET 200 https://registry.npmjs.org/@types/shimmer/-/shimmer-1.0.5.tgz 297ms (cache miss) 620 timing reifyNode:node_modules/@types/shimmer Completed in 333ms 621 timing reifyNode:node_modules/@opentelemetry/redis-common Completed in 333ms 622 http fetch GET 200 https://registry.npmjs.org/opentelemetry-instrumentation-fetch-node/-/opentelemetry-instrumentation-fetch-node-1.2.0.tgz 304ms (cache miss) 623 timing reifyNode:node_modules/opentelemetry-instrumentation-fetch-node Completed in 342ms 624 http fetch GET 200 https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz 310ms (cache miss) 625 timing reifyNode:node_modules/import-in-the-middle Completed in 345ms 626 http fetch GET 200 https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz 319ms (cache miss) 627 timing reifyNode:node_modules/@types/node Completed in 350ms 628 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.37.1.tgz 347ms (cache miss) 629 http fetch GET 200 https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-5.13.0.tgz 348ms (cache miss) 630 timing reifyNode:node_modules/@prisma/instrumentation Completed in 390ms 631 timing reifyNode:node_modules/@opentelemetry/instrumentation-nestjs-core Completed in 394ms 632 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.41.0.tgz 358ms (cache miss) 633 timing reifyNode:node_modules/@opentelemetry/instrumentation-pg Completed in 398ms 634 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.38.1.tgz 362ms (cache miss) 635 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.38.1.tgz 362ms (cache miss) 636 timing reifyNode:node_modules/@opentelemetry/instrumentation-mysql2 Completed in 402ms 637 timing reifyNode:node_modules/@opentelemetry/instrumentation-mongoose Completed in 404ms 638 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.40.0.tgz 382ms (cache miss) 639 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.40.0.tgz 395ms (cache miss) 640 timing reifyNode:node_modules/@opentelemetry/instrumentation-ioredis Completed in 440ms 641 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.38.1.tgz 402ms (cache miss) 642 timing reifyNode:node_modules/@opentelemetry/instrumentation-mysql Completed in 443ms 643 timing reifyNode:node_modules/@opentelemetry/instrumentation-koa Completed in 445ms 644 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.43.0.tgz 406ms (cache miss) 645 timing reifyNode:node_modules/@opentelemetry/instrumentation-mongodb Completed in 446ms 646 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.51.1.tgz 412ms (cache miss) 647 timing reifyNode:node_modules/@opentelemetry/instrumentation-http Completed in 453ms 648 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz 434ms (cache miss) 649 timing reifyNode:node_modules/@opentelemetry/api-logs Completed in 472ms 650 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.36.0.tgz 434ms (cache miss) 651 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.38.0.tgz 438ms (cache miss) 652 timing reifyNode:node_modules/@opentelemetry/instrumentation-hapi Completed in 483ms 653 timing reifyNode:node_modules/@opentelemetry/instrumentation-connect Completed in 483ms 654 http fetch GET 200 https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz 445ms (cache miss) 655 timing reifyNode:node_modules/detect-libc Completed in 488ms 656 http fetch GET 200 https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz 450ms (cache miss) 657 timing reifyNode:node_modules/node-abi Completed in 494ms 658 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.36.1.tgz 465ms (cache miss) 659 timing reifyNode:node_modules/@opentelemetry/instrumentation-fastify Completed in 508ms 660 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.1.tgz 475ms (cache miss) 661 timing reifyNode:node_modules/@opentelemetry/context-async-hooks Completed in 518ms 662 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.38.0.tgz 478ms (cache miss) 663 http fetch GET 200 https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.2.1.tgz 484ms (cache miss) 664 timing reifyNode:node_modules/@opentelemetry/instrumentation-express Completed in 521ms 665 timing reifyNode:node_modules/@sentry/opentelemetry Completed in 523ms 666 http fetch GET 200 https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.2.tgz 486ms (cache miss) 667 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.40.0.tgz 494ms (cache miss) 668 timing reifyNode:node_modules/@opentelemetry/instrumentation-graphql Completed in 538ms 669 timing reifyNode:node_modules/opentelemetry-instrumentation-fetch-node/node_modules/import-in-the-middle Completed in 587ms 670 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz 608ms (cache miss) 671 timing reifyNode:node_modules/@opentelemetry/semantic-conventions Completed in 653ms 672 http fetch GET 200 https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz 605ms (cache miss) 673 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/import-in-the-middle Completed in 656ms 674 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz 688ms (cache miss) 675 timing reifyNode:node_modules/@opentelemetry/instrumentation Completed in 733ms 676 http fetch GET 200 https://registry.npmjs.org/@sentry/types/-/types-8.2.1.tgz 741ms (cache miss) 677 timing reifyNode:node_modules/@sentry/types Completed in 791ms 678 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz 775ms (cache miss) 679 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/semantic-conventions Completed in 827ms 680 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.43.0.tgz 792ms (cache miss) 681 timing reifyNode:node_modules/opentelemetry-instrumentation-fetch-node/node_modules/@opentelemetry/instrumentation Completed in 844ms 682 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz 813ms (cache miss) 683 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.50.0.tgz 804ms (cache miss) 684 timing reifyNode:node_modules/@opentelemetry/resources Completed in 854ms 685 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation Completed in 855ms 686 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.50.0.tgz 808ms (cache miss) 687 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/api-logs Completed in 859ms 688 http fetch GET 200 https://registry.npmjs.org/@sentry/profiling-node/-/profiling-node-8.2.1.tgz 830ms (cache miss) 689 timing reifyNode:node_modules/@sentry/profiling-node Completed in 877ms 690 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz 866ms (cache miss) 691 timing reifyNode:node_modules/@opentelemetry/sdk-trace-base Completed in 910ms 692 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.1.tgz 891ms (cache miss) 693 timing reifyNode:node_modules/@opentelemetry/sdk-metrics Completed in 928ms 694 http fetch GET 200 https://registry.npmjs.org/@sentry/utils/-/utils-8.2.1.tgz 932ms (cache miss) 695 timing reifyNode:node_modules/@sentry/utils Completed in 977ms 696 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.23.0.tgz 931ms (cache miss) 697 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/sdk-trace-base Completed in 980ms 698 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.23.0.tgz 934ms (cache miss) 699 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/resources Completed in 984ms 700 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz 994ms (cache miss) 701 timing reifyNode:node_modules/@opentelemetry/core Completed in 1038ms 702 http fetch GET 200 https://registry.npmjs.org/@sentry/node/-/node-8.2.1.tgz 1007ms (cache miss) 703 timing reifyNode:node_modules/@sentry/node Completed in 1053ms 704 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/core/-/core-1.23.0.tgz 1015ms (cache miss) 705 timing reifyNode:node_modules/@prisma/instrumentation/node_modules/@opentelemetry/core Completed in 1064ms 706 http fetch GET 200 https://registry.npmjs.org/@sentry/core/-/core-8.2.1.tgz 1021ms (cache miss) 707 timing reifyNode:node_modules/@sentry/core Completed in 1066ms 708 http fetch GET 200 https://registry.npmjs.org/@opentelemetry/api/-/api-1.8.0.tgz 1042ms (cache miss) 709 timing reifyNode:node_modules/@opentelemetry/api Completed in 1085ms 710 timing reify:unpack Completed in 1088ms 711 timing reify:unretire Completed in 0ms 712 timing build:queue Completed in 2ms 713 timing build:link:node_modules/@sentry/profiling-node Completed in 2ms 714 timing build:link:node_modules/resolve Completed in 1ms 715 timing build:link:node_modules/semver Completed in 1ms 716 timing build:link:node_modules/acorn Completed in 1ms 717 timing build:link Completed in 2ms 718 info run @sentry/[email protected] install node_modules/@sentry/profiling-node node scripts/check-build.js 719 info run @sentry/[email protected] install { code: null, signal: 'SIGSEGV' } 720 timing reify:rollback:createSparse Completed in 108ms 721 timing reify:rollback:retireShallow Completed in 0ms 722 timing command:install Completed in 3990ms 723 verbose stack Error: command failed 723 verbose stack at ChildProcess.(/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27) 723 verbose stack at ChildProcess.emit (node:events:519:28) 723 verbose stack at maybeClose (node:internal/child_process:1105:16) 723 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:305:5) 724 verbose pkgid @sentry/[email protected] 725 verbose cwd /app 726 verbose Linux 6.6.22-linuxkit 727 verbose node v20.13.1 728 verbose npm v10.5.2 729 error path /app/node_modules/@sentry/profiling-node 730 error command failed 731 error signal SIGSEGV 732 error command sh -c node scripts/check-build.js 733 error @sentry/profiling-node: Precompiled binary found, attempting to load /app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-musl-115.node 733 error @sentry/profiling-node: Precompiled binary found, skipping build from source. 734 verbose exit 1 735 timing npm Completed in 4114ms 736 verbose unfinished npm timer reify 1716389901591 737 verbose unfinished npm timer reify:build 1716389905424 738 verbose unfinished npm timer build 1716389905425 739 verbose unfinished npm timer build:deps 1716389905425 740 verbose unfinished npm timer build:run:install 1716389905429 741 verbose unfinished npm timer build:run:install:node_modules/@sentry/profiling-node 1716389905429 742 verbose code 1 743 error A complete log of this run can be found in: /root/.npm/_logs/2024-05-22T14_58_21_466Z-debug-0.log
@JonasBa could you help take a look? Thanks!
@satdeveloping I'm going to take a look at this, but I'm at a conference all day tomorrow so I will only be able to check this on Friday. Meanwhile, would you mind testing if other nodejs versions work or if this is isolated to the node20 runtime?
Ideally, it would be great if you can share a dockerfile that we can use to reproduce the crash so that I can try to reproduce the issue and attempt to extract more information from the crash
I have the same problem but with node:22.2.0-alpine:
$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
(node:91) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[3/4] Linking dependencies...
warning " > @ovea-dev/[email protected]" has unmet peer dependency "@graphql-eslint/[email protected]".
warning " > @ovea-dev/[email protected]" has unmet peer dependency "@vue/[email protected]".
warning " > @ovea-dev/[email protected]" has unmet peer dependency "[email protected]".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /builds/ovea-dev/si-espace-client/ap/ru/ip/node_modules/@sentry/profiling-node: Command failed.
Exit signal: SIGSEGV
Command: node scripts/check-build.js
Arguments:
Directory: /builds/ovea-dev/si-espace-client/ap/ru/ip/node_modules/@sentry/profiling-node
Output:
@sentry/profiling-node: Precompiled binary found, attempting to load /builds/ovea-dev/si-espace-client/ap/ru/ip/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-x64-musl-127.node
@sentry/profiling-node: Precompiled binary found, skipping build from source.
But it works just fine with node:21.7.3-alpine.
Ideally, it would be great if you can share a dockerfile that we can use to reproduce the crash so that I can try to reproduce the issue and attempt to extract more information from the crash
I mean, from the docker command I gave, a Dockerfile would look like
FROM node:20-alpine
WORKDIR /app
RUN npm init -y
RUN npm install @sentry/profiling-node
[+] Building 13.8s (8/8) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 128B 0.0s
=> [internal] load metadata for docker.io/library/node:20-alpine 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/4] FROM docker.io/library/node:20-alpine@sha256:291e84d956f1aff38454bbd3da38941461ad569a185c20aa289f71f37ea08e23 0.9s
=> => resolve docker.io/library/node:20-alpine@sha256:291e84d956f1aff38454bbd3da38941461ad569a185c20aa289f71f37ea08e23 0.9s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [2/4] WORKDIR /app 0.0s
=> [3/4] RUN npm init -y 0.8s
=> ERROR [4/4] RUN npm install @sentry/profiling-node 11.9s
------
> [4/4] RUN npm install @sentry/profiling-node:
11.80 npm ERR! path /app/node_modules/@sentry/profiling-node
11.81 npm ERR! command failed
11.81 npm ERR! signal SIGSEGV
11.81 npm ERR! command sh -c node scripts/check-build.js
11.81 npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load /app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-musl-115.node
11.81 npm ERR! @sentry/profiling-node: Precompiled binary found, skipping build from source.
11.81
11.81 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-24T18_46_01_725Z-debug-0.log
------
Dockerfile:7
--------------------
5 | RUN npm init -y
6 |
7 | >>> RUN npm install @sentry/profiling-node
8 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install @sentry/profiling-node" did not complete successfully: exit code: 1
I tested node:(18|20|22)-alpine and the issue was only present on node:20-alpine
We've temporarily downgraded to 7.110.1 which is the most recent 7.X version that works for us with node:20-alpine. Unfortunately we also receive the same error as listed above.
I'm going to investigate this today, sorry everyone. For now, it would help if anyone experiencing this could post the exact image they are using as well as a reproducible dockerfile.
@satdeveloping Just wanted to confirm if in your case, this also happens sporadically. I am attempting to reproduce this and it seems that it sometimes succeeds.
I will try and extract a coredump and see what is going on here.
I've attempted downgrading alpine to 3.18 and can no longer reproduce the crash (on any of the node versions)
@satdeveloping @maxkramer @mat813 Unless you require 3.18+, you should be able to downgrade to 3.18 and mitigate this temporarily while I figure out the root cause of the issue.
I just tried with node:22.2.0-alpine3.18 (and, to be complete, 3.19 and 3.20) and it SIGSEGV the same as the node:22.2.0-alpine image. Well, to be fair, it SIGSEGV most of the time, about once every 20-50 times, yarn install works.
I hit this problem trying to updating to sentry 8, then I saw the recent commit so I went ahead and installed profiling-node from github and it fixed my issue.
We'll get a release out within the next 1-2 days - thanks for your patience everyone (shoutout @JonasBa for the fix!)
It's still somewhat of a tentative fix though, I will need to extract a coredump to see exactly where things go wrong. I tried attaching the segfault handler, but the package doesnt support alpine, so I need to invest more time into it.
We released this as part of https://github.com/getsentry/sentry-javascript/releases/tag/8.8.0, would appreciate it if you can upgrade and give it a try 🙏
Using node:22.2.0-alpine, and after updating to 8.8.0, I still get :
[4/4] Building fresh packages...
error /builds/ovea-dev/si-espace-client/ap/ru/icinga/node_modules/@sentry/profiling-node: Command failed.
Exit signal: SIGSEGV
Command: node scripts/check-build.js
Arguments:
Directory: /builds/ovea-dev/si-espace-client/ap/ru/icinga/node_modules/@sentry/profiling-node
Output:
@sentry/profiling-node: Precompiled binary found, attempting to load /builds/ovea-dev/si-espace-client/ap/ru/icinga/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-x64-musl-127.node
@sentry/profiling-node: Precompiled binary found, skipping build from source.
Thanks for the quick turnaround.
I tested again today for node:20-alpine3.(18|19|20) and the install fails with alpine 3.19 and 3.20. I can confirm it works as expected on 3.18.
The failure message is still the same.
@JonasBa to answer your earlier question, with node:20-alpine and node:20-alpine3.(19|20) it fails 100% of the time.
Yeah, I am unsure what changed here. I am going to trying to extract a coredump, but I suspect something in 3.19 and above changed and it's causing the prebuild binaries from 3.17 to segfault.
We are in a bit of an uncomfortable position if that is the case, as it means that building binaries on 3.19 and above will break the runtimes of people running on <3.18.
@satdeveloping there is one way to avoid this and it would mean that you would need to install the tooling and build the bindings yourself.
A dockerfile for something like that would then look like
# Install the toolchain
RUN apk add --no-cache build-base git g++ make curl python3
# Install the packages and ignore scripts, which does not check if the binary had been compiled
RUN npm i --ignore-scripts
# Build the binary from source
RUN (cd node_modules/@sentry/profiling-node && npm run build:bindings:configure && npm run build:bindings)
This would then build the binaries for the alpine version you are using and should fix the issue (unless it originates from some other change)
Node 22.3 was released, and with node:22.3.0-alpine, the crash no longer occurs. Looking at the changelog, I am unsure about which part was fixed... :(
Can confirm was getting the same issue when using docker (on my m1 mac) with image node:20-alpine, using node:22.3.0-alpine3.19 fixes the issue.
Ok, that is very weird. I'm going to go over the nodejs changelog to try and see if what might have caused this.
Just adding I've run into this (on my M2 mac) with v8.9.2 on node20.14.0-alpine. Temporarily swapping to node22.3.0-alpine for a short-term workaround.
I would recommend you to upgrade to LTS or downgrade alpine. It seems that whatever the issue was, it has gotten fixed upstream somewhere in nodejs. cc @anonrig if you know of any recent fixes in nodejs that might have caused this?
I would recommend you to upgrade to LTS or downgrade alpine. It seems that whatever the issue was, it has gotten fixed upstream somewhere in nodejs. cc @anonrig if you know of any recent fixes in nodejs that might have caused this?
I'm confused - isn't Node 20 LTS? And Node removed alpine 3.18 from its published tags. So neither of these seem actionable unless I've misunderstood.
Sorry, I misspoke. I meant either upgrade to 22 or try downgrading alpine. I'm tempted to upgrade alpine from 3.17 for our build images, but I'm hesitating because it will likely break existing apps unless we make it a major bump (which is something I would not want to do right now)
Any progress here? Having the same issue
Hey @clemente-xyz, from our point of view no updates so far. Gonna tag @JonasBa (who's off today) to confirm.
It seems the problem is only with Node 20 and Alpine 3.19/3.20. Node 20 with Alpine 3.18 works as well as Node 22.
Hey everyone, first of all, I'm sorry about the wait, I haven't given this proper care and figure out the root cause. I'm going to see if I can figure out what exactly is going on here. In the meantime, if anyone managed to extract a coredump and share it, I would be very happy.
As a possible workaround, if some changes in alpine are indeed the issue, you should be able to temporarily build from source
apk add build-base git g++ make curl python3
npm install --ignore-scripts
(cd node_modules/@sentry/profiling-node && npm run build:bindings:configure && npm run build:bindings)
I'm going to try and extract a coredump to see whats going on
This is happening in node:22.8-alpine conditionally.
I've created a reproducible repository with error occuring github actions over here.
In case this could be helpful I've also added valgrind log too.
This is a coredump from arm64 node:22.8-alpine docker image v8-compile-cache-0.zip.
Thank you @asomethings, that helps a lot.
There seems to be something suspicious here, or maybe I'm going crazy but if I rebuild the package on alpine3.19 or alpine3.20 without changing the source, the error no longer appears and everything works as expected.