PowerShell / PowerShell/PowerShell
PowerShell crash when exiting Flatpak debugging shell
Open
Nobody has claimed this yet.
Needs-Triage
- Dominant language
- C#
- Stars
- 55.5k
- Forks
- 8.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 88
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Start a PowerShell session
- Enter a debugging shell for any flatpak package in that PowerShell session, e.g.
flatpak run --command=bash com.collaboraoffice.Office - Press
Control+Dto exit that shell
Expected behavior
The Flatpak debugging successfully quits without bring down PowerShell too.
Actual behavior
PS /> flatpak run --command=bash com.collaboraoffice.Office
[📦 com.collaboraoffice.Office /]$
exit
^[[22;1RProcess terminated. Input/output error
at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
System.IO.IOException: Input/output error
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
at System.ConsolePal.TryGetCursorPosition(Int32& left, Int32& top, Boolean reinitializeForRead)
at System.ConsolePal.GetCursorPosition()
at System.Console.get_CursorLeft()
at Microsoft.PowerShell.ConsoleHostRawUserInterface.get_CursorPosition()
at Microsoft.PowerShell.ConsoleHost.InputLoop.Run(Boolean inputLoopIsNested)
at Microsoft.PowerShell.ConsoleHost.InputLoop.RunNewInputLoop(ConsoleHost parent, Boolean isNested)
at Microsoft.PowerShell.ConsoleHost.EnterNestedPrompt()
at Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop(String initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs, Boolean staMode, String configurationName, String configurationFilePath)
at Microsoft.PowerShell.ConsoleHost.Run(CommandLineParameterParser cpp, Boolean isPrestartWarned)
at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText, Boolean issProvidedExternally)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)
Error details
Environment data
PS /> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS openSUSE Tumbleweed
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash with the Flatpak debugging-shell command and Control+D, then trace the reported path through Microsoft.PowerShell.ConsoleHost.InputLoop and System.ConsolePal.TryGetCursorPosition. Compare the nested prompt and console state before and after the shell exits; done means returning to PowerShell without the Input/output error or FailFast crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100