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

Win Support for LocalProcessProxy #1396

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HighKeys
Copy link

@HighKeys HighKeys commented Nov 28, 2024

Hi,

As discussed in issue #1394 , I am submitting this Pull Request.

In the meantime, I managed to correctly link the win32_interrupt_event, resulting in a working patch. This implementation has been tested successfully on Windows Server 2019 and Windows 11.

Key Changes:

  1. Added the required environment variables in enterprise_gateway/services/kernels/handlers.py to provide users with an out-of-the-box experience.
  2. Linked the interrupt event for Windows in the LocalProcessProxy class.
    • This could potentially be refactored into the base class in the future. However, for now, I have implemented it in LocalProcessProxy, as I was only able to test local processes. I might be able to test RemoteProcessProxy soon.

Please let me know your thoughts on these changes or any adjustments you'd like to see.

Edit:

I initially made these changes to the PIP version of JEG and migrated them to the actual Git version, as I was not able to create an environment that runs the current Git version.

HighKeys and others added 2 commits November 28, 2024 14:14
Basic Windows support for LocalProcessProxy
@HighKeys
Copy link
Author

HighKeys commented Nov 30, 2024

I have encountered an issue with terminating the Kernel. While restarting the Kernel works fine, attempting to kill the Kernel results in the following error:

[I 241130 12:07:32 web:2271] 204 DELETE /api/kernels/84a3049b-0ccb-4bb6-9d80-03cccf4c8f4d (10.231.46.69) 1642.45ms [E 241130 12:07:32 base_events:1785] Exception in callback AddThreadSelectorEventLoop._handle_select([1820], []) handle: <Handle AddThreadSelectorEventLoop._handle_select([1820], [])> Traceback (most recent call last): File "C:\Program Files\Python311\Lib\asyncio\events.py", line 84, in _run self._context.run(self._callback, *self._args) File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 647, in _handle_select self._handle_event(r, self._readers) File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 661, in _handle_event callback() File "C:\Program Files\Python311\Lib\site-packages\tornado\platform\asyncio.py", line 206, in _handle_events handler_func(fileobj, events) File "C:\Program Files\Python311\Lib\site-packages\zmq\eventloop\zmqstream.py", line 571, in _handle_events zmq_events = self.socket.EVENTS ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\zmq\sugar\attrsettr.py", line 55, in __getattr__ return self._get_attr_opt(upper_key, opt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\site-packages\zmq\sugar\attrsettr.py", line 67, in _get_attr_opt return self.get(opt) ^^^^^^^^^^^^^ File "zmq\backend\cython\socket.pyx", line 482, in zmq.backend.cython.socket.Socket.get File "zmq\backend\cython\socket.pyx", line 138, in zmq.backend.cython.socket._check_closed zmq.error.ZMQError: Unknown error

The Kernel gets killed, but after that I'm not able to create a new one.

I am unsure where to start with resolving this issue and would appreciate any guidance or direction on how to proceed.

Thank you for your assistance.

Sign up for free to 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.

1 participant