-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Crash dumps have shown that Runspace.Close() operation can crash a process if the final two runspaces of a session are closed at the same time. This is because a transcription may be closed/disposed by two separate threads, resulting in a IO or Disposed exception.
The Dispose method should be idempotent and if the underlying writer object is disposed or file is closed, the method should not throw.
The problem was found in Windows PowerShell, but the fix (wrap in try/catch) should be applied here as well.
Environment data
Name Value
---- -----
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime