-
Notifications
You must be signed in to change notification settings - Fork 308
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
Exceptions when spawning process(es) with multiprocessing
#1198
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
@jacobtomlinson or @ian-r-rose have you seen errors like this before with jupyter server ? |
Temporary solution for jupyter-server/jupyter_server#1198
To add one more data point, it seems that some change in |
This could be related to ipython/ipykernel#1078. |
I just ran through the reproducer with |
Great, thanks for letting us know! |
I can still reproduce with @jacobtomlinson could you check if you follow the same steps as described in the reproducer, particularly the "save" part? When I was debugging that I noticed that without saving the notebook it wouldn't reproduce, thus why I added that step specifically. I'm reopening this for now, but please let me know if I'm missing something or if I should provide additional information. |
Seems I can't reopen the issue, could you reopen it @blink1073 ? |
Yup sorry @pentschev is right it turns out I can reproduce it still. @blink1073 could you reopen? I think the difference was clicking the |
I'm also running into a similar error when creating a Setting I think
|
Okay, it looks like there are two problems. I tried the original repro with the latest versions and tried reverting recent commits in If I revert ipython/ipykernel#1055 I get the It sounds like we need to add a test in |
Can confirm that downgrading At the same time,
|
I confirm downgrading ipykernel<6.21 solved my problem.
|
CC @Carreau as author of ipython/ipykernel#1078 (see #1198 (comment) and in jupyterlab/jupyterlab#13970 (comment) where we got a confirmation that adding I wonder if we should use |
I'm trying to make a test that fails on Ubuntu in ipython/ipykernel#1094, so far no luck. |
Okay, so ipython/ipykernel#1078 is the only real issue, if I revert that then it works in the docker image. I still don't know how to properly recreate the error from ipykernel's tests though. |
@meeseeksdev please migrate to ipython/ipykernel |
I'm afraid I can't do that. Maybe I need to be installed on target repository ? |
I'd like to avoid We can maybe take a peak at the filename , and set |
See jupyter-server/jupyter_server#1198, setting __file__ will break multiprocessing.
Thanks all for the discussion here and @Carreau for the fix, I've manually applied ipython/ipykernel#1095 and tested locally both the minimal |
As per jupyter-server/jupyter_server#1198 ipykernel version 6.21.0, 6.21.1 were broken when running with multiprocessing module. As of 6.21.2 this is now fixed by ipython/ipykernel#1095 .
Description
Running code that relies on spawning new processes with the
multiprocessing
library raises exceptions duringrunpy.run_path
. This was initially discovered when running a Dask-CUDA cluster that spawns workers as multiple processes and is commonly used in Jupyter. Such errors are also minimally reproducible usingmultiprocessing
only.Rolling back several versions, I could not reproduce the error on
jupyter_server=1.18.1
, butjupyter_server=1.19.1
and above would already reproduce variations of the same error. For example, withjupyter_server=2.0.0
:Reproduce
docker run -t -i -p 8888:8888 continuumio/miniconda3 /bin/bash
conda create -n jlab-test --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab
;conda activate jlab-test
;jupyter-lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root
(--allow-root
should be skipped if not running on docker);Expected behavior
Spawning processes with
multiprocessing
should pass successfully without exceptions inrunpy.run_path(...)
.Context
Troubleshoot Output
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: