Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

EBUSY: resource busy or locked, unlink #18879

Closed
jmiguel-hdez opened this issue Feb 20, 2019 · 7 comments
Closed

EBUSY: resource busy or locked, unlink #18879

jmiguel-hdez opened this issue Feb 20, 2019 · 7 comments
Labels

Comments

@jmiguel-hdez
Copy link

Prerequisites

Description

EBUSY: resource busy or locked
[Description of the issue]
I am not able to install any package for some reason. It looks like a file is locked but even if i delete the temp directory i can't fix it. I tried safe mode and it doesn't work either

VM22 :14 Installing package sort-lines failed Error: Installing “sort-lines@0.18.0” failed.
at C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\static<embedded>:11:899339
at r (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\static<embedded>:11:893791)
at o (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\static<embedded>:14:1032547)
at ChildProcess.n.process.on.e (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\static<embedded>:14:1032753)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\node_modules\rimraf\rimraf.js:218
throw er
^

Error: EBUSY: resource busy or locked, unlink 'C:\Users\jherna3\AppData\Local\Temp\8\apm-install-dir-119119-19568-ng8g0e.ck9qp'
at Object.fs.unlinkSync (fs.js:1061:18)
at rimrafSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\node_modules\rimraf\rimraf.js:211:13)
at cleanupDirsSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\lib\temp.js:143:5)
at process.cleanupSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\lib\temp.js:196:19)
at emitOne (events.js:121:20)
at process.emit (events.js:211:7)

(anonymous) @ VM22 :14
m @ VM22 :11
(anonymous) @ VM22 :11
r @ VM22 :11
o @ VM22 :14
n.process.on.e @ VM22 :14
emitTwo @ events.js:126
emit @ events.js:214
ChildProcess._handle.onexit @ internal/child_process.js:198

Steps to Reproduce

  1. [First Step]
    if happen during regular use, i notice while trying to install a package today
    however, it is not limited to a single package. IT happen to me once and i was to solve by deleting and reinstalling everything. but i can't be doing this on a daily basis.

  2. [Second Step]

  3. [and so on...]

Expected behavior: [What you expect to happen]
i should be able to update or remove packages

Actual behavior: [What actually happens]
i can't install packages anymore

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

C:\Users\jherna3>atom --version

Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3

C:\Users\jherna3>atom --clear-window-state

C:\Users\jherna3>atom --clear-window-state

C:\Users\jherna3>apm links
C:\Users\jherna3.atom\dev\packages (0)
└── (no links)
C:\Users\jherna3.atom\packages (0)
└── (no links)

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@jmiguel-hdez
Copy link
Author

ok, doing this helps
rename %USERPROFILE%.atom .atom-backup

which could mean only user directory is corrupted.
it would be cool to be able to recover it and/or discover how to avoid this problem.
i will do a backup and reinstall everything in the mean time

@rsese
Copy link
Contributor

rsese commented Feb 20, 2019

ok, doing this helps
rename %USERPROFILE%.atom .atom-backup

which could mean only user directory is corrupted.

If you haven't seen the same problem since resetting to factory defaults, it does sound like there was some problem in your home directory.

So just to clarify, you can no longer reproduce now?

@jmiguel-hdez
Copy link
Author

no, it happened again
just by leaving the the editor open for a while
it seems something locks

throw er
^

Error: EBUSY: resource busy or locked, unlink 'C:\Users\jherna3\AppData\Local\Temp\8\apm-install-dir-119122-79648-1g017xw.at7i'
at Object.fs.unlinkSync (fs.js:1061:18)
at rimrafSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\node_modules\rimraf\rimraf.js:211:13)
at cleanupDirsSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\lib\temp.js:143:5)
at process.cleanupSync (C:\Users\jherna3\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\temp\lib\temp.js:196:19)
at emitOne (events.js:121:20)
at process.emit (events.js:211:7)

@jmiguel-hdez
Copy link
Author

wonder if this is related to these
isaacs/node-graceful-fs#127
isaacs/rimraf#86

@ghost
Copy link

ghost commented Feb 27, 2019

I'm having the same issue here. I wonder if it could be related to permissions relative to software installation. I'm on a company computer. However i can't delete the temp folder as i also get a "busy" error in that case. Packages appear installed afterward so maybe it's just the deletion that is blocked ? Isn't "unlink" the command to delete the remaining package installer from the temp folder ?

@PaulJaval
Copy link

I had the same issue on a company computer. You can trick a little by opening Atom as admin, install the packages, and move the packages from the .atom/packages of the admin folder to your own .atom/packages folder. When you will open up Atom in a non-admin way after that, it will install the added package: some parts of the installation might still fail though, as the process might need admin rights for some modules (for instance, if you want to install Juno that comes with parts of Julia, webIO module will probably fail on install)

@stale
Copy link

stale bot commented Oct 12, 2020

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of Atom
  2. Comment that the issue is still reproducible and include:
    • What version of Atom you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

Issues that are labeled as triaged will not be automatically marked as stale.

@stale stale bot added the stale label Oct 12, 2020
@stale stale bot closed this as completed Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants