terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open dkav opened this issue 5 years ago • 32 comments

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.

dkav avatar Feb 29 '20 05:02 dkav

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

DHowett-MSFT avatar Mar 02 '20 21:03 DHowett-MSFT

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

dkav avatar Mar 02 '20 21:03 dkav

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.

DHowett-MSFT avatar Mar 02 '20 21:03 DHowett-MSFT

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

dkav avatar Mar 02 '20 21:03 dkav

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

DHowett-MSFT avatar Mar 06 '20 00:03 DHowett-MSFT

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

DIzFer avatar Mar 14 '20 10:03 DIzFer

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

revnode avatar Mar 21 '20 18:03 revnode

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).

cbrnr avatar Jun 08 '20 05:06 cbrnr

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.

ghost avatar Jun 19 '20 03:06 ghost

@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?

rfalanga avatar Sep 05 '20 00:09 rfalanga

"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

DHowett avatar Sep 05 '20 00:09 DHowett

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).

AnthonyK213 avatar Sep 13 '20 08:09 AnthonyK213

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.

rowheel avatar Oct 02 '20 08:10 rowheel

Same issue. NOT A VM INSTALLATION

Kein avatar Dec 31 '20 14:12 Kein

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

justinkb avatar Feb 10 '21 17:02 justinkb

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

submodify avatar Feb 15 '21 15:02 submodify

Same issue here, using a KVM

Windows 10 Pro Version 20H2 Build 19042.804

LukasDoesDev avatar Feb 26 '21 18:02 LukasDoesDev

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

Apart from that: Great software 👍 Thank you

nullinger avatar Mar 02 '21 20:03 nullinger

same 20H2 without vm

jordankkk avatar Apr 04 '21 12:04 jordankkk

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)?

vefatica avatar Apr 05 '21 16:04 vefatica

so far reinstall the problem is not appearing again

jordankkk avatar Apr 06 '21 12:04 jordankkk

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.

panorb avatar Apr 23 '21 18:04 panorb

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.

htcfreek avatar May 24 '21 20:05 htcfreek

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

[error 0xd000003a when launching powershell.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 avatar May 26 '21 03:05 the-j0k3r

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.

the-j0k3r avatar Jun 03 '21 10:06 the-j0k3r

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

TheBinitGhimire avatar Jun 26 '21 17:06 TheBinitGhimire

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

gwonhong avatar Aug 06 '21 07:08 gwonhong

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.

fn5 avatar Oct 12 '21 10:10 fn5

Note

Walkthrough

  • We should add a dedicated error message handler for this
  • It would basically be the same as: https://github.com/microsoft/terminal/blob/fc90045cc37c4862f0d447f7ceb5fe1a20eea3fd/src/cascadia/TerminalConnection/ConptyConnection.cpp#L431-L438
    • Text like "This might be due to ConDrv not being started yet. Please refer to <link> for more information"
  • It should theoretically include an aka.ms link to the docs site which explains this (though, we can add the docs and set up the link. That's not something external folks can do)
  • Bonus points: the error message could wrap the URL in an OSC 8 hyperlink

zadjii-msft avatar Apr 28 '23 14:04 zadjii-msft

Can i work on this issue?

Ayush-mishra-0-0 avatar Sep 27 '23 21:09 Ayush-mishra-0-0