Ubuntu 20.04 libpython3.7m.so.1.0 error + segmentation fault

Hi,

Really happy to see the release of Isaac Gym, thank you to the team.

I did an installation following the instructions. I am running Ubuntu 20.04 that natively comes with Python 3.8. I am running an Anaconda environment installed as per the instructions, however, when running the first example python joint_monkey.py, i get the following error:

(rlgpu) robotlab@robotlab-p15:~/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/examples$ python joint_monkey.py 
Importing module 'gym_37' (/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_37.so)
Traceback (most recent call last):
  File "joint_monkey.py", line 19, in <module>
    from isaacgym import gymapi, gymutil
  File "/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/__init__.py", line 5, in <module>
    from isaacgym import gymapi
  File "/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/gymapi.py", line 104, in <module>
    _import_active_version()
  File "/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/gymapi.py", line 63, in _import_active_version
    module = importlib.import_module(package_path)
  File "/home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

It doesn’t properly link to the environment lib, so I added the following to be able to run the example
export LD_LIBRARY_PATH=/home/robotlab/anaconda3/envs/rlgpu/lib/

Running the example now leads to a segmentation fault as shown below, which seems similar to another topic:

DOF 20
  Name:     'left_elbow'
  Type:     Rotation
  Stiffness:  2.0
  Damping:  1.0
  Armature:  0.006
  Limited?  True
    Lower   -1.570796
    Upper   0.872665
Creating 36 environments
Animating DOF 0 ('abdomen_z')
Segmentation fault (core dumped)

Any suggestions on where to go from here? Is it properly tested in Ubuntu 20.04, I read it should be supported?

I also get a segmentation fault on the cartpole example. Sorry, it does not give much information, here is the terminal output nbelow. I will try with Ubuntu 18.04.

(rlgpu) robotlab@robotlab-p15:~/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/rlgpu$ python train.py --task=Cartpole
Importing module 'gym_37' (/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_37.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 1.7.0
Device count 1
Current device 0
/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/src/gymtorch
Using /home/robotlab/.cache/torch_extensions as PyTorch extensions root...
Creating extension directory /home/robotlab/.cache/torch_extensions/gymtorch...
Emitting ninja build file /home/robotlab/.cache/torch_extensions/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF gymtorch.o.d -DTORCH_EXTENSION_NAME=gymtorch -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/torch/include -isystem /home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/torch/include/TH -isystem /home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/torch/include/THC -isystem /home/robotlab/anaconda3/envs/rlgpu/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DTORCH_MAJOR=1 -DTORCH_MINOR=7 -c /home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/src/gymtorch/gymtorch.cpp -o gymtorch.o 
[2/2] c++ gymtorch.o -shared -L/home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o gymtorch.so
Loading extension module gymtorch...
Importing module 'rlgpu_37' (/home/robotlab/Downloads/IsaacGym_Preview_1_Package/isaacgym/python/isaacgym/_bindings/linux-x86_64/rlgpu_37.so)
Horovod not installed! Continuing with single-GPU training.
Python GPU
[Warning] [carb.gym.plugin] useGpuPipeline is set, forcing GPU PhysX
Not connected to PVD
+++ Using GPU PhysX
/home/robotlab/anaconda3/envs/rlgpu/lib/python3.7/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
  warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Sequential(
  (0): Linear(in_features=4, out_features=256, bias=True)
  (1): SELU()
  (2): Linear(in_features=256, out_features=128, bias=True)
  (3): SELU()
  (4): Linear(in_features=128, out_features=64, bias=True)
  (5): SELU()
  (6): Linear(in_features=64, out_features=1, bias=True)
)
Sequential(
  (0): Linear(in_features=4, out_features=256, bias=True)
  (1): SELU()
  (2): Linear(in_features=256, out_features=128, bias=True)
  (3): SELU()
  (4): Linear(in_features=128, out_features=64, bias=True)
  (5): SELU()
  (6): Linear(in_features=64, out_features=1, bias=True)
)
Segmentation fault (core dumped)

Just tested in Ubuntu 18.04.

Still need to add: export LD_LIBRARY_PATH=/home/robotlab/anaconda3/envs/rlgpu/lib/

but I do not get a segmentation fault here, and the simulations run.

Can you make sure that you have working Vulkan drivers on your 20.04 system?

You can run vulkaninfo and validate that you have the NVIDIA driver showing under VkPhysicalDeviceDriverProperties.

Take care,
-Gav

2 Likes

Hi Gav,

That was it. It actually listed two drivers/devices

VkPhysicalDeviceDriverProperties:
---------------------------------
	driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
	driverName         = NVIDIA
	driverInfo         = 455.38
	conformanceVersion = 1.2.2.1

and

VkPhysicalDeviceDriverProperties:
---------------------------------
	driverID           = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
	driverName         = Intel open-source Mesa driver
	driverInfo         = Mesa 20.0.8
	conformanceVersion = 1.2.0.0

After forcing it to use the NVIDIA card with export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json it is working now, hurray :)
Totally missed that in the troubleshooting section.

Thanks a lot.

5 Likes

Great! Glad to help!

Take care,
-Gav

1 Like