maxloo
December 9, 2023, 6:27pm
1
The original discussion was done at the Microsoft WSL Github issues page. I’ve extracted the relevant portion to highlight here:
opened 10:55AM - 03 Dec 23 UTC
GPU
### Windows Version
Microsoft Windows [Version 10.0.22631.2715]
### WSL Versio… n
2.0.9.0
### Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
### Kernel Version
5.15.133.1-1
### Distro Version
Ubuntu 22.04.3 LTS
### Other Software
- conda 23.7.4
- Cuda compilation tools, release 12.3, V12.3.103
- jupyter notebook --version 6.5.4
### Repro Steps
Run `test.bash` file in my Bash prompt:
```
#!/bin/bash
source /home/maxloo/anaconda3/bin/activate
conda create -n jupyter_env python=3.10.12
conda activate jupyter_env
pip install jupyter
pip install tensorflow[and-cuda]
chmod 0700 /run/user/1000/
source ~/.bashrc
```
This is my `.bashrc` file:
```
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/maxloo/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/maxloo/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/maxloo/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/maxloo/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
export PATH=/usr/local/cuda-12.3/bin${PATH:+:${PATH}}
if [ -z "${LD_LIBRARY_PATH}" ]; then
export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64
else
export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64:$LD_LIBRARY_PATH
fi
```
Run `jupyter notebook`.
### Expected Behavior
I expect the commands to run without freezing my PC.
### Actual Behavior
```
(base) maxloo@maxloolen:~/src$ jupyter notebook
_ _ _ _
| | | |_ __ __| |__ _| |_ ___
| |_| | '_ \/ _` / _` | _/ -_)
\___/| .__/\__,_\__,_|\__\___|
|_|
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.
https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html
Please note that updating to Notebook 7 might break some of your extensions.
[W 18:43:58.772 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.
[I 2023-12-03 18:43:58.774 LabApp] JupyterLab extension loaded from /home/maxloo/anaconda3/lib/python3.11/site-packages/jupyterlab
[I 2023-12-03 18:43:58.774 LabApp] JupyterLab application directory is /home/maxloo/anaconda3/share/jupyter/lab
[I 18:43:59.617 NotebookApp] Serving notebooks from local directory: /home/maxloo/src
[I 18:43:59.617 NotebookApp] Jupyter Notebook 6.5.4 is running at:
[I 18:43:59.617 NotebookApp] http://localhost:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
[I 18:43:59.617 NotebookApp] or http://127.0.0.1:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
[I 18:43:59.617 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:44:00.725 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/maxloo/.local/share/jupyter/runtime/nbserver-443-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
or http://127.0.0.1:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
D3D12: Removing Device.
Segmentation fault
^C[I 18:46:17.607 NotebookApp] interrupted
Serving notebooks from local directory: /home/maxloo/src
0 active kernels
Jupyter Notebook 6.5.4 is running at:
http://localhost:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
or http://127.0.0.1:8888/?token=82daf94b0c4d2ddb499b25363f67000303745643828af953
Shutdown this notebook server (y/[n])? y
[C 18:46:19.297 NotebookApp] Shutdown confirmed
[I 18:46:19.298 NotebookApp] Shutting down 0 kernels
[I 18:46:19.298 NotebookApp] Shutting down 0 terminals
```
After running the command `jupyter notebook`, the PC first freezes or hangs for about 60 seconds at `or http://127.0.0.1:8888/?token=5876094fc4c46acae1fa646ad71b32d84e941db7b44c2bf5`.
Then, `D3D12: Removing Device.` is displayed, and then the PC next freezes for another about 60 seconds.
Then, `Segmentation fault` is displayed. Then, everything unfreezes and works again.
### Diagnostic Logs
This is the text of the logs of earlier and similar errors which I copied from the error events in Windows Events Viewer:
- https://github.com/maxloosmu/tf-keras/blob/main/TF_2_Notebooks_and_Data/05-RNNs/links/troubleshoot%20nvidia/application%20and%20system%20error%20logs.txt
This is the zip file for the error logs:
- https://github.com/maxloosmu/tf-keras/blob/main/TF_2_Notebooks_and_Data/05-RNNs/links/troubleshoot%20nvidia/WslLogs-2023-12-03_18-43-44.zip
Why does the command jupyter notebook
in WSL2 Bash open up another calibre ebook related window and waits at this output statement:
[843:7:1206/223502.542144:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
Currently, my workaround is simply to close the calibre ebook related window, but it would be good to know if there are other workarounds that can stop the calibre ebook window from opening up when I run jupyter notebook
from Bash, if it will not affect the proper functioning of calibre ebook as started from Bash separately by running calibre
.