Segmentation Fault on checking mujoco licences
See original GitHub issueHi all, thanks for open-sourcing such a great toolkit! I would like to share and report a bug or issue in which segmentation fault occurs, which might also be happening for others.
>>> from dm_control import suite
>>> env = suite.load(domain_name="cartpole", task_name="swingup")
[1] 28081 segmentation fault (core dumped) python
I found that it happens during verifying the mujoco license, say when we call _maybe_register_license()
(and mjlib.mj_activate
).
stacktrace on gdb:
#0 0x0000000000017946 in ?? ()
#1 0x00007ffff0a84fff in mjl_check () from $HOME/.mujoco/mjpro150/bin/libmujoco150.so
#2 0x00007ffff0a4c013 in mjl_activate () from $HOME/.mujoco/mjpro150/bin/libmujoco150.so
#3 0x00007ffff0a30e4d in mj_activate () from $HOME/mujoco/mjpro150/bin/libmujoco150.so
...
So the segfault happens when mj_activate
from libmujoco150.so
is invoked. I think it might be a problem of mujoco, not of this package; but maybe something can be wrong with auto-wrapping via ctypes. Plus, the test (python setup.py test
) also fails with the same segmentation fault.
It happened on a linux 64bit machine (Ubuntu 14.04), with python 3.6 (anaconda) and 2.7.
I verified that mjkey.txt
exists and the liecense worked well with mujoco C++ samples and OpenAI’s mujoco-py
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:13 (3 by maintainers)
@wookayin I believe you suspected right: this seems most likely an issue with glibc ABI version conflict between Anaconda and the old Ubuntu system library.
As a workaround, I’ve managed to get the demo script to run (in python 2.7) by:
apt-get install libxml2 libxslt1.1
LD_PRELOAD=libstdc++.so.6:libxslt.so.1:libexslt.so.0:libxml2.so.2 python my_script.py
Obviously this is a very hacky workaround. It might result in another crash elsewhere. It might lead to a subtle problem that doesn’t result in a crash. YMMV.
*PS: Don’t add the
LD_PRELOAD
to your.bashrc
. Preferably, don’texport
it in your shell either.I highly suspect that it might be a glibc compatibility issue. Ubuntu 14.04 and RHEL systems have very old version (say 2.19 and 2.17, respectively), and it doesn’t happen in 16.04 (with glibc 2.23).