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

Cannot start Terminal/new tab as admin #15576

Closed
xenobytezero opened this issue Jun 19, 2023 · 24 comments
Closed

Cannot start Terminal/new tab as admin #15576

xenobytezero opened this issue Jun 19, 2023 · 24 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.

Comments

@xenobytezero
Copy link

xenobytezero commented Jun 19, 2023

Windows Terminal version

1.18.1462.0 (also tested with non-Preview release)

Windows build number

Microsoft Windows [Version 10.0.19042.508]

Other Software

No response

Steps to reproduce

  1. Install Windows Terminal from Microsoft store
  2. Start Windows Terminal (defaults to Powershell)
  3. Settings > Command Prompt > Run this profile as Administrator > On
  4. Close Settings
  5. New Tab > Command Prompt
  6. UAC Dialog Appears > Yes

Expected Behavior

A new Command Prompt tab opens as Admin

Actual Behavior

The cursor turns to a spinner for a second, then nothing. No new tab appears.

Windows Event Log has the following

Faulting application name: WindowsTerminal.exe, version: 1.18.2305.26002, time stamp: 0x64714178
Faulting module name: KERNELBASE.dll, version: 10.0.19041.488, time stamp: 0x5b4a3325
Exception code: 0xc000027b
Fault offset: 0x000000000010b3cc
Faulting process ID: 0xd3c
Faulting application start time: 0x01d9a2c189ac9573
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.18.1462.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report ID: 1b67e669-ed5b-473f-9baf-933fc873b6f5
Faulting package full name: Microsoft.WindowsTerminalPreview_1.18.1462.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

Standard CMD opens fine as Admin.

@xenobytezero xenobytezero added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 19, 2023
@xenobytezero xenobytezero changed the title Cannot start app/new tab as admin Cannot start Terminal/new tab as admin Jun 19, 2023
@WiLuX-Source
Copy link

Same issue happened after updating.

@WiLuX-Source
Copy link

Older version works.

@xenobytezero
Copy link
Author

@WiLuX-Source Which version works for you so I can roll back?

@WiLuX-Source
Copy link

@xenobytezero I rolled back to the latest version where they seperately give win10 and win11 release i dont remember the number rn but it was released at this year Jan 27

@zadjii-msft
Copy link
Member

/feedback

@microsoft-github-policy-service
Copy link
Contributor

Hi there!

Can you please send us feedback with the Feedback Hub with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?

Thanks!

image

image

image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 20, 2023
@WiLuX-Source
Copy link

I modified my windows install heavily so i dont have that one hopefully author can record it.

@WiLuX-Source
Copy link

WiLuX-Source commented Jun 20, 2023

Though, I tried every version and found out only releases that are not seperated by win11 and win10 is effected. (At least for me.)

@markroloff
Copy link

Having the exact same issue here on Windows 10. I've submitted feedback via Feedback Hub. Unfortunately, there was no option to share the link.

Terminal version 1.17.11461.0

@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jun 27, 2023
@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

1 similar comment
@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@WiLuX-Source

This comment was marked as spam.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jun 27, 2023
@PavelAgurov
Copy link

I have the same issue, but new tab is just not opened as Admin.
Version: 1.17.11461.0

@aL1NaZ4R
Copy link

Same here, 1.17.11461.0

@lhecker lhecker added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 28, 2023
@lhecker
Copy link
Member

lhecker commented Jun 28, 2023

This issue is not the only one about kernelbase & 0xc000027b. In fact, there are 25 of them: https://github.com/microsoft/terminal/issues?q=is%3Aissue+0xc000027b+KERNELBASE

While some of them are due to issues in Windows Terminal itself, even more unfortunately turned out to be something out of our control. In particular, your event log entry looks exactly like #15526. In particular: #15526 (comment)

Can you run this in an elevated shell?

cacls "C:\Program Files\WindowsApps" /s

If you don't get the expected output of

C:\Program Files\WindowsApps "D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"

exactly down to the letter, your best bet might almost be to just downright reinstall Windows from scratch. 😟 The permissions for that directory are quite special and no official repair tools are being provided.

@carlos-zamora carlos-zamora added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jun 28, 2023
@DHowett
Copy link
Member

DHowett commented Jun 28, 2023

Not necessarily "exactly," as I have one fewer S-1-15-3 entry than you do on my fairly clean install. 😄

If you see anything other than S-1-5-80 or S-1-15-3, however, that is a big red flag.

@xenobytezero
Copy link
Author

xenobytezero commented Jun 30, 2023

Sorry for the delay.

@zadjii-msft - The issue is appearing on a work machine that appears to have locked out Feedback Hub, so I can't submit this.

@lhecker - I've got the exact correct response you mentioned.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 30, 2023
@carlos-zamora carlos-zamora added Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jul 5, 2023
@carlos-zamora carlos-zamora added this to the Terminal v1.19 milestone Jul 5, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jul 5, 2023
@zadjii-msft
Copy link
Member

Can you try following the steps in "Capture automatically" to get an automatic crash dump/?

If that works, then you should be able to automatically get a .dmp of the terminal when it crashes. Then, can you zip that dump up and send it to us, so we can investigate? We should be able to get around Feedback Hub that way. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 5, 2023
@xenobytezero
Copy link
Author

Managed to get a crash dump, find attached.

CrashDump.zip

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 6, 2023
@WiLuX-Source
Copy link

Is it safe to update now any news?

@zadjii-msft
Copy link
Member

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft
Copy link
Member

zadjii-msft commented Jul 27, 2023

notes from dump


FAILURE_BUCKET_ID:  STOWED_EXCEPTION_c000027b_ntdll.dll!ZwWaitForWorkViaWorkerFactory

OS_VERSION:  10.0.19042.1

BUILDLAB_STR:  vb_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.19041.488

FAILURE_ID_HASH:  {c2e540cf-b248-7db6-f41f-c703b9b4c1e5}
0:000> !xamlstowed
Error: Heap not available. [at xamlthread (line 1982 col 70)]
0:000> k
 # Child-SP          RetAddr               Call Site
00 0000007c`2a0fed30 00007ff9`70dfda2a     KERNELBASE!RaiseFailFastException+0x15c [minkernel\kernelbase\xcpt.c @ 1199] 
01 0000007c`2a0ff310 00007ff9`38007370     combase!RoFailFastWithErrorContextInternal2+0x43a [onecore\com\combase\winrt\error\error.cpp @ 1455] 
02 0000007c`2a0ff570 00007ff9`38007581     Windows_UI_Xaml!DirectUI::ErrorHelper::ProcessUnhandledError+0xf4 [onecoreuap\windows\dxaml\xcp\dxaml\lib\errorhelper.cpp @ 616] 
03 0000007c`2a0ff5b0 00007ff9`37b4d460     Windows_UI_Xaml!DirectUI::ErrorHelper::ReportUnhandledError+0xf1 [onecoreuap\windows\dxaml\xcp\dxaml\lib\errorhelper.cpp @ 502] 
04 0000007c`2a0ff630 00007ff9`37fc1be2     Windows_UI_Xaml!DirectUI::DXamlCore::EnsureCoreApplicationInitialized+0x114 [onecoreuap\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 632] 
05 0000007c`2a0ff680 00007ff9`3822842f     Windows_UI_Xaml!DirectUI::FrameworkApplication::StartOnCurrentThreadImpl+0x62 [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkapplication_partial.cpp @ 83] 
06 0000007c`2a0ff700 00007ff9`3841bf55     Windows_UI_Xaml!DirectUI::FrameworkApplicationGenerated::StartOnCurrentThread+0x2f [onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\frameworkapplication.g.cpp @ 667] 
07 0000007c`2a0ff730 00007ff9`3841bd09     Windows_UI_Xaml!DirectUI::WindowsXamlManager::XamlCore::Initialize+0x161 [onecoreuap\windows\dxaml\xcp\dxaml\lib\windowsxamlmanager_partial.cpp @ 185] 
08 0000007c`2a0ff7a0 00007ff9`37a70433     Windows_UI_Xaml!DirectUI::WindowsXamlManager::Initialize+0xa9 [onecoreuap\windows\dxaml\xcp\dxaml\lib\windowsxamlmanager_partial.cpp @ 222] 
09 0000007c`2a0ff800 00007ff9`3841b292     Windows_UI_Xaml!ctl::ComObjectBase::CreateInstanceBase+0x13 [onecoreuap\windows\dxaml\xcp\components\com\comobjectbase.cpp @ 52] 
0a 0000007c`2a0ff830 00007ff9`3841b37c     Windows_UI_Xaml!ctl::ComObject<DirectUI::WindowsXamlManager>::CreateInstance<DirectUI::WindowsXamlManager>+0x52 [onecoreuap\windows\dxaml\xcp\components\com\inc\ComObject.h @ 167] 
0b (Inline Function) --------`--------     Windows_UI_Xaml!ctl::ComObject<DirectUI::WindowsXamlManager>::CreateInstance+0xa [onecoreuap\windows\dxaml\xcp\components\com\inc\ComObject.h @ 159] 
0c 0000007c`2a0ff860 00007ff9`3841c0a2     Windows_UI_Xaml!ctl::make<DirectUI::WindowsXamlManager>+0x2c [onecoreuap\windows\dxaml\xcp\dxaml\lib\comInstantiation.h @ 43] 
0d 0000007c`2a0ff890 00007ff9`382a7edd     Windows_UI_Xaml!DirectUI::WindowsXamlManagerFactory::InitializeForCurrentThreadImpl+0x62 [onecoreuap\windows\dxaml\xcp\dxaml\lib\windowsxamlmanager_partial.cpp @ 151] 
0e 0000007c`2a0ff8f0 00007ff9`4bba726e     Windows_UI_Xaml!DirectUI::WindowsXamlManagerFactory::InitializeForCurrentThread+0x4d [onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\windowsxamlmanager.g.cpp @ 92] 
0f 0000007c`2a0ff920 00007ff9`4bba7207     TerminalApp!winrt::impl::consume_Windows_UI_Xaml_Hosting_IWindowsXamlManagerStatics<winrt::Windows::UI::Xaml::Hosting::IWindowsXamlManagerStatics>::InitializeForCurrentThread+0x5e [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.UI.Xaml.Hosting.h @ 214] 
10 (Inline Function) --------`--------     TerminalApp!winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager::InitializeForCurrentThread::__l2::<lambda_1>::operator()+0xb [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.UI.Xaml.Hosting.h @ 1001] 
11 0000007c`2a0ff980 00007ff9`4bb81728     TerminalApp!`winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager::InitializeForCurrentThread'::`2'::<lambda_1>::<lambda_invoker_cdecl>+0x17 [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.UI.Xaml.Hosting.h @ 1001] 
12 0000007c`2a0ff9c0 00007ff9`4bb81e67     TerminalApp!winrt::impl::factory_cache_entry<winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager,winrt::Windows::UI::Xaml::Hosting::IWindowsXamlManagerStatics>::call<winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager (__cdecl*)(winrt::Windows::UI::Xaml::Hosting::IWindowsXamlManagerStatics const &)>+0xe0 [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\base.h @ 6457] 
13 (Inline Function) --------`--------     TerminalApp!winrt::impl::call_factory_cast+0x41 [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\base.h @ 6496] 
14 (Inline Function) --------`--------     TerminalApp!winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager::InitializeForCurrentThread+0x41 [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.UI.Xaml.Hosting.h @ 1001] 
15 0000007c`2a0ffa40 00007ff9`4bb90d86     TerminalApp!winrt::TerminalApp::implementation::App::Initialize+0xa7 [C:\a\_work\1\s\src\cascadia\TerminalApp\App.cpp @ 35] 
16 0000007c`2a0ffad0 00007ff9`4bb90cde     TerminalApp!winrt::TerminalApp::implementation::App::App+0x86 [C:\a\_work\1\s\src\cascadia\TerminalApp\App.cpp @ 27] 
17 0000007c`2a0ffb20 00007ff9`4bb90c8b     TerminalApp!winrt::make<winrt::TerminalApp::implementation::App>+0x3a [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\base.h @ 8016] 
18 (Inline Function) --------`--------     TerminalApp!winrt::TerminalApp::factory_implementation::AppT<winrt::TerminalApp::factory_implementation::App,winrt::TerminalApp::implementation::App>::ActivateInstance+0xa [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\App.g.h @ 43] 
19 0000007c`2a0ffb60 00007ff7`c600fc85     TerminalApp!winrt::impl::produce<winrt::TerminalApp::factory_implementation::App,winrt::Windows::Foundation::IActivationFactory>::ActivateInstance+0x1b [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\base.h @ 6526] 
1a (Inline Function) --------`--------     WindowsTerminal!winrt::Windows::Foundation::IActivationFactory::ActivateInstance+0x42 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6620] 
1b (Inline Function) --------`--------     WindowsTerminal!winrt::TerminalApp::App::{ctor}::__l1::<lambda_168_>::operator()+0x42 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 7074] 
1c 0000007c`2a0ffb90 00007ff7`c6002c8e     WindowsTerminal!`winrt::TerminalApp::App::App'::`1'::<lambda_168_>::<lambda_invoker_cdecl>+0x65 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 7074] 
1d 0000007c`2a0ffc00 00007ff7`c6001554     WindowsTerminal!winrt::impl::factory_cache_entry<winrt::TerminalApp::App,winrt::Windows::Foundation::IActivationFactory>::call<winrt::TerminalApp::App (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &)>+0x12e [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6457] 
1e (Inline Function) --------`--------     WindowsTerminal!winrt::impl::call_factory_cast+0x47 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6496] 
1f (Inline Function) --------`--------     WindowsTerminal!winrt::TerminalApp::App::{ctor}+0x47 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 7074] 
20 0000007c`2a0ffcc0 00007ff7`c600141b     WindowsTerminal!WindowEmperor::WindowEmperor+0x84 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\WindowEmperor.h @ 40] 
21 (Inline Function) --------`--------     WindowsTerminal!std::_Construct_in_place+0xb [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\xutility @ 231] 
22 (Inline Function) --------`--------     WindowsTerminal!std::_Ref_count_obj2<WindowEmperor>::{ctor}+0x24 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\memory @ 2031] 
23 (Inline Function) --------`--------     WindowsTerminal!std::make_shared+0x31 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\memory @ 2704] 
24 0000007c`2a0ffd60 00007ff7`c6014472     WindowsTerminal!wWinMain+0x11b [C:\a\_work\1\s\src\cascadia\WindowsTerminal\main.cpp @ 117] 
25 (Inline Function) --------`--------     WindowsTerminal!invoke_main+0x21 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118] 
26 0000007c`2a0ffe50 00007ff9`72426fd4     WindowsTerminal!__scrt_common_main_seh+0x106 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
27 0000007c`2a0ffe90 00007ff9`7267cec1     kernel32!BaseThreadInitThunk+0x14 [clientcore\base\win32\client\thread.c @ 64] 
28 0000007c`2a0ffec0 00000000`00000000     ntdll!RtlUserThreadStart+0x21 [minkernel\ntdll\rtlstrt.c @ 1153] 

watson was useless.

BUT that stack looks really similar to #15745.

Though, this one's from the Store, so it's not running unpackaged. In this one,

  • The Emperor is constructing the App on the main thread
  • the App is calling WindowsXamlManager::InitializeForCurrentThread.
  • which gets up to FrameworkApplicationGenerated::StartOnCurrentThread.

but all of that seems.... normal.

I need to reach out to someone to check out how to get at the stowed exception.

@zadjii-msft
Copy link
Member

I'm just gonna start aggregating all these into /dup #15583

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot removed this from the Terminal v1.19 milestone Sep 18, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

9 participants