Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"EFAULT: bad address in system call argument, copyfile #7152

Open
matt212 opened this issue Mar 27, 2019 · 12 comments
Open

"EFAULT: bad address in system call argument, copyfile #7152

matt212 opened this issue Mar 27, 2019 · 12 comments

Comments

@matt212
Copy link

matt212 commented Mar 27, 2019

HI,

i am only installing "express": "^4.16.4", but still i am getting below error
i tried running command yarn cache clean
but error still persists

yarn-error.log

Arguments: 
  /usr/bin/node /usr/share/yarn/bin/yarn.js

PATH: 
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Yarn version: 
  1.13.0

Node version: 
  10.14.0

Platform: 
  linux x64

Trace: 
  Error: EFAULT: bad address in system call argument, copyfile '/home/matt212/.cache/yarn/v4/npm-array-flatten-1.1.1-9a5f699051b1e7073328f2a008968b64ea2955d2/node_modules/array-flatten/package.json' -> '/media/rizwan/New Volume/projects/nodejs_postgres_jquery/node_modules/array-flatten/package.json'




@karlmosenbacher
Copy link

karlmosenbacher commented Apr 25, 2019

Having the same issue. Have you found a solution for this?

Yarn version: 1.15.2
Node: 10.10.0
Linux x64

@TwanoO67
Copy link

TwanoO67 commented Apr 29, 2019

Same here on a CI environment:

yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > cypress-vue-unit-test@1.11.0" has unmet peer dependency "cypress@^2.0.0".
warning " > raw-loader@2.0.0" has unmet peer dependency "webpack@^4.3.0".
warning "@vue/cli-plugin-unit-mocha > mocha-webpack@2.0.0-beta.0" has unmet peer dependency "webpack@^4.0.0".
warning " > sass-loader@7.1.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
error An unexpected error occurred: "EFAULT: bad address in system call argument, copyfile '/usr/local/share/.cache/yarn/v4/npm-@babel-helpers-7.4.2-3bdfa46a552ca77ef5a0f8551be5f0845ae989be/node_modules/@babel/helpers/LICENSE' -> '/var/www/html/front/node_modules/@babel/helpers/LICENSE'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/html/front/yarn-error.log".

@zackad
Copy link

zackad commented May 7, 2019

My temporary solution is just to downgrade node to version 8 (8.16.0).
It's works fine on MacOS with node version 10, only on Linux machine I have this problem.

@khalwat
Copy link

khalwat commented May 13, 2019

I'm experiencing this as well, on Node v11.10.1 & Node v12.2.0 with yarn 1.12.3 inside of a Homestead (Linux Ubuntu 16.04)

error An unexpected error occurred: "EFAULT: bad address in system call argument, copyfile '/home/vagrant/.cache/yarn/v4/npm-@babel-code-frame-7.0.0-06e2ab19bdb535385559aabb5ba59729482800f8/node_modules/@babel/code-frame/LICENSE' -> '/home/vagrant/sites/devmode/node_modules/@babel/code-frame/LICENSE'".

I can manually copy this file just fine... which is odd.

@bassemhermina
Copy link

I had the same problem, solved it by clearing any 'space character' " " from the paths , and you have a space character in the target path "New volume", then clean yarn cache again, and it should work

@ajaxjsonjr
Copy link

ajaxjsonjr commented Jun 20, 2019

I also ran into the same problem. I did not have 'space characters' (" ") in a path. But my project was located in other hard drive volume.
Yarn version: 1.16.0
Node: 10.9.0
Linux Mint 18.1

My temporary solution was moving project repository from "/media/user/hardDriveVolume" to /home directory. Now it works well. So in my case this issue happens with a repository located in other hard drive volume (in linux "/media" directory). Also maybe in my case this issue is connected with npm/cmd-shim#21.
At the same time "npm" worked well with other hard drive volume project path.

@matt212 , can I kindly ask you: Did you fix this issue and does yarn work with "/media" directory path in your case? Thank you in advance!

@brendonrapp
Copy link

brendonrapp commented Jul 16, 2019

Experiencing this in a Virtualbox/Vagrant environment. Ubuntu 16.04 x64, yarn 1.17.3.

Node 10, 11, and 12 all attempted. No spaces in any of the paths, so that "fix" is not an option.

If I manually copy the file it's struggling with, it just errors on the next one. Fix all the files from one package, and it will error on some other package.

It seems to almost exclusively be non-source code text files, eg. LICENSE, CHANGELOG.md, README.md, etc. I noticed someone else's error further up was for a LICENSE file, too.

@oamaok
Copy link

oamaok commented Aug 20, 2019

A quick and dirty hack I've used to get this working: first, locate the cli.js of your copy of yarn. For me, running Ubuntu, the location is /usr/local/lib/node_modules/yarn/lib/cli.js. Then, search for the following line:

    var ficloneFlag = (_fs2 || _load_fs2()).constants.COPYFILE_FICLONE || 0;

and change it to

    var ficloneFlag = 0;

I managed to trace this to the exact line of V8 which fails, wrote a small C program which exhibits the same behavior, and the issue is indeed copying files between different hard drives or partitions. This should be handled properly by V8, so the bug is actually on their side.

Also be aware that this hack only works until you decide to update yarn.

@st-bender
Copy link

Hi,
This change was introduced in #5456 and updated in #6432, see also #7440, and I ran into that through jupyterlab/jupyterlab#6969.
Setting ficloneFlag back to zero fixed it for me.
Cheers.

@st-bender
Copy link

st-bender commented Oct 16, 2019

Hi,
It's been a while, I think the problem was in libuv and should be fixed with the latest release (v1.33.0) of libuv.
At least for me, could you check? It probably takes some time to propagate to the packagers, though.
Cheers.

@brendonrapp
Copy link

Any movement on this?

@st-bender
Copy link

Any movement on this?

Hi, as I wrote above, the issue for me was fixed by the libuv update. But I don't know if that's the case for the OP here.

Cheers.

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

No branches or pull requests

10 participants