Pytorch 0.2 + jupyter notebook crash

I installed pytorch 0.2.0 in python 3.6 (Ubuntu 16.04). It works with command line and ipython in terminal, but when i import torch in jupyter notebook, jupyter kernel crashes. What makes it?

*** Error in `/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/bin/python’: free(): invalid pointer: 0x00007f6bb3a96b80 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f6c674b17e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f6c674ba37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f6c674be53c]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE+0x142)[0x7f6bb3830802]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt6locale5_ImplC2Em+0x1e3)[0x7f6bb3832953]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt6locale18_S_initialize_onceEv+0x15)[0x7f6bb38338c5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xea99)[0x7f6c67f22a99]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt6locale13_S_initializeEv+0x21)[0x7f6bb3833911]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt6localeC1Ev+0x13)[0x7f6bb3833953]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libshm.so(_ZNSt8ios_base4InitC1Ev+0xb4)[0x7f6bb38051b4]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61(+0x2f85b4)[0x7f6b83ef55b4]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61(+0x2f8703)[0x7f6b83ef5703]
/home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61(+0x393cc6)[0x7f6b83f90cc6]
======= Memory map: ========
00400000-00664000 r-xp 00000000 08:02 30676433 /home/dhlee/.pyenv/versions/3.6.2/bin/python3.6
00864000-00865000 r–p 00264000 08:02 30676433 /home/dhlee/.pyenv/versions/3.6.2/bin/python3.6
00865000-008c9000 rw-p 00265000 08:02 30676433 /home/dhlee/.pyenv/versions/3.6.2/bin/python3.6
008c9000-008fa000 rw-p 00000000 00:00 0
028d8000-03348000 rw-p 00000000 00:00 0 [heap]
7f6b7c000000-7f6b7c021000 rw-p 00000000 00:00 0
7f6b7c021000-7f6b80000000 —p 00000000 00:00 0
7f6b83bfd000-7f6b864ee000 r-xp 00000000 08:02 30936102 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61
7f6b864ee000-7f6b866ee000 —p 028f1000 08:02 30936102 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61
7f6b866ee000-7f6b86707000 rw-p 028f1000 08:02 30936102 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61
7f6b86707000-7f6b86718000 rw-p 00000000 00:00 0
7f6b86718000-7f6b8671d000 rw-p 0290b000 08:02 30936102 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcusparse-94011b8d.so.8.0.61
7f6b8671d000-7f6b88bb8000 r-xp 00000000 08:02 30936106 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcurand-3d68c345.so.8.0.61
7f6b88bb8000-7f6b88db8000 —p 0249b000 08:02 30936106 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcurand-3d68c345.so.8.0.61
7f6b88db8000-7f6b8a189000 rw-p 0249b000 08:02 30936106 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcurand-3d68c345.so.8.0.61
7f6b8a189000-7f6b8a693000 rw-p 00000000 00:00 0
7f6b8a693000-7f6b8a694000 rw-p 0386d000 08:02 30936106 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcurand-3d68c345.so.8.0.61
7f6b8a694000-7f6b8d4ac000 r-xp 00000000 08:02 30936089 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcublas-e78c880d.so.8.0.88
7f6b8d4ac000-7f6b8d6ac000 —p 02e18000 08:02 30936089 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcublas-e78c880d.so.8.0.88
7f6b8d6ac000-7f6b8d6ca000 rw-p 02e18000 08:02 30936089 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcublas-e78c880d.so.8.0.88
7f6b8d6ca000-7f6b8d6d9000 rw-p 00000000 00:00 0
7f6b8d6d9000-7f6b8d6dc000 rw-p 02e36000 08:02 30936089 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libcublas-e78c880d.so.8.0.88
7f6b8d6dc000-7f6b8d6f1000 r-xp 00000000 08:02 30936095 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libgomp-ae56ecdc.so.1.0.0
7f6b8d6f1000-7f6b8d8f0000 —p 00015000 08:02 30936095 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libgomp-ae56ecdc.so.1.0.0
7f6b8d8f0000-7f6b8d8f3000 rw-p 00014000 08:02 30936095 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libgomp-ae56ecdc.so.1.0.0
7f6b8d8f3000-7f6b903cb000 r-xp 00000000 08:02 30936087 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libnccl.so.1
7f6b903cb000-7f6b905cb000 —p 02ad8000 08:02 30936087 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libnccl.so.1
7f6b905cb000-7f6b905cc000 rw-p 02ad8000 08:02 30936087 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libnccl.so.1
7f6b905cc000-7f6b905ce000 rw-p 02ae4000 08:02 30936087 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libnccl.so.1
7f6b905ce000-7f6b94437000 r-xp 00000000 08:02 30936093 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libTHCUNN.so.1
7f6b94437000-7f6b94637000 —p 03e69000 08:02 30936093 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libTHCUNN.so.1
7f6b94637000-7f6b94646000 rw-p 03e69000 08:02 30936093 /home/dhlee/.pyenv/versions/3.6.2/envs/py3torch/lib/python3.6/site-packages/torch/lib/libTHCUNN.so.1

1 Like

me neither!!!
help!!!

:frowning_face::frowning_face::frowning_face::frowning_face::frowning_face::frowning_face::weary:

I fixed it with installing from source.

I have the same problem and I could not install from source :frowning::weary: Any other options? Reinstalled 0.1.12 now :frowning:

There is a workaround described here: https://github.com/pytorch/pytorch/issues/2314. Installing v0.2.0 with Anaconda also works.

i am using jupyter notebook in ibm datascientist workbench and facing the same issue. please help.

Hm ok as far as I saw most workarounds require sudo/admin rights? I don’t have them where I want to install it. Conda works without right so that could be an option?

Yes you can use the Conda installation and that works.