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

crash on process exit #11724

Closed
LuanVSO opened this issue Nov 10, 2021 · 4 comments
Closed

crash on process exit #11724

LuanVSO opened this issue Nov 10, 2021 · 4 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Tracking-External This bug isn't resolved, but it's following an external workitem.

Comments

@LuanVSO
Copy link
Contributor

LuanVSO commented Nov 10, 2021

Windows Terminal version (or Windows build number)

1.12.2931.0

Other Software

No response

Steps to reproduce

close terminal

Expected Behavior

No response

Actual Behavior

crash

crash dumps

CrashDumps.zip

call stack

image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 10, 2021
@zadjii-msft
Copy link
Member

Huh, it's literally just a decremented refcount on a threadpool. I honestly have no idea how that would ever hit.

STACK_TEXT:  
threadpoolwinrt!Microsoft::WRL::ActivationFactory<Windows::System::Threading::IThreadPoolStatics,Microsoft::WRL::FtmBase,Microsoft::WRL::Details::Nil,0>::Release+0x58
ucrtbase!<lambda_f03950bc5685219e0bcd2087efbe011e>::operator()+0xa6
ucrtbase!__crt_seh_guarded_call<int>::operator()<<lambda_7777bce6b2f8c936911f934f8298dc43>,<lambda_f03950bc5685219e0bcd2087efbe011e> &,<lambda_3883c3dff614d5e0c5f61bb1ac94921c> >+0x3b
ucrtbase!_execute_onexit_table+0x34
ucrtbase!__crt_state_management::wrapped_invoke<int (__cdecl*)(_onexit_table_t *),_onexit_table_t *,int>+0x22
Windows_UI_Xaml!DllCanUnloadNow+0x1f83c
Windows_UI_Xaml!DllCanUnloadNow+0x1f978
ntdll!LdrpCallInitRoutine+0x61
ntdll!LdrShutdownProcess+0x141
ntdll!RtlExitUserProcess+0xad
kernel32!FatalExit+0xb
ucrtbase!exit_or_terminate_process+0x44
ucrtbase!common_exit+0x6f
WindowsTerminal!__scrt_common_main_seh+0x168
kernel32!BaseThreadInitThunk+0x14
ntdll!RtlUserThreadStart+0x21

Looks like it's the main thread, but there aren't any other threads. Does this happen every time you close the Terminal? Are you running Narrator, or Magnifier or something?

I have literally no idea how I'd go about debugging this next. This doesn't look like any of the other "crash on exit"s we've been seeing, but this doesn't look like anything in our code in the first place

@zadjii-msft
Copy link
Member

Tracked this down on the inside - looks like this is being tracked internally by MSFT:27372787. Actually happens to a pretty broad swath of applications. Also, seemingly doesn't seem to occur on anything newer than 10.0.19043.1288. There's not much else in that bug at the moment, but I'll bump this thread if there's anything the threadpool team shares. There's nothing else for us to do on our side of things, so I'm closing this out. Thanks!

@zadjii-msft zadjii-msft added the Tracking-External This bug isn't resolved, but it's following an external workitem. label Nov 10, 2021
@j4james
Copy link
Collaborator

j4james commented Nov 16, 2021

In case this helps, I can reproduce this exception consistently in Windows Terminal Preview 1.12.2931.0. My Windows version is 10.0.19041.1348, though, so it's older than the expected fix version.

Steps to reproduce:

  1. Open Windows Terminal Preview.
  2. Open the settings tab.
  3. Go to Color scheme page.
  4. Edit the background color (doesn't need to be the active scheme, and I don't think it actually matters what particular color you edit).
  5. Save the changes
  6. Switch back to the first tab without closing the settings.
  7. Close the first tab.
  8. Close the settings tab.

If you're running from within the debugger it should break when the exception is thrown. Otherwise you can see the crash in the Application log of the system Even Viewer.

@zadjii-msft
Copy link
Member

That is wild that it's a consistent repro, thanks for that 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Tracking-External This bug isn't resolved, but it's following an external workitem.
Projects
None yet
Development

No branches or pull requests

3 participants