question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error message on ray init when run inside Jupyter: setpgrp failed, processes may not be cleaned up properly

See original GitHub issue

What is the problem?

Ray version and other system information (Python version, TensorFlow version, OS):

Ray 0.8.0 Python 3.6 Ubuntu 18.04

Does the problem occur on the latest wheels?

Yes, with ray-0.9.0.dev0.

Reproduction

Please provide a script that can be run to reproduce the issue. The script should have no external library dependencies (i.e., use fake or mock data / environments):

If we cannot run your script, we cannot fix your issue.

I am running juypyterlab 1.2.4 within docker, using an 18.04 base image. To reproduce, simply import ray and call ray.init.

import ray
ray.init()

And the error message will be generated.

2020-01-06 17:54:50,339	WARNING services.py:595 -- setpgrp failed, processes may not be cleaned up properly: [Errno 1] Operation not permitted.

PID, PGID, PPID, and SID all have the same value in this case. Outside of Jupyter, this error does not occur.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
edoakescommented, Jan 24, 2020

ray stop is a bash command and will stop all ray processes running on the machine (started by ray.init() in python or ray start on the command line.

ray.shutdown() will stop all ray processes started by a previous ray.init() call in the current python process.

1reaction
edoakescommented, Jan 14, 2020

Thanks for reporting this @mc-allen. After looking into this a bit, I was only able to reproduce in jupyterlab and unfortunately am not able to find a workaround.

This shouldn’t cause any significant problems, it just means that if the python process that called ray.init() (the jupyter notebook in this case) is terminated via SIGKILL, there may be some background processes left up. If this does happen for some reason, you can always clean these processes up manually using ray stop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ray library throws "setpgrp failed" error - Stack Overflow
I am the new with Ray library, when I execute it, I caught some errors ... setpgrp failed, processes may not be cleaned...
Read more >
Working with Jupyter Notebooks & JupyterLab — Ray 2.2.0
This document describes best practices for using Ray with Jupyter Notebook / JupyterLab. We use AWS for the purpose of illustration, but the...
Read more >
How to Fix Kernel Error in Jupyter Notebook
A kernel error occurs basically when you try opening a python 3 file in the wrong directory. The truth is Jupyter and Python...
Read more >
All NetBSD Packages
Please select an entry for more details! 0verkill-0.16nb1: 0verkill is bloody 2D action deathmatch-like game in ASCII-ART; 2048-cli-0.9.1: The ...
Read more >
Browse Portage - Gentoo Linux Howtos
454116, Applications, xmw, UNCONFIRMED, net-ftp/oftpd does not respect ... x11-base/xorg-server on hardened - X exits fatally upon failure to enable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found