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

Dynamic Services are shut down in an open study when second tab with a second study is closed #2994

Closed
mrnicegyu11 opened this issue Apr 21, 2022 · 4 comments
Assignees
Labels
bug buggy, it does not work as expected

Comments

@mrnicegyu11
Copy link
Member

mrnicegyu11 commented Apr 21, 2022

Long story short

When you have oSparc open in two browser tab and close one, also the services corresponding to the project opened in the second tab will be closed. This results in the "Server Connection Error" in JupyterNotebooks

Please not that @GitHK and me investigated the garbage-colelctor logs, and the gargabe collector is not involved or responsible for this bug. @GitHK recons that likely a on_user_logout socket.io event is involved.

Expected behaviour

Closing a tab does not affect a second study open in a second tab

Actual behaviour

Closing a second tab affects unrelated studies of a user --> Dynamic Services (Jupyters) are (gracefully) shut down

Steps to reproduce

  • Open two projects in two browser tabs (no need to duplicate tab)
  • Add a jupyter to each of them, open it
  • Close one tab (forcefully) by pressing the "X" button in the browser
  • Wait for the redis TTL timeout
  • See that in the second (still open) tab, the jupyter will display "Server connection error", because it was shut down

Your environment

  • This was tested on dalco-production deployment

reported by @Konohana0608

@mrnicegyu11 mrnicegyu11 added the bug buggy, it does not work as expected label Apr 21, 2022
@mrnicegyu11 mrnicegyu11 changed the title Dynamic Services close when second tab is closed Dynamic Services are shut down in an open study when second tab with a second study is closed Apr 21, 2022
@sanderegg
Copy link
Member

@mrnicegyu11, @GitHK: will need a hand on this one.

  1. I could not reproduce it using jupyerlab 2.0.5
  2. how can a service be removed without the garbage collector being involved? on_user_logout does not trigger any direct project close mechanism but just removes the key from the redis DB, so that the GC can clean up the projects. And pressing X does not trigger user logout.

@GitHK
Copy link
Contributor

GitHK commented May 4, 2022

To make sure let's also ask @odeimaiz on how to reproduce this, as he managed to do it once.

@sanderegg
Copy link
Member

this entry is one year old, and no one seems to be able to reproduce it. please close it
@mrnicegyu11 @odeimaiz or @GitHK

@GitHK
Copy link
Contributor

GitHK commented May 18, 2023

Just tested this on master, as instructed by the use case. Everything works as expected. I will close the issue.
If still present, please reopen it and update the case with your findings @mrnicegyu11 @odeimaiz

@GitHK GitHK closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug buggy, it does not work as expected
Projects
None yet
Development

No branches or pull requests

5 participants