Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Core Dump when download already found #462

Closed
tbremer opened this issue Feb 3, 2016 · 3 comments · Fixed by #473
Closed

Core Dump when download already found #462

tbremer opened this issue Feb 3, 2016 · 3 comments · Fixed by #473

Comments

@tbremer
Copy link

tbremer commented Feb 3, 2016

Install seems to be failing only when PhantomJS has already been downloaded, if I remove /tmp/phantomjs the install works fine.

I am sure this isn't all the information you need, but please let me know what else I can provide…

Error log dump below:

npm install phantomjs-prebuilt
npm WARN install Couldn't install optional dependency: Unsupported

> phantomjs-prebuilt@2.1.3 install ~/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

<--- Last few GCs --->

    5630 ms: Scavenge 198.3 (1143.9) -> 198.3 (1143.9) MB, 0.1 / 0 ms (+ 1.1 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
    5662 ms: Mark-sweep 198.3 (1313.9) -> 122.5 (1238.3) MB, 31.9 / 0 ms (+ 1.3 ms in 2 steps since start of marking, biggest step 1.1 ms) [last resort gc].
    5689 ms: Mark-sweep 122.5 (1238.3) -> 122.5 (1238.3) MB, 26.9 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x23da768e3ac1 <JS Object>
    1: SimpleSlice(aka SimpleSlice) [native array.js:~254] [pc=0x1c067040dfab] (this=0x23da76804189 <undefined>,p=0x23da768f9591 <an Uint8Array with map 0x7dc85f05339>,Q=0,R=23415665,A=23415665,S=0x23da768f9571 <JS Array[14856116]>)
    2: ArraySlice [native array.js:594] [pc=0x1c067040dd6c] (this=0x23da768f9591 <an Uint8Array with map 0x7dc85f05339>,av=0,aw=0x23da76804189 <undefined>)
    3: a...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)
<module-name>@0.1.0 ~/
├─┬ babel-register@6.4.3
│ └─┬ babel-core@6.4.5
│   └── minimatch@2.0.10
├─┬ forever@0.15.1
│ ├─┬ forever-monitor@1.6.0
│ │ ├─┬ chokidar@1.4.2
│ │ │ └─┬ readdirp@2.0.0
│ │ │   └── minimatch@2.0.10
│ │ └── minimatch@2.0.10
│ └─┬ utile@0.2.1
│   └─┬ rimraf@2.5.1
│     └─┬ glob@6.0.4
│       └── minimatch@3.0.0
└─┬ jshint@2.9.1
  └── minimatch@2.0.10

npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "phantomjs-prebuilt"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.3 install: `node install.js`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.3 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     ~/npm-debug.log
@nicks
Copy link
Contributor

nicks commented Feb 3, 2016

hmmm...the error message says "Allocation failed - process out of memory". i don't think this is related to anything this package is doing -- AFAIK we don't use a meaningful amount of memory.

This bug npm/npm#3340 seems to suggest it's an NPM problem?

Do you have any special flags or npmrc configs around memory settings? Maybe ask NPM-team?

@connesc
Copy link
Contributor

connesc commented Feb 22, 2016

I encounter this error as well.

This seems related to the MD5 computation here: install.js#L479.
On my machine, the following script forces the Node process to allocate more than 600 MB:

const md5 = require('md5');
const file = require('fs').readFileSync('/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2');
md5(file);

The md5 module looks unsuitable according to this issue: pvorb/node-md5#22.

@tbremer
Copy link
Author

tbremer commented Feb 23, 2016

Thanks for creating a PR @connesc, thanks for mergin @nick.

🍻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants