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

Running NPM causes non-deterministic BSOD #4537

Closed
abdusamadtv opened this issue Sep 23, 2019 · 21 comments
Closed

Running NPM causes non-deterministic BSOD #4537

abdusamadtv opened this issue Sep 23, 2019 · 21 comments

Comments

@abdusamadtv
Copy link

abdusamadtv commented Sep 23, 2019

  • VSCode Version: 1.38.1 (user setup)
  • Local OS Version: Windows 10 Pro 18362.356
  • Remote OS Version: Ubuntu 18.04.3 LTS
  • Remote Extension/Connection Type: WSL

Steps to Reproduce:

  1. Restart computer
  2. Clear cache/node_modules

Does this issue occur when you try this locally?: No

npm install --save core-js@3

I'm running this command in integrated terminal of vscode which is connected to wsl and get BSoD with this error

image

@storm1ng
Copy link

storm1ng commented Sep 23, 2019

It's not only with installing core-js.
I ran npx create-react-app and got the BSOD.

I have the feeling that it has something todo with the massive amount of files being written to the disk.
It might also be related to the anti virus software (in my case Avira).

Already send Microsoft the mini dump but so far I didn't hear back.

@zetos
Copy link

zetos commented Sep 24, 2019

Had the same issue when installing npm i firebase and also when running npx create-react-app on node v12.10.0 and v12.9.0

But its not easy to reproduce, usually the same command (like npm i firebase -S) can get me three different outputs:

  1. Success (this is usually what happens).
  2. npm error:
2228 verbose cwd /home/zetos/Projects/vue-geo-chat
2229 verbose Linux 4.4.0-18362-Microsoft
2230 verbose argv "/home/zetos/.nvm/versions/node/v12.10.0/bin/node" "/home/zetos/.nvm/versions/node/v12.10.0/bin/npm" "i" "firebase" "-S"
2231 verbose node v12.10.0
2232 verbose npm  v6.10.3
2233 error code EACCES
2234 error syscall rename
2235 error path /home/zetos/Projects/vue-geo-chat/node_modules/grpc
2236 error dest /home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE
2237 error errno -13
2238 error Error: EACCES: permission denied, rename '/home/zetos/Projects/vue-geo-chat/node_modules/grpc' -> '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE'
2238 error  [OperationalError: EACCES: permission denied, rename '/home/zetos/Projects/vue-geo-chat/node_modules/grpc' -> '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE'] {
2238 error   cause: [Error: EACCES: permission denied, rename '/home/zetos/Projects/vue-geo-chat/node_modules/grpc' -> '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE'] {
2238 error     errno: -13,
2238 error     code: 'EACCES',
2238 error     syscall: 'rename',
2238 error     path: '/home/zetos/Projects/vue-geo-chat/node_modules/grpc',
2238 error     dest: '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE'
2238 error   },
2238 error   stack: "Error: EACCES: permission denied, rename '/home/zetos/Projects/vue-geo-chat/node_modules/grpc' -> '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE'",
2238 error   errno: -13,
2238 error   code: 'EACCES',
2238 error   syscall: 'rename',
2238 error   path: '/home/zetos/Projects/vue-geo-chat/node_modules/grpc',
2238 error   dest: '/home/zetos/Projects/vue-geo-chat/node_modules/.grpc.DELETE',
2238 error   parent: 'vue-geo-chat'
2238 error }
2239 error The operation was rejected by your operating system.
2239 error It is likely you do not have the permissions to access this file as the current user
2239 error
2239 error If you believe this might be a permissions issue, please double-check the
2239 error permissions of the file and its containing directories, or try running
2239 error the command again as root/Administrator.
2240 verbose exit [ -13, true ]
  1. BSOD.

I tried to run npm i in two different projects where i had got a BSOD previously at same time and got no luck in reproducing it.

@PaulSearcy
Copy link

PaulSearcy commented Sep 25, 2019

I'm getting the same issue as OP with coincidentally the exact same setup down to the version # and it's only BSOD when using integrated terminal. Sometimes I'll also get a BSOD with KERNEL_SYSTEM_CHECK_FAILURE, again on the integrated terminal

Using WSL in external terminal I don't have any permission or BSOD issues. *Unless I've tried to run something like npm i webpack in the integrated terminal and when that throws a permission error. I'll try to do it from external and that is where I got the KERNEL_SYSTEM_CHECK_FAILURE

After this I guess I'm not going to be using the integrated terminal again in VSCode. I've run into so many issues, both with Bash in WSL and Powershell.

@jbelien
Copy link

jbelien commented Oct 9, 2019

Got same issue as @PaulSearcy !

Running WSL and its terminal integrated in VSCode and running npm crashed to a BSOD with KERNEL_SECURITY_CHECK_FAILURE (and also after some Permission denied) several times on 2 different machines these last few weeks ...

@jbelien
Copy link

jbelien commented Oct 14, 2019

Same issue (BSOD with KERNEL_SECURITY_CHECK_FAILURE) while trying to install concurrently from the WSL terminal (VSCode was running and its terminal was open in the same directory).

@Peredery
Copy link

Same issue
KERNEL_SECURITY_CHECK_FAILURE

@kvalium
Copy link

kvalium commented Oct 22, 2019

Same problem here with same errors but it seems to only occurs with "big" projects having a lot of dependencies. Using Yarn instead of npm solved this for me but it's quite annoying. Could it be the memory?

@therealkenc
Copy link
Collaborator

If anyone catches this in the act, send the minidump to secure@microsoft.com and make clear in the subject and body it should be directed to the WSL team. This is in all likelihood going to be related to #1529, which is not new. What is new is the BSOD.

@storm1ng
Copy link

storm1ng commented Oct 27, 2019

@therealkenc
I can send it again but already did so:

Subject: BSOD when running 'npx create-react-app' (using linux node.js) in WSL

Hi all

I am having bsods almost every time I run npx create-react-app or npm install inside a react project on WSL using Linux native node.js:
    SYSTEM_SERVICE_EXCEPTION: 0x0000003b
    Param 1: 00000000`c0000005
    Param 2: fffff801`4ad7a8c4
    Param 3: fffff88b`82bfe5e0
    Param 4: 00000000`00000000
    Caused by Driver: LXCORE.SYS
    Caused by Address: LXCORE.SYS+9a8c4
    File version: 10.0.18362.1 (GitEnlistment(winpbld).190318-1202)

I am using Windows 10 1903 (Build 18362.356).

Please find the mini-dump attached to this email.

If you are in need of a full memory dump, I have it stored and could provide it if needed.

Thank you in advance,
Manuel

I have never heard anything. Not sure if I should have been more precise regarding the forwarding to the WSL team.

@rvazarkar
Copy link

Can confirm this issue when using npm.

It doesn't even have to be something like core-js, even doing a single package install can sometimes cause a BSOD on my system. Doesn't seem to be any rhyme or reason to it, but the error is always the same:

LXCORE.SYS
SYSTEM_SERVICE_EXCEPTION

I've got a couple different event logs with what looks like different parameters as well.

The computer has rebooted from a bugcheck. The bugcheck was: 0x00000139 (0x0000000000000003, 0xfffff5088b70ff50, 0xfffff5088b70fea8, 0x0000000000000000). A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: 08db5c11-9282-490b-b0c3-db8a7bd1b6a5.

The computer has rebooted from a bugcheck. The bugcheck was: 0x0000003b (0x00000000c0000005, 0xfffff80212f9a8c4, 0xffffaf860c1326e0, 0x0000000000000000). A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: 25f23027-07cc-4322-9f08-7b91cf0352be.

The computer has rebooted from a bugcheck. The bugcheck was: 0x0000003b (0x00000000c0000005, 0xfffff8001929a8c4, 0xffffe6089d10d6e0, 0x0000000000000000). A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: f5cde6d5-b84c-41fd-b3ae-725b62b60d32.

I'll go ahead and send the minidump to the address as well.

@PaulSearcy
Copy link

I figured out a workaround for the time being for VS Code in settings.json

"remote.WSL.fileWatcher.polling": true

https://code.visualstudio.com/docs/remote/wsl#_i-see-eaccess-permission-denied-error-trying-to-rename-a-folder-in-the-open-workspace

Microsoft in the link above explains why VS Code has such trouble in WSL with renaming folders. Which isn't a direct answer for this issue, but after using polling I haven't had a single issue yet.

Downside is that depending on the polling interval you may have to reopen files to see updates, package.json for example, and they point out could slow down larger projects considerably. They go on to say there not going to fix it in WSL 1 and that its fixed in WSL 2.

WSL 2 is actually slower than WSL 1 if you need to access files and folders outside of virtual drive it creates. (Which I do) So its kinda a mixed bag depending on your situation.

Hope this helps people coming to this issue.

@therealkenc
Copy link
Collaborator

Glad you referenced that link, with guilt by association microsoft/vscode-remote-release/#208. I nearly mentioned as much last post, but wanted to see how the BSOD investigation played out (read: not VS Code's problem). I suspect but can't prove that VS Code banging hard polling file status is surfacing the bug. I believe VS Code also retries rename in the face of failure, but now I can't find a reference to the patch. Ref #1956 which is the LZ for the perennial inotify(7) problem.

@mizzao
Copy link

mizzao commented Nov 10, 2019

I just ran into this issue with (meteor/meteor#10768 (comment)):

  • Windows 10.0.18362
  • npm 6.9.0
  • node 8.15.1

If it helps, I have no antivirus and Windows Defender is completely disabled (it makes WSL much faster). I am also using the VSCode integrated terminal, as a few of you mentioned above.

This SO user also seems to have the same issue: https://stackoverflow.com/questions/57952780/npm-install-makes-windows-crash. He/she is using

  • npm 6.10.3
  • node 12.10.0

@AbdusamadTurdiev any chance to just rename this issue to something like the following?

Running NPM causes non-deterministic BSOD

If anyone catches this in the act, send the minidump to secure@microsoft.com and make clear in the subject and body it should be directed to the WSL team. This is in all likelihood going to be related to #1529, which is not new. What is new is the BSOD.

This is happening to me all the time but those instructions are not exactly clear. Are you suggesting the following steps?

  • set system dump size to 256k
  • Go to %SYSTEMROOT%/Minidump after a BSOD
  • Email the file to secure@microsoft.com

@abdusamadtv abdusamadtv changed the title BSoD while installing core-js@3 Running NPM causes non-deterministic BSOD Nov 12, 2019
@abdusamadtv
Copy link
Author

abdusamadtv commented Nov 12, 2019

I just ran into this issue with (meteor/meteor#10768 (comment)):

  • Windows 10.0.18362
  • npm 6.9.0
  • node 8.15.1

If it helps, I have no antivirus and Windows Defender is completely disabled (it makes WSL much faster). I am also using the VSCode integrated terminal, as a few of you mentioned above.

This SO user also seems to have the same issue: https://stackoverflow.com/questions/57952780/npm-install-makes-windows-crash. He/she is using

  • npm 6.10.3
  • node 12.10.0

@AbdusamadTurdiev any chance to just rename this issue to something like the following?

Running NPM causes non-deterministic BSOD

If anyone catches this in the act, send the minidump to secure@microsoft.com and make clear in the subject and body it should be directed to the WSL team. This is in all likelihood going to be related to #1529, which is not new. What is new is the BSOD.

This is happening to me all the time but those instructions are not exactly clear. Are you suggesting the following steps?

  • set system dump size to 256k
  • Go to %SYSTEMROOT%/Minidump after a BSOD
  • Email the file to secure@microsoft.com

@mizzao yes, according to above problems of people that's the right name for this issue

@SukkaW
Copy link

SukkaW commented Dec 15, 2019

Well, it seems that a month passed and I am still having the exact same issue here.

I am running WSL1 on WIndows 10.0.19041.1, and BSOD (KERNEL_SECURITY_CHECK_FAILURE (139)) when I execute npm test. From Windbg it tells me LXCORE!LxpInotifyAddWatch is where the Exception is.

Any suggestions but sent minidump to secure@microsoft.com?

@robertwt7
Copy link

Whoa this is what i'm looking for! I opened an issue at expo/expo-cli#2379 because whenever i'm running expo start and do a yarn add package, most of the time it gave me BSOD!

I don't even know where the bug came from. I sent my dump file to microsoft feedback after instructed by one of microsoft team in their website though.. let's see

@MosheL
Copy link

MosheL commented Sep 14, 2020

I was recived the same BSOD without WSL

@Sora233
Copy link

Sora233 commented Dec 30, 2021

got KERNEL_SECURITY_CHECK_FAILURE ON NPM

@a-tonchev
Copy link

a-tonchev commented Feb 10, 2022

I have the same problem on Windows 11 with WSL 1

  • When I make yarn install or yarn upgrade
  • Adding packages one by one (yarn add something@lates) seems to work well

The files yarn.lock and package.json get broken and filled with NUL NUL NUL:

image

image

EDIT: I found the reason! Updating node-libcurl from 2.3.3 2.3.4 is causing that problem. I manage to update all other libraries without problem, but a simple yarn add node-libcurl@latest via WSL is crashing completely the windows and the package.json + yarn.lock

@reo6
Copy link

reo6 commented May 8, 2022

Got the same problem with Rust, trunk.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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

No branches or pull requests