PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Verify the main runspace reset method in the PSES pipeline thread consumer

Open rjmholt opened this issue 4 years ago • 1 comments

We have a kind of primitive stab at a method to clean up a faulty runspace state in the PSES pipeline thread consumer here:

https://github.com/PowerShell/PowerShellEditorServices/blob/9fd0dfa58438a9ba2b2d3cdfe22cd9cad5df70b0/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs#L784-L826

We need to induce a fault and see if this works as expected, as well as ensure it doesn't run at other times...

My suspicion is that it will need some refinement and could have some significant bugs in it. But it's currently a corner case and a worse-case scenario handler anyway (if it didn't exist, we are essentially crashed).

So we need to investigate this and see how we can improve:

  • detection of bad runspace state
  • restoration of good runspace state
  • how our threading mechanisms work in this scenario...

rjmholt avatar Oct 26 '21 22:10 rjmholt

We should consider this for telemetry. @StevenBucher98

andyleejordan avatar Jan 20 '22 00:01 andyleejordan