Repository navigation
Closed
Labels
OS-macOSWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-Consolethe console experiencethe console experience
Milestone
Description
Steps to reproduce
I don't have repro, but it happens fairly consistent with me on macOS.
Maybe every 1 of 100 or so. Running it in the loop doesn't repro it.
I understand that's it not an actionable bug report, but I hitted it about 5 times in a last week and it's pretty frustrating, so I'd like to at least start the conversation about it. It could be not a powershell problem all together, but I tend to think that it's probably PS.
git branch
Expected behavior
Print branches and return back to prompt
Actual behavior
Print branches and don't return to prompt for a very long time (perception like a hang, but eventually it returns to promp).
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
GitCommitId v6.0.0-beta.1
OS Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 Reacted by Michael Klement
Metadata
Metadata
Assignees
Labels
OS-macOSWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-Consolethe console experiencethe console experience
Activity
iSazonov commentedon Jun 6, 2017
Sometime I see any artifacts between VS Code and GitHub Desktop. So maybe the Issue is due to multiple git clients?
vors commentedon Jun 7, 2017
Happens with other native executables too, i.e.
pythontest runner[-]`git branch` doesn't return to prompt immediately sometimes[/-][+]native commands doesn't return to prompt immediately sometimes[/+]vors commentedon Jun 8, 2017
Same with
arcwhich is a tool for Phabricator.I'm very much convinced it's a PS problem.
iSazonov commentedon Jun 8, 2017
Maybe delayed sleep on waiting external process?
vors commentedon Jul 1, 2017
This happens consistently on all native executables but very rarely.
I never can attach debugger quick enough to troubleshoot it.
This is currently my biggest usability problem with powershell.
iSazonov commentedon Jul 1, 2017
Can we inject a trace hook?
We can use WPT (WPR/WPA) on Windows. Have Unix an equivalent?
vors commentedon Jul 4, 2017
I captured some debug info attaching to the process and pausing it
No symbols unfortunately
The PSReadLine one seems suspicious, cc Jason Shirk (@lzybkr)
lzybkr commentedon Jul 4, 2017
The PSReadline thread is probably not interesting, it's probably waiting for a signal to start reading keys.
vors commentedon Jul 4, 2017
Yes I realised it after reading some code. Maybe ApplicationInsight has something to do with it?
iSazonov commentedon Jul 4, 2017
Maybe we need console IO (type emulation) to repo it?
SteveL-MSFT commentedon Jul 5, 2017
sergei (@vors) the AppInsight code only runs once at startup
vors commentedon Jul 5, 2017
Steve Lee (@SteveL-MSFT) do you know where this appinsight call stack on Thread#1 coming from? I skimmed thru telemetry code and indeed it seems that it should be only relevant on a startup.
SteveL-MSFT commentedon Jul 5, 2017
cc James Truher (@JamesWTruher)
17 remaining items
SteveL-MSFT commentedon Oct 2, 2017
Just got a MacBook Pro and I've noticed this with just the
gitcommands. Pretty annoying.vors commentedon Oct 11, 2017
Also in another case I noticed that there are 2 threads that are waiting on the same ManualResetEvent. The second one is thru
PowerShell/src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs
Line 861 in 2a9cd72
SteveL-MSFT commentedon Oct 11, 2017
As part of #4995, I'm changing it to reuse threads by default whereas previously it was creating a new thread everytime. It might help this situation.
vors commentedon Oct 18, 2017
One more observation about this situation is that once one powershell process hangs on a
gitcommand, others will too with very high probabilityvors commentedon Nov 22, 2017
JFYI, still seeing it on
6.0.0-rc, so the thread reusing doesn't seems to helpSteveL-MSFT commentedon Dec 6, 2017
Without a clear repro, moving to 6.1.0
vors commentedon Dec 24, 2017
FWIW it happens much more frequently after a system wake up. On mac while laptop is closed, system does hibernation. This native call hang is the first thing in the morning that greets me almost every day. But it also happens in a steady state sporadically.
vors commentedon Sep 28, 2018
I stop seeing this recently. Perhaps dotnet finally get around to solve it.
SteveL-MSFT commentedon Sep 28, 2018
I haven't experienced myself in a long time. Let's close this and if it repros we can reopen.