-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
[windows] wezterm hangs randomly, mostly but not exclusively, when closing panes. #5882
Comments
It seems to hang at ntwaitforsingleobject |
I built wezterm in debug mode and run it, managed to hang it again and generated a memory dump. The full stack trace doesn't fit in the images above, below the copy pasta.
|
It seems to hang in Finally if I understand the dump correctly it hangs at Which calls a shared library function @RasmusN maybe you have an idea of what's going on? Because me, I reached the limit of where I am able to go. |
Rust is unfortunately outside of my comfort zone so I'm unable to help analyzing the code. I've made efforts to try to find a way to consistently replicate the crash but I haven't even been able to do that. Have you found a way to trigger the crash? |
I didn't manage to consistently replicate that The rust syntax doesn't matter that much @RasmusN if you can be a partner in this journey I will be happy. We have this macro which expands into something else. See part of this expansion below I don't understand all the details, and at the moment I also don't care, the interesting part is that is that we call This dll is this one down here What this dll does and how it does it and why the call to close hangs, no idea. Not sure if the article is of any help but to understand the problem probably we will have to understand Maybe |
This issue might be similart to microsoft/terminal#1810 I still have to read this in detail but this comment points out to a race condition, which kind of fits with this problem being hard to reproduce. Apparently this is because This is because the ConPTY is being started with |
I also see this flag was added three months ago, in this commit @Cammisuli maybe you could shed some light into this? |
What Operating System(s) are you seeing this problem on?
Windows
WezTerm version
20240203-110809-5046fc22
Happens with latest master wezterm 20240807-131622-ee063330 too (see last stack traces in this issue)
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, but I will now download latest nightly and see if it happens there too, but I am guessing there might be some weird interaction with windows git credential manager going on.
Describe the bug
When closing a pane wezterm hangs.
If I remember correctly happened to me too while doing something else.
I'll be glad to get my hands dirty to debug this with some hints :)
To Reproduce
I don't know yet, so far I could not identify any pattern, just opening an issue to collect ideas,
Configuration
I don't think my config has to do with wezterm hanging since it seems to hang in git_credential_username_new (see below) but added a link to it.
If there might be anything to blame from my config would be this part where there is some logic to close a wezterm or a nvim pane.
Logs
I couldn't see any errors in my logs except the following,
Anything else?
I attached a debugger to wezterm after it hanged and could see the following.
Wezterm seems to hang in git_credential_username_new, I guess is this is this function from libgit2, but this is a wild guess from my side
The text was updated successfully, but these errors were encountered: