davidmarkclements / 0x

🔥 single-command flamegraph profiling 🔥
MIT License
3.23k stars 106 forks source link

[Windows]: Error: EBUSY: resource busy or locked, unlink '...\isolate-000001B4104292E0-4132-4132-v8.log' #266

Closed budarin closed 1 year ago

budarin commented 2 years ago

using the cmd on Windows

0x --collect-only -P 'sh ./scripts/benchmark/autocannon.sh' ./dist/server.js;

get the error:

Waiting for subprocess to exit...Error:
EBUSY: resource busy or locked, unlink 'D:\Project\isolate-000001B4104292E0-4132-4132-v8.log'
    at Object.unlinkSync (node:fs:1780:3)
    at C:\Users\Master\AppData\Local\npm-cache\_npx\157372ca833166ed\node_modules\0x\index.js:95:12
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async zeroEks (C:\Users\Master\AppData\Local\npm-cache\_npx\157372ca833166ed\node_modules\0x\index.js:46:43)     
    at async cmd (C:\Users\Master\AppData\Local\npm-cache\_npx\157372ca833166ed\node_modules\0x\cmd.js:98:21) {
  errno: -4082,
  syscall: 'unlink',
  code: 'EBUSY',
  path: 'D:\\Project\\isolate-000001B4104292E0-4132-4132-v8.log'
}

Windows 10 Pro

jordanbtucker commented 2 years ago

This appears to be a WSL issue.

https://github.com/microsoft/WSL/issues/7972

budarin commented 2 years ago

I'm sorry, but I didn't see the connection of my case with that

budarin commented 2 years ago

It seems to me that the problem is that there is an attempt to unlink the file while the Windows subsystems are still writing data to it. Maybe you should give some time and try to unlink later or move it to the very end of the program?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.