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

GreenScreen on opening #3304

Closed
Ansuel opened this issue Jun 15, 2018 · 30 comments
Closed

GreenScreen on opening #3304

Ansuel opened this issue Jun 15, 2018 · 30 comments
Assignees

Comments

@Ansuel
Copy link

Ansuel commented Jun 15, 2018

Microsoft Windows [Versione 10.0.17692.1000]

As soon as i open The bash shell i have a green screen with lxcore.sys crashing...

I can't find a way to generate a crashdump.

@refparo
Copy link

refparo commented Jun 15, 2018

+1. When I'm trying to run wsl without administer privilege, I get a GSOD on SYSTEM_SERVICE_EXCEPTION in LXCORE.SYS. Reverting my Windows.

@onomatopellan
Copy link

onomatopellan commented Jun 15, 2018

Same here. FeedbackHub asked me what happened to get a GSOD and I replied I just tried to open Ubuntu shell. I don't know if the minidump was automatically sent at that moment though.

@Brian-Perkins
Copy link

Typically you will find the crashdump at \windows\memory.dmp. If you could email that to us -- see CONTRIBUTING.md, it would be appreciated. If you do not see a memory.dmp file, this option can be configured in the Startup and Recovery UI of System Properties (click start, start typing "view advanced system settings" and you should see the option).

@Ansuel
Copy link
Author

Ansuel commented Jun 15, 2018

problem is that windows doesn't create it... even if i have the option enabled (tried with full dump and small memory dump 256kb)
nothing in /windows/ no minidump and no memory.dmp

@therealkenc
Copy link
Collaborator

I just upgraded to '692 moments ago in the hopes of getting a dump to send in, but strangely no GSOD for me. I tried ubuntu.exe and ubuntu1804.exe, both as non-admin natch. So now the game is guessing the variable that is causing some to fail and others not.

@Ansuel
Copy link
Author

Ansuel commented Jun 15, 2018

Some way to extract them ?

@Brian-Perkins
Copy link

Our most recent instances of GSOD affecting only a small group have been related to AV software. @Ansuel - the only other reliable mechanism would be to attach a kernel debugger and capture the information from a separate device.

@Ansuel
Copy link
Author

Ansuel commented Jun 15, 2018

well... i have windows defender as AV software...

@onomatopellan
Copy link

onomatopellan commented Jun 15, 2018

Ok I tested some things and this is what I found. All these in build 17692 with a practically clean install. (Windows Defender as AV)

I have installed Ubuntu 18.04 in C: drive through the store and I can open it (normal and elevated) without getting any GSOD.
I also have installed some other distros in G: drive and these can be opened with "run as admin" otherwise I always get the GSOD. A repo would be:

So I think launching distros installed through the Store shouldn't have this issue but distros installed manually should.

@Ansuel
Copy link
Author

Ansuel commented Jun 15, 2018

looks like the disto should be signed in some way and cause this sign doesn't exist in manually installed (or upgraded) dist windows goes GSOD

Open bash with elevated permission skip this check and windows doesn't crash.

@Biswa96
Copy link

Biswa96 commented Jun 16, 2018

I also see this issue but with BSOD and same error of LxCore.sys.

As I said in this thread #1744 (comment), there is a new option in wslconfig.exe /upgrade. This has some relation with reparse points. In my case, that option solves this problem.

Also as @Ansuel said, with admin privileges bash.exe and wsl.exe doesn't cause this BSOD. 👏 for that tip, thanks.

@Ansuel
Copy link
Author

Ansuel commented Jun 16, 2018

i can't find the wslconfig.exe /upgrade option

@Ansuel
Copy link
Author

Ansuel commented Jun 16, 2018

i never installed bash on windows from the store.
as my installation is present before the introduction of bash on windows in the store... i can't even use the upgrade command on the legacy distro...

Some checks must be introduced with this insider build as i didn't have any problem before...

@Biswa96
Copy link

Biswa96 commented Jun 17, 2018

It's seem to be weird. I install build 17692 in VirtualBox and attach windbg with pipe. But there is no blue/green screen with wsl.exe or bash.exe.

@onomatopellan
Copy link

@Brian-Perkins I have sent a kernel memory dump. Hope it helps to fix this issue.

For those who can't generate a memory dump, in order to generate the MEMORY.DMP I had to check "Disable Automatic Deletion of Memory Dumps When Disk Space is Low".

@SvenGroot
Copy link
Member

Those of you who are seeing this problem, can you answer two questions for me:

  1. What's the path where you installed your distro (the Windows location of the "rootfs" folder)?
  2. What's the output of running icacls on that folder and its parent?

Using wslconfig /upgrade may fix the issue, but at this point doing this will have a few disadvantages (most notably file timestamps will not behave correctly), and there is no way to undo this upgrade.

@Ansuel
Copy link
Author

Ansuel commented Jun 19, 2018

@SvenGroot
Also wslconfig /upgrade doesn't work in Legacy disto...

anyway my rootfs folder is here

C:\Users\Ansue\AppData\Local\Lxss (this is where i have all the data)

C:\Users\Ansue\AppData\Local\Lxss\rootfs (rootfs dir)

C:\Users\Ansue\AppData\Local\Lxss BUILTIN\Administrators:(I)(F)
                                  BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
                                  NT AUTHORITY\SYSTEM:(I)(F)
                                  NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
                                  NT AUTHORITY\SERVIZIO LOCALE:(I)(RX)
                                  NT AUTHORITY\SERVIZIO LOCALE:(I)(OI)(CI)(IO)(GR,GE)
                                  NT AUTHORITY\SERVIZIO DI RETE:(I)(RX)
                                  NT AUTHORITY\SERVIZIO DI RETE:(I)(OI)(CI)(IO)(GR,GE)
                                  BUILTIN\Users:(I)(RX)
                                  BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE)
                                  AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI:(I)(RX)
                                  AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI:(I)(OI)(CI)(IO)(GR,GE)
                                  AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI CON RESTRIZIONI:(I)(RX)
                                  AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI CON RESTRIZIONI:(I)(OI)(CI)(IO)(GR,GE)
                                  BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
                                  NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
                                  BUILTIN\Users:(I)(OI)(CI)(IO)(RX)
                                  NT AUTHORITY\Authenticated Users:(I)(M)
                                  NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

Elaborazione completata per 1 file. Elaborazione non riuscita per 0 file

C:\Users\Ansue\AppData\Local\Lxss\rootfs BUILTIN\Administrators:(I)(F)
                                         BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
                                         NT AUTHORITY\SYSTEM:(I)(F)
                                         NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
                                         NT AUTHORITY\SERVIZIO LOCALE:(I)(RX)
                                         NT AUTHORITY\SERVIZIO LOCALE:(I)(OI)(CI)(IO)(GR,GE)
                                         NT AUTHORITY\SERVIZIO DI RETE:(I)(RX)
                                         NT AUTHORITY\SERVIZIO DI RETE:(I)(OI)(CI)(IO)(GR,GE)
                                         BUILTIN\Users:(I)(RX)
                                         BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE)
                                         AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI:(I)(RX)
                                         AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI:(I)(OI)(CI)(IO)(GR,GE)
                                         AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI CON RESTRIZIONI:(I)(RX)
                                         AUTORITÀ PACCHETTI APPLICAZIONI\TUTTI I PACCHETTI APPLICAZIONI CON RESTRIZIONI:(I)(OI)(CI)(IO)(GR,GE)
                                         BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
                                         NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
                                         BUILTIN\Users:(I)(OI)(CI)(IO)(RX)
                                         NT AUTHORITY\Authenticated Users:(I)(M)
                                         NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

Elaborazione completata per 1 file. Elaborazione non riuscita per 0 file

@SvenGroot
Copy link
Member

@Ansuel Thanks. From what I can make out, it seems that your user account does not have the "Delete subfolders or files" permission, which is what I suspected.

What's happening is that we're hitting an access denied error, and then the error handling path has a bug which is causing the BSOD. The bug in the error handling path has already been fixed internally. However, we also shouldn't be requiring these permissions, and we will fix that too.

In the mean time, you can work around this issue by granting yourself full control of the parent of your rootfs folder:
icacls "C:\Users\Ansue\AppData\Local\Lxss" /grant "<username>:(OI)(CI)(F)"

For other people following these instructions, make sure you determine where your "rootfs" folder is located, and use its parent in the above command. It may not be in the same place as this example.

@onomatopellan
Copy link

onomatopellan commented Jun 19, 2018

@SvenGroot Indeed It worked. I used icacls "G:\WSL\Ubuntu\" /grant "<username>:(OI)(CI)(F)" and now I can launch Ubuntu non-store version again. Thanks for the workaraound.

Before trying the workaround wslconfig /upgrade didn't stop the GSODs though and I had to reinstall the distro again.

@Ansuel
Copy link
Author

Ansuel commented Jun 19, 2018

yes can confirm the command fixed the gsod

@SvenGroot
Copy link
Member

@Ansuel @onomatopellan Thanks, that's good to hear. I'm working on the fix for the permissions issue now.

@shoffmeister
Copy link

The temporary work-around was posted in #3304 (comment)

@Biswa96
Copy link

Biswa96 commented Jun 20, 2018

@SvenGroot Is this permission configured from Windows side or WSL side during installation? Can chmod change that permission?

From @voskrese's idea, If I add SD="D:P(A;;GA;;;WD)" in diskpart and add your options "<username>:(OI)(CI)(F)" in icacls I can install WSL in a virtual hard disk (.vhd or .vhdx file).

@MVoz
Copy link

MVoz commented Jun 20, 2018

@Biswa96 на самом деле, эти параметры я взял из инструкции, а по факту просто создал виртуальный диск, отформатировал его в NTFS и основное, после присоединения, с корня диска, через GUI параметра, задал ПОЛНЫЙ доступ для ВСЕХ. распаковал дистриб, даже 5 на сегодняшний день, и тогда у меня все заработало

In fact, these parameters I took from the instructions, and in fact just created a virtual disk, formatted it into NTFS and basic, after attaching, from the root of the disk, through the GUI parameter, set full access for all. Unpacked Distrib, even 5 to date, and then I got everything worked

2018-06-20_172417

@SvenGroot
Copy link
Member

SvenGroot commented Jun 20, 2018

@Biswa96 This is a Windows permission and cannot be set with chmod. It can only be set with icacls.exe (as shown above), PowerShell's Set-Acl cmdlet, and the Windows Explorer security UI.

Also, I'd like to reiterate that this is a bug. We should not be requiring this particular permission (Delete subfolders and files), because it's one that's not present in the default permissions of many locations. I've already fixed it and we'll let you know when the fix reaches an insider build.

@Brian-Perkins
Copy link

The permissions issue should be fixed in Insider Build 17713

@onomatopellan
Copy link

The permissions issue should be fixed in Insider Build 17713

Indeed it works well again. Thanks!

@Biswa96
Copy link

Biswa96 commented Jul 13, 2018

But the installation requires admin privileges or to use the above icacls command.

@DDoSolitary
Copy link

DDoSolitary commented Jul 28, 2018

@SvenGroot Setting FILE_CASE_SENSITIVE_INFORMATION still requires the "Delete subfolders and files" permission. Is it a security feature by design, or the bug isn't fixed yet? Thanks.

@DDvO
Copy link

DDvO commented May 28, 2019

Adapting the file access permissions using icacls did not help in my case.
What did the trick was to invoke the bash command from a Windows shell with admin rights.
Since then I can use WSL / bash again also with normal user rights.

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