Segmentation fault when running bin/simulate on ubuntu 16.04

Discussion in 'MuJoCo Pro Bug Reports' started by Keven Wang, Oct 15, 2017.

  1. Hi, I'm getting a segmentation fault when running bin/simulate on ubuntu 16.04. Any idea? How could I provide more debugging information?

    ~/.mujoco/mjpro150/bin$ gdb ./simulate
    MuJoCo Pro library version 1.50
    Segmentation fault (core dumped)

    # gdb output

    Program received signal SIGSEGV, Segmentation fault.
    __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
    31 ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or directory.
    (gdb) bt
    #0 __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
    #1 0x00007ffff732c51b in chooseFBConfig () from
    #2 0x00007ffff732dc5c in _glfwChooseVisualGLX () from
    #3 0x00007ffff7328e50 in _glfwPlatformCreateWindow () from
    #4 0x00007ffff7320193 in glfwCreateWindow () from
    #5 0x0000000000401f66 in main ()
    Last edited: Oct 15, 2017
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    MuJoCo 1.50 is compiled with AVX instructions, so you need a processor with AVX support. Could it be that you are using a very old processor? The error messages mention SSE2, which makes me think that might be the problem.
  3. Hi Emo, I'm using an intel core i7-7700K CPU, so I don't think it's an old processor problem.

    I do have NVidia 1080ti GPU installed.

    How could I provide more debugging information?
    Last edited: Oct 16, 2017
  4. I have the same issue no matter which versions(1.31, 1.40, 1.50) to try. BYW, my system is Ubuntu 16.04, 1080 Ti GPU, Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz.
  5. Emo Todorov

    Emo Todorov Administrator Staff Member

    It looks like the error is triggered by something in the GLFW library. There is a pre-compiled version of libglfw that comes with the MuJoCo Pro distribution. Can you make sure you are using that version? Download MuJoCo Pro again, put your mjkey.txt in the bin directory, cd to the bin directory, and type:

    > LD_LIBRARY_PATH=. ./simulate

    If you still get the error, maybe GLFW needs to be compiled on your system... so try to install it from the official source and run MuJoCo with your version.

    You are both using a newer system so in principle something could have changed in the NVidia drivers/hardware, but I am also using a newer system (i9-7900X, Quadro P5000, Ubuntu 17.04) and not seeing this issue... although I guess the video drivers are different for GTX and Quadro cards.
  6. I compiled and installed GLFW manually, but still getting the same error.

    I ran a tiny .cpp example given on glfw website, and got the same segmentation fault error. Opened this bug on glfw:

    Any other idea to try?
  7. Emo Todorov

    Emo Todorov Administrator Staff Member

    The error is apparently triggered by glfwCreateWindow, so you could make your example much smaller - just create a window and exit.

    Reading online about __strcmp_sse2_unaligned() errors, people suspect that it is due to calling it with a NULL pointer. Not clear if this is the case here, but if it is, maybe there is a bug in GLFW which was only recently exposed due to some change in libc or some other low-level library.

    Which versions of the GNU C libraries are you using? Could you try a different version?

    The other option would be to debug GLFW and fix it, but this is better done by the GLFW developers, and on top of that I don't know how to reproduce the error on my system...

    Actually I have one more debugging idea involving an unofficial executable -- see private message.
  8. For GNU C library I'm using

    $ ldd --version
    ldd (Ubuntu GLIBC 2.23-0ubuntu9) 2.23
  9. Emo Todorov

    Emo Todorov Administrator Staff Member

    Same on my system. So it could be a video driver issue...