You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simpervisor defines its own atexit implementation to register signal handlers. The issue is that sets its own signal handler for SIGINT and SIGTERM "potentially" overriding any existing handlers.
An example use case when we use jupyter-server-proxy to start managed applications. It uses simpervisor behind the hood to supervise the proxy application. By the time simpervisor registers signal handlers, there are already existing handlers for sigint and sigterm by ServerApp. So, simpervisor overrides these handlers registered by ServerApp. This can be easily verified by running a JupyterLab instance with jupyter-server-proxy installed. Start a simple web server from JupyterLab using jupyter-server-proxy and then doing a Ctrl+C on the terminal that is running JupyterLab will shutdown the Lab immediately without the usual prompt of shutdown confirmation.
The signal handlers of the ServerApp cleans up the kernels and extensions before terminating itself. So, we lose this cleaning up tasks due to simpervisor overriding the handlers. We noticed on our JupyterHub deployment on our HPC platform that this can have a undesirable side effects of proxy processes lingering around even after ServerApp is killed.
Who would use this feature?
Anyone who is using simpervisor along with Jupyter ServerApp.
(Optional): Suggest a solution
Ensure that we register the existing signal handlers in _handlers list, if they exist.
The text was updated successfully, but these errors were encountered:
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Proposed change
Simpervisor defines its own atexit implementation to register signal handlers. The issue is that sets its own signal handler for
SIGINT
andSIGTERM
"potentially" overriding any existing handlers.An example use case when we use jupyter-server-proxy to start managed applications. It uses simpervisor behind the hood to supervise the proxy application. By the time simpervisor registers signal handlers, there are already existing handlers for sigint and sigterm by
ServerApp
. So, simpervisor overrides these handlers registered byServerApp
. This can be easily verified by running a JupyterLab instance withjupyter-server-proxy
installed. Start a simple web server from JupyterLab usingjupyter-server-proxy
and then doing a Ctrl+C on the terminal that is running JupyterLab will shutdown the Lab immediately without the usual prompt of shutdown confirmation.The signal handlers of the
ServerApp
cleans up the kernels and extensions before terminating itself. So, we lose this cleaning up tasks due to simpervisor overriding the handlers. We noticed on our JupyterHub deployment on our HPC platform that this can have a undesirable side effects of proxy processes lingering around even afterServerApp
is killed.Who would use this feature?
Anyone who is using
simpervisor
along with JupyterServerApp
.(Optional): Suggest a solution
Ensure that we register the existing signal handlers in _handlers list, if they exist.
The text was updated successfully, but these errors were encountered: