-
Notifications
You must be signed in to change notification settings - Fork 8
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
Async kernel launch fails on Windows #31
Comments
Hi Kevin, a few comments/questions
PS: What is the markdown syntax you use to create those lists where items you can opened/closed? |
@echarles - thanks for digging into this.
The twisty expansion stuff (can never remember the term) is performed using straight html that wraps the contained markdown in a "details/paragraph" thing. From above, here's the header...
then regular markdown . Be sure there's a blank link between the header and the markdown. Then cap things off with the "footer".
|
Ugh. The tricky bit with using the non-asyncio Popen is that the I guess a workaround would be to have one thread waiting for each child process, ready to pass the information back to the event loop in the main thread. But that's kind of ugly. |
I think keeping it simple is more important. Wait is only used to cleanup after a kill/shutdown - correct? I never encountered issues with the way things worked previously, have you? Your concern is that a kernel is shutdown, no longer active, and then wait() blocks forever? |
The way things are currently implemented, I think it's very unlikely to get stuck in a wait. But:
Maybe the best option is to do this nicely on Unix (possibly with the asyncio child watcher interface), and have a wait() implementation that polls subprocesses on Windows. |
yeah, I'll get something working on Windows, then look at "ifdef-ing" for windows. The sync wait does take a timeout, so I think just hard-coding something small - 1 or 2 seconds - and logging a warning on timeout - probably wouldn't be the end of the world. |
The asynchronous support changes are causing issues on Windows. Regardless of which event loop is used, we wind up encountering different
NotImplementedError
exceptions. I have focused on Python 3.7 - since we fail even sooner on Python 3.5 and 3.6. Below are the test failures for a single test (test_start_new_kernel
) which triggers a launch. All launch-related tests fail with the same issue(s). I can't determine if there are follow-on issues once this issue gets resolved.event loop: WindowsSelectorEventLoop (default)
When the WindowsSelectorEventLoop is used, either explicitly or by default, the call to
asyncio.create_subprocess_exec()
fails when calling the internal method_make_subprocess_transport()
.event loop: WindowsProactorEventLoop
Results when WindowsProactorEventLoop is used, by explicitly configuring the event loop policy via
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
, the launch completes, but we fail to setup the kernel client instance since the instantiation ofIOLoopKernelClient
fails because the ProactorEventLoop doesn't implementadd_reader()
.Since we know kernels can be launched synchronously using the standard subprocess module on Windows and can visually confirm the
WindowsSelectorEventLoop
implementsadd_reader()
- which is also backed by the fact that sync kernel launches work, its probably in our best interest to try to use the standard subprocess module for kernel launches withWindowsSelectorEventLoop
.Also, because asyncio switches the default event loop to
WindowsProactorEventLoop
in python 3.8, we'll want to go ahead and "pin" the selector event loop until a better solution is found.The text was updated successfully, but these errors were encountered: