FS#50614 - [nodejs] Running apm install in a directory where a package.json is fails with Node.js 6.5.0

Attached to Project: Community Packages
Opened by Brenton Horne (fusion809) - Wednesday, 31 August 2016, 11:05 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 20 September 2016, 02:18 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Nicola Squartini (tensor5)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:

I have noticed that since the update from Node.js 6.4.0 to Node.js 6.5.0 (specifically nodejs-6.5.0-1) running apm install from Atom's source top-level directory (i.e., the Atom source code directory which is where apm install is run by the Atom PKGBUILD). Specifically it freezes on (i.e., it gives this output and doesn't proceed to install individual modules, after >2 hours):

Installing modules

I have downgraded Node.js to 6.4.0 and tried to run apm install and it ran just fine, so I know that this is related to Node.js 6.5.0.

Additional info:
* package version(s): Node.js 6.5.0, apm 1.12.6.

Steps to reproduce:
* Run apm install from a directory with a package.json in it.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 20 September 2016, 02:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  nodejs 6.6.0-1
Comment by Brenton Horne (fusion809) - Wednesday, 31 August 2016, 11:06 GMT
running apm install from Atom's source top-level directory fails^
Comment by Nicola Squartini (tensor5) - Monday, 05 September 2016, 12:56 GMT
Do you get some useful information form the output of apm install --verbose?
Comment by Brenton Horne (fusion809) - Monday, 05 September 2016, 21:40 GMT
Here is a log file generated from apm install --verbose.
Comment by Leonidas Spyropoulos (inglor) - Sunday, 11 September 2016, 09:34 GMT
This is probably related to https://github.com/nodejs/node/pull/8411 which is pending release (nodejs 6.6.x)
Comment by Nicola Squartini (tensor5) - Sunday, 11 September 2016, 10:28 GMT
Leonidas, the PR you linked solve a segfault, do you see such message in dmesg when you run apm? I'm asking because I'm unable to reproduce this bug at all and I need help from those who are affected by it.
Comment by Anna Henningsen (addaleax) - Sunday, 11 September 2016, 10:32 GMT
I’d be willing to take a bet that https://github.com/nodejs/node/pull/8411 is the fix here, yes. apm uses npm under the hood, which has the following issue: https://github.com/npm/npm/issues/13782. In short, there’s a segfault handler that basically ignores the segfault itself, leaving the process in an endless loop.

(This, like https://bugs.archlinux.org/task/50676, seems to be a duplicate of https://bugs.archlinux.org/task/49936. I have no idea why the former one got marked as a duplicate of this one and not the latter.)
Comment by Leonidas Spyropoulos (inglor) - Sunday, 11 September 2016, 10:51 GMT
Nicola, the nodejs code after 6.1.0 and until the incoming 6.6.0 is trapping a segfault which shouldn't and stays there waiting. I came up to this after reading a couple of issues in github in nodejs, npm, and after I experience a hang up while building the visual-studio-code-oss from AUR. It all seems to be related to a V8 bug.

I build nodejs package (6.5.0 branch) with the proposed parch and this solved my issue in visual-studio-code-oss. If you are interested see https://dl.dropboxusercontent.com/u/7969252/nodejs-6.5.0-1.src.tar.gz It is ABS package with the proposed patch.

As for the dmesg output I see some messages such as:
[49626.352806] traps: node[30283] trap invalid opcode ip:e85fd9 sp:7ffdb59b8708 error:0 in node[400000+ed2000]

https://github.com/npm/npm/issues/13782
https://github.com/nodejs/node/issues/8310
https://codereview.chromium.org/2310513002

Comment by Nicola Squartini (tensor5) - Monday, 12 September 2016, 00:45 GMT
Thanks everybody. Let's wait for Node 6.6 and see.
Comment by Nicola Squartini (tensor5) - Friday, 16 September 2016, 02:58 GMT
The package for Node.js 6.6 is now available, please test it and let me now.
Comment by Brenton Horne (fusion809) - Friday, 16 September 2016, 03:30 GMT
It is fixed! 6.6.0 completely fixes this bug.

Loading...