microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95k stars 8.22k forks source link

Terminal can't create pseudoconsoles when condrv isn't loaded [Error 0xd000003a] #4750

Open dkav opened 4 years ago

dkav commented 4 years ago

Environment

Windows build number:  0.9.433.0

Windows Terminal version (if applicable):  0.9.433.0

Running within VirtualBox VM.

Steps to reproduce

Start Windows Terminal after reboot.

Expected behavior

Powershell starts.

Actual behavior

Powershell does not start. Following messaged displayed - Error 0xd000003a when launching 'powershell.exe'. Starting Powershell directly, which opens without a problem, and then opening Powershell in Windows Terminal fixes the problem.

The following is my PATH:

C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Windows\System32\OpenSSH\
C:\Users\Darren\AppData\Local\Microsoft\WindowsApps
C:\Python27\ArcGIS10.8
C:\Program Files\ArcGIS\Pro\bin\Python\Scripts

Similar issue with Command and similar resolution.

DHowett-MSFT commented 4 years ago

If you launch cmd, does powershell start working? I have a theory, but this will help me narrow it down.

dkav commented 4 years ago

Yes, launching the stand alone Command Prompt enables Powershell to start within Windows Terminal.

DHowett-MSFT commented 4 years ago

Okay, I bet condrv (our kernel driver) isn't being loaded. This is extremely rare, and only happens when no other console applications have been spawned on startup.

dkav commented 4 years ago

I have tried to keep the VM as spare as possible so I guess that would fit in with your hypothesis.

DHowett-MSFT commented 4 years ago

I've got an idea how to fix this, but the workaround is simple (launch a commandline app, or be on a non-stripped-out Windows); triaging into 1.x (not backlog), p2

DIzFer commented 4 years ago

I can also observe this exact behaviour on my system, which both has as little software installed as possible and on a virtual machine.

revnode commented 4 years ago

Seeing this on my laptop that's running Windows 10 ARM.

cbrnr commented 4 years ago

Same on my machine (not a VM, standard installation) - this happens very often and I can't start any of my profiles (Bash, Powershell, CMD).

ghost commented 4 years ago

I am having an almost identical issue on my main machine. I am using Windows 10 2004 x64. When I launch Windows Terminal after a reboot I am faced with this. However if I then launch CMD and reopen Windows Terminal the issue is fixed. I have CMD set as my default profile just FYI.

rfalanga commented 4 years ago

@DHowett-MSFT the work around you gave on March 5th does work, but it is disconcerting. I had previously uninstalled FileZilla, which then required (so it said) me to reboot. As soon as my machine came back on the first thing I did was get into Windows Terminal, which launches a PowerShell 7.0.3 instance. Or tried, as I got that error. I thought that somehow uninstalling FileZilla had corrupted my machine. Until I came across this post. So, I thought brought up PowerShell, not Windows Terminal. That allowed me to bring up Windows Terminal.

Is this issue being worked on?

DHowett commented 4 years ago

"Sort of." The official mechanism by which we would load our driver is effectively a private API. I'm working on making sure we can actually ship that ;P

AnthonyK213 commented 4 years ago

Same (not a VM). The error would be reproduced every time I restart the pc, which is really annoying. The windows is fresh installed (ver 1909), and the windows terminal is also newly installed (ver 1.2.2381.0).

rowheel commented 3 years ago

Same. It's a Win10/KVM installation. Problem reproduces each time I boot up the guest OS. The workaround is to fire up a PowerShell console, and then close that. WT shall get functioning.

Kein commented 3 years ago

Same issue. NOT A VM INSTALLATION

justinkb commented 3 years ago

seeing this in a non-vm setting as well. windows 10 pro

submodify commented 3 years ago

Same issue here... Windows 10 Pro Version 10.0.19042 Build 19042 Fresh install not a VM

LukasDoesDev commented 3 years ago

Same issue here, using a KVM

Windows 10 Pro Version 20H2 Build 19042.804

nullinger commented 3 years ago

Same issue. No VM. Windows 10 Pro Version 20H2.

Apart from that: Great software 👍 Thank you

jordankkk commented 3 years ago

same 20H2 without vm

vefatica commented 3 years ago

Does the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\condrv\Start affect this? What if it were changed from 3 (manual) to 2 (autoload)?

jordankkk commented 3 years ago

so far reinstall the problem is not appearing again

panorb commented 3 years ago

Does the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\condrv\Start affect this? What if it were changed from 3 (manual) to 2 (autoload)?

This change fixed the issue for me.

htcfreek commented 3 years ago

I had this issue too before a couple of minutes. Affected profiles: git bash, cmd, powershell The solution for me was running cmd directly via start menu. The wt works again.

the-j0k3r commented 3 years ago

Today out of the blue after it has been working perfectly for a long time.

[error 0xd000003a when launchingpowershell.exe -NoLogo']`

Windows 10 pro 1909 18363.1556

Windows Terminal version (if applicable):  1.7.1033.0

NOT A VM

I believe this happened because it was the first app opened after Windows finished loading, workaround was to start cmd before hand,

the-j0k3r commented 3 years ago

After my initial report as above, there are new changes.

Terminal was updated to Version: 1.8.1444.0 a day or so later from said report, and for a while the issue was gone.

Windows upgraded from 1909 - build 18363.1556 to 2004 19041.985 last terminal was launching just fine for a while after this.

Today I opened WT and low and behold here comes the issue back into focus rearing its head.

The only changes to system were that I cleanup via the new settings menu all old installations and temp files.

If I open Windows store checking for new version of apps, afterwards the issue is gone. Though there are no new WT updates.

With no official developers feedback into with what specific information developers would benefit from in all bugs reports reports, its hard to know what further information would benefit said developers in fixing the issue, since having to perform some workaround in order to have a successful error free WT launch and operation is already a strain on day to day usage.

TLDR

Can someone official to project please add some entry to both readme/issue templates that details how to gather logs or other desired information that would help developers pin the issues reported down. With exception of telemetry which users may have disabled or cannot submit manually when creating issues.

/end

and again

NOT A VM

regards.

TheBinitGhimire commented 3 years ago

Hi there,

I just installed the 21H1 version of Windows 10, and I was facing this issue in Windows Terminal latest release v1.8.1444.0 after restarting my computer.

I quickly came across this issue, and I tried to follow this suggestion from @vefatica:

Does the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\condrv\Start affect this? What if it were changed from 3 (manual) to 2 (autoload)?

After changing the value from 3 to 2 in hexadecimal, the issue was resolved.

I guess this change could help in resolving this issue for everyone who is facing this problem. I hope you would try it, and let me know what happens.

Thanks, @TheBinitGhimire

gwonhong commented 3 years ago

I just read the suggestion above from @TheBinitGhimire, changing the value 3 to 2, the issue was resolved even without rebooting. Thanks a lot!

fn5 commented 2 years ago

Had this issue within a Hyper-V VM, guest running 11 21H2 22000.194 Changing the registry key as per post above from @TheBinitGhimire resolved the issue.

zadjii-msft commented 1 year ago

Note

Walkthrough

Ayush-mishra-0-0 commented 11 months ago

Can i work on this issue?

zadjii-msft commented 11 months ago

Sure!

jennarbates commented 5 months ago

Can I work on this issue?