Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application appears to hang when running code after Closing current session #186

Closed
Becky-Williamson opened this issue Mar 22, 2023 · 4 comments
Assignees
Labels
bug Something isn't working testing-complete Complete the pull requests testing
Milestone

Comments

@Becky-Williamson
Copy link

Steps to reproduce:

  1. Connect to 9.4 via ssh connection.
  2. Run code that creates a table in the WORK library (data test; set sashelp.class; run;)
  3. Run code that prints the contents of the table in the WORK library (proc print data=test; run;)
  4. Click the icon to Close current session.
  5. Run the code in step 3 again.

Expected results:
I would expect to get an error, either than I wasn't connected or, if it reconnects on run, that the table doesn't exist.

Actual results:
No entry is made in the log and the notification in the bottom right corner just continues to say SAS code running. I let it go for about a half hour and it never finished. I had to restart VS Code to get out of it.

Found while testing pull request #160

@Becky-Williamson Becky-Williamson added the bug Something isn't working label Mar 22, 2023
@Becky-Williamson
Copy link
Author

NOTE: When connected to Viya, the application automatically reconnects to the session and the code runs with no errors.

@2TomLi 2TomLi assigned smorrisj and unassigned clangsmith and 2TomLi Mar 22, 2023
@2TomLi 2TomLi added this to the 0.1.3 milestone Mar 22, 2023
@smorrisj
Copy link
Contributor

Working with @Becky-Williamson to reproduce. I'm in the process of building an instrumented version of the ssh connection code to isolate where the hang is occurring. I'm unable to rep locally or when building a vsce package and side loading on a windows virtual machine.

@smorrisj
Copy link
Contributor

smorrisj commented Mar 23, 2023

I was able to identify the issue. Calling stream.end("exit") was creating a case where if there is non-trivial latency on the ssh connection to the server, that it's possible that the connection has not fully closed on both sides before the setup function was invoked again when pressing the run button.

We should update the close implementation to use stream.close() instead. The onClose listener is responsible for closing the connection itself.

Fixed on #160

@Becky-Williamson Becky-Williamson added testing Test the pull requests testing-complete Complete the pull requests testing and removed verification-needed testing Test the pull requests labels Mar 23, 2023
@smorrisj
Copy link
Contributor

Fix verified on #160. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing-complete Complete the pull requests testing
Projects
None yet
Development

No branches or pull requests

4 participants