ray
ray copied to clipboard
[Bug] core_driver.log leaks when log_to_driver=False
Search before asking
- [X] I searched the issues and found no similar issues.
Ray Component
Ray Core
What happened + What you expected to happen
After running ray.init(log_to_driver=False), then ray.shutdown(), the ray driver logs remain open, when they are expected to be closed. See screenshot:

Versions / Dependencies
ray==1.9.0 python==3.8.8 psutil==5.6.6
OS: macOS 12
Reproduction script
import ray
import psutil
p = psutil.Process()
ray.init(log_to_driver=False)
ray.shutdown()
print(p.open_files())
Anything else
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Hi, I'm a bot from the Ray team :)
To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.
If there is no further activity in the 14 days, the issue will be closed!
- If you'd like to keep the issue open, just leave any comment, and the stale label will be removed!
- If you'd like to get more attention to the issue, please tag one of Ray's contributors.
You can always ask for help on our discussion forum or Ray's public slack channel.
@jeffreykennethli, does the issue still persist?
Hi, I'm a bot from the Ray team :)
To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.
If there is no further activity in the 14 days, the issue will be closed!
- If you'd like to keep the issue open, just leave any comment, and the stale label will be removed!
- If you'd like to get more attention to the issue, please tag one of Ray's contributors.
You can always ask for help on our discussion forum or Ray's public slack channel.
stub
I think this is still an issue. @rkooo567 should triage when you get the time.
Hmm actually I think this is an intended behavior. The file is open because we are writing cpp logs from driver core worker.