question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation Fault on checking mujoco licences

See original GitHub issue

Hi 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
saran-tcommented, Jan 27, 2018

@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’t export it in your shell either.

1reaction
wookayincommented, Jan 13, 2018

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation fault (core dumped) with reinforcement learning ...
I was trying to simulate the reinforcement learning for cassie robot mujoco, https://github.com/CassieRL/cassierl.
Read more >
studywolf | a blog for things I encounter while coding and ...
a blog for things I encounter while coding and researching neuroscience, motor control, and learning.
Read more >
IJ18244: SEGMENTATION FAULT WHILE RUNNING JIT ... - IBM
Problem summary​​ Under certain specific conditions such an instruction was not inserted which caused other threads to see the value of a final...
Read more >
MuJoCo HAPTIX - Roboti LLC
MuJoCo HAPTIX only runs on Windows, even though the underlying MuJoCo Pro ... it will issue an error about missing license rather than...
Read more >
Package List — Spack 0.20.0.dev0 documentation
ca-certificates-mozilla, perl-test-differences, r-affyexpress ... failures and code errors that cause segmentation faults or other signals can be caught.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found