ray: AssignProcessToJobObject() failed in ray.init()
Search before asking
- I searched the issues and found no similar issues.
Ray Component
Ray Core
What happened + What you expected to happen
When starting ray.init() from terminal - both in Run and Debug mode, the following exception is thrown:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
return func(*args, **kwargs)
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\worker.py", line 908, in init
_global_node = ray.node.Node(
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\node.py", line 235, in __init__
self.start_ray_processes()
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\node.py", line 947, in start_ray_processes
self.start_raylet(plasma_directory, object_store_memory)
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\node.py", line 808, in start_raylet
process_info = ray._private.services.start_raylet(
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\_private\services.py", line 1642, in start_raylet
process_info = start_ray_process(
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\_private\services.py", line 665, in start_ray_process
ray._private.utils.set_kill_child_on_death_win32(process)
File "C:\Users\python_venvs\gem_dl\lib\site-packages\ray\_private\utils.py", line 796, in set_kill_child_on_death_win32
raise OSError(ctypes.get_last_error(),
OSError: [Errno 0] AssignProcessToJobObject() failed
Versions / Dependencies
ray==1.9.2
Python 3.8.10
Windows 10
Reproduction script
Reproduction (REQUIRED) In a python terminal run this:
import ray
ray.init()
Anything else
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (12 by maintainers)
I can also confirm that I faced the mentioned issue when using Python 3.10 from the Microsoft Store.
By downloading Python 3.10 from the official website, I was able to use Ray without any problem (so far).
I’m running on a local install.
I checked again on the logs. They are located in (with different logs for various datetimes, but they’re all the same in content): ‘C:\Users_________\AppData\Local\Temp\ray\session_2023-08-23_12-47-44_328823_34212\logs.…’
All the log files are empty apart from gcs_server.out. Here’s the content:
\AppData\Local\Temp\ray\session_2023-08-23_12-47-44_328823_34212\logs\gcs_server.out
I also ran the step-by-step you’ve provided;
The install ran without issues, but the last line returned the error OSError: [Errno 0] AssignProcessToJobObject() failed.
Thanks for the info. Reopening.