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

Orion server crashes on windows because of event loop #8111

Closed
4 tasks done
EmilRex opened this issue Jan 9, 2023 · 8 comments
Closed
4 tasks done

Orion server crashes on windows because of event loop #8111

EmilRex opened this issue Jan 9, 2023 · 8 comments
Labels
arch:windows Related to the Windows OS bug Something isn't working needs:details Blocked by a need for more info from user

Comments

@EmilRex
Copy link
Contributor

EmilRex commented Jan 9, 2023

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Prefect documentation for this issue.
  • I checked that this issue is related to Prefect and not one of its dependencies.

Bug summary

Running prefect orion start on a Windows machine results in an exception from Python's asyncio library related to the event loop. The underlying issue is documented in this StackOverflow post. The behavior is documented in this Community Slack post.

Reproduction

prefect orion start

Error

image (3)

Versions

image (2)

Additional context

No response

@EmilRex EmilRex added bug Something isn't working arch:windows Related to the Windows OS status:triage labels Jan 9, 2023
@zanieb
Copy link
Contributor

zanieb commented Jan 9, 2023

@EmilRex please use text instead of screenshots, this content is not searchable now.

Is this definitely Python 3.9 and not 3.7? The default event loop changed in 3.8 to one that supports subprocesses. https://docs.python.org/3/library/asyncio-platforms.html#asyncio-windows-subprocess

@EmilRex
Copy link
Contributor Author

EmilRex commented Jan 9, 2023

@madkinsz Will do! Already requested the text from the user.

Is this definitely Python 3.9 and not 3.7?

I don't know for sure, but I can see that prefect version was run immediately before prefect orion start in the same terminal session, so I expect that it is:

image (4)

@EmilRex
Copy link
Contributor Author

EmilRex commented Jan 9, 2023

^ This was after we asked the user to reproduce with v2.7.7

@peytonrunyan
Copy link
Contributor

peytonrunyan commented Jan 11, 2023

Additional context from the thread:

Hi @Emil Christensen.
I was able to get past and reproduce the issue. To get past the issue, I had to do the following. 1. Delete the file in C:\Users<user_name>\AppData\Roaming\Python. 2. Comment the code: @flow #(task_runner=DaskTaskRunner()). To reproduce the issue, all I have to do is uncomment the DaskTaskRunner. I agree its an issue running the DaskTaskRunner on Windows.

This issue appears to be a compatibility issue with the DaskTaskRunner on windows. I'll try to replicate in the morning.

cc'ing @ahuang11 since this is Dask related.

@peytonrunyan peytonrunyan self-assigned this Jan 11, 2023
@zanieb
Copy link
Contributor

zanieb commented Jan 11, 2023

Why is flow code involved at all if this error is supposed to be from running prefect orion start?

@EmilRex
Copy link
Contributor Author

EmilRex commented Jan 11, 2023

Why is flow code involved at all if this error is supposed to be from running prefect orion start?

I think it's a separate issue, but am not completely sure.

@zanieb zanieb added the needs:details Blocked by a need for more info from user label Jan 13, 2023
@zanieb
Copy link
Contributor

zanieb commented Jan 19, 2023

I think this is related to general issues we're seeing with the event loop policy on Windows; see #8184

@zhen0
Copy link
Member

zhen0 commented Mar 30, 2023

Closing in favor of #8206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:windows Related to the Windows OS bug Something isn't working needs:details Blocked by a need for more info from user
Projects
None yet
Development

No branches or pull requests

4 participants