Summary: | net-libs/nodejs-14.2.0 on PPC64 USE=-snapshot - node: segmentation fault at initialisation(?) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marcus Comstedt <marcus> |
Component: | Current packages | Assignee: | Marek Szuba <marecki> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gyakovlev, ppc64, sam |
Priority: | Normal | Keywords: | UPSTREAM |
Version: | unspecified | ||
Hardware: | PPC64 | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=706018 https://github.com/nodejs/node/issues/29534 https://bugs.gentoo.org/show_bug.cgi?id=726836 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 742893 | ||
Attachments: |
emerge --info output
Patch to fix crash on ELFv1 |
Description
Marcus Comstedt
2020-06-13 07:06:04 UTC
Created attachment 644546 [details]
emerge --info output
Upstreams issue: https://github.com/nodejs/node/issues/29534 Created attachment 644568 [details, diff]
Patch to fix crash on ELFv1
With this patch node starts without crashing. A build with USE=+snapshot seems to work as well.
The fix is in V8 8.6 and 8.5.184++. It seems node.js hasn't pulled the fix yet... (In reply to Marcus Comstedt from comment #4) > The fix is in V8 8.6 and 8.5.184++. It seems node.js hasn't pulled the fix > yet... They're a bit slow sometimes. E.g.: bug #731654 describes a security issue in the bundled npm that has not been fixed in the master tree[0] yet. [0] https://github.com/nodejs/node/commits/master/deps/npm Comment on attachment 644568 [details, diff]
Patch to fix crash on ELFv1
Fails on 14.5.0:
* Applying nodejs-14.5.0-ABI_USES_FUNCTION_DESCRIPTORS.patch ...
patching file deps/v8/src/compiler/backend/instruction-selector.cc
patching file deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
Hunk #1 FAILED at 1033.
1 out of 1 hunk FAILED -- saving rejects to file deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc.rej
[...]
The context around #if defined(_AIX) in code-generator-ppc.c changed. You need to edit the context line int offset = 9 * kInstrSize; so that it says int offset = 20 * kInstrSize; instead. Then the patch applies again. I can confirm Marcus patch works well for nodejs-14.4.0 on ppc64 and also nodejs-14.5.0 builds well with his modifications suggested. (In reply to ernsteiswuerfel from comment #8) > I can confirm Marcus patch works well for nodejs-14.4.0 on ppc64 and also > nodejs-14.5.0 builds well with his modifications suggested. Given the change seems to have been upstreamed and is preventing stabilisation, can we apply this? FYI: It looks like the fix will be included in nodejs-15. https://github.com/nodejs/node/pull/33866#event-3888151132 (In reply to Marcus Comstedt from comment #10) > FYI: > It looks like the fix will be included in nodejs-15. > https://github.com/nodejs/node/pull/33866#event-3888151132 Maybe we can backport this? Backporting newer v8 to nodejs-14 would almost certainly be more trouble than it's worth but since they merged Marcus's patch almost verbatim, I'll just add this to nodejs-14.15.0+. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1398b77a96625ee50dd430fb4d265b7f793322be commit 1398b77a96625ee50dd430fb4d265b7f793322be Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2020-11-09 13:52:36 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2020-11-09 15:05:39 +0000 net-libs/nodejs: bump to 14.15.0 Includes subslotting, support for building against bundled ICU, a fix for PPC64 crashes and python3_9 support. Closes: https://bugs.gentoo.org/724978 Closes: https://bugs.gentoo.org/728110 Closes: https://bugs.gentoo.org/747100 Closes: https://bugs.gentoo.org/749852 Closes: https://github.com/gentoo/gentoo/pull/17809 Signed-off-by: Marek Szuba <marecki@gentoo.org> net-libs/nodejs/Manifest | 2 +- .../files/nodejs-14.15.0-fix_ppc64_crashes.patch | 33 +++++++++++ net-libs/nodejs/metadata.xml | 1 + ...nodejs-14.14.0.ebuild => nodejs-14.15.0.ebuild} | 64 ++++++++++------------ 4 files changed, 65 insertions(+), 35 deletions(-) |