gitlab-14.3.0 emerge fails as yarn runs out of memory
gitlab-14.3.0
consistently fails to emerge on my machine due to yarn running out of memory. The build log has the following output:
...
`rake:assets:precompile` finished in 96.243692253 seconds
Generating the MD5 hash for 5927 Webpack-related assets...
=> MD5 generated in 0.528948151: 630031f7441aceec9c70d872fe7096da
Webpack assets MD5 for `master`: missing!
Webpack assets MD5 for `HEAD`: 630031f7441aceec9c70d872fe7096da
yarn run v1.22.10
$ NODE_OPTIONS="--max-old-space-size=3584" webpack --config config/webpack.config.js
IncrementalWebpackCompiler: Status – disabled
Warning: fragment with name PageInfo already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names
Warning: fragment with name User already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names
Warning: fragment with name Label already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names
error Command failed with signal "SIGKILL".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Unable to compile webpack production bundle.
node:events:371
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at process.target._send (node:internal/child_process:846:20)
at process.target.send (node:internal/child_process:719:19)
at callback (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:32:17)
at module.exports (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/terser-webpack-plugin/dist/worker.js:13:5)
at handle (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:55:3)
at process.emit (node:events:394:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on process instance at:
at node:internal/child_process:850:39
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
node:events:371
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at process.target._send (node:internal/child_process:846:20)
at process.target.send (node:internal/child_process:719:19)
at callback (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:32:17)
at module.exports (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/terser-webpack-plugin/dist/worker.js:13:5)
at handle (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:55:3)
at process.emit (node:events:394:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on process instance at:
at node:internal/child_process:850:39
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
* ERROR: www-apps/gitlab-14.3.0::gitlab failed (install phase):
* failed to update node dependencies and (re)compile assets
*
* Call stack:
node:events:371
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at process.target._send (node:internal/child_process:846:20)
at process.target.send (node:internal/child_process:719:19)
at callback (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:32:17)
at module.exports (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/terser-webpack-plugin/dist/worker.js:13:5)
at handle (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/var/tmp/notmpfs/portage/www-apps/gitlab-14.3.0/image/opt/gitlab/gitlab/node_modules/worker-farm/lib/child/index.js:55:3)
at process.emit (node:events:394:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on process instance at:
at node:internal/child_process:850:39
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
* ebuild.sh, line 127: Called src_install
* environment, line 4338: Called die
* The specific snippet of code:
* ${BUNDLE} exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=${RAILS_ENV} NODE_ENV=${NODE_ENV} NODE_OPTIONS="--max_old_space_size=4096" || die "failed to update node dependencies and (re)compile assets";
I'm wondering if max_old_space_size
is too small?
dmesg
has the following:
[598053.132680] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,task=node,pid=27772,uid=0
[598053.132700] Out of memory: Killed process 27772 (node) total-vm:4042592kB, anon-rss:3117788kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:68992kB oom_score_adj:0
[598053.251400] oom_reaper: reaped process 27772 (node), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB