Skip to content

WIP: Implement a safe wrapper around ILanguageServerAdapter to ensure messages are only sent after initialization - #1475

Closed
Rob Holt (rjmholt) wants to merge 2 commits into
PowerShell:masterfrom
rjmholt:safe-langserver
Closed

WIP: Implement a safe wrapper around ILanguageServerAdapter to ensure messages are only sent after initialization#1475
Rob Holt (rjmholt) wants to merge 2 commits into
PowerShell:masterfrom
rjmholt:safe-langserver

Conversation

@rjmholt

Copy link
Copy Markdown
Contributor

No description provided.

@andyleejordan

Copy link
Copy Markdown
Member

So it turns out this creates a deadlock here:

https://github.com/rjmholt/PowerShellEditorServices/blob/1d3e9da884bdd91ea3d33f88035b4a2a3e1d5824/src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs#L1888-L1893

The fix is in 1d3e9da

So with the additional logging in #1474 I've been able to rule out the executionStatusChanged notification as the cause of the deadlock. Still suspecting the runspaceChanged notification, but still testing...

@andyleejordan

Copy link
Copy Markdown
Member

The only news I really have is that when it doesn't repro, I never see the "runspace changed" notification. So our suspicion is half-proved?

@andyleejordan

Copy link
Copy Markdown
Member

Wait, Rob Holt (@rjmholt) I have info! When I get the issue to repro, it is always accompanied by:

Unexpected notification workspace/didChangeConfiguration {"Method":"workspace/didChangeConfiguration","Params":[[[[[[[[[]],[[]]]],[[]],[[]],[[]],[[]],[[]],[[[[]],[[]]]],[[]],[[]],[[]],[[[[]]]],[[]],[[]],[[[[]],[[]]]],[[[[]],[[]]]],[[[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]]]],[[[[]],[[]],[[]],[[]],[[]]]],[[[[]]]],[[[[]],[[]],[[]],[[]],[[]]]],[[[[]],[[]],[[]]]],[[[[]],[[]]]]]],[[[[[[]]]],[[[[]],[[]],[[]],[[]],[[]]]],[[[[]],[[]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[[]],[[]],[[]],[[]]]],[[]],[[]],[[]],[[]],[[]],[[[[]]]]]],[[[[[[]],[[]],[[]]]],[[]],[[]],[[]],[[]],[[]],[[[[]],[[]],[[null]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[[]],[[]],[[]]]],[[]]]]]]],"TraceParent":null,"TraceState":null,"$type":"Notification"}

@andyleejordan

Copy link
Copy Markdown
Member

Thanks for this Rob! Looks like we found the root issue elsewhere though, closing...

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rjmholt@andyleejordan