You are not logged in.

#1 2018-02-25 12:40:45

eyelash
Member
Registered: 2018-02-25
Posts: 2

libGLX_nvidia segfault when running OpenCL-OpenGL program with optirun

Hi, I am trying to run pyopencl example gl_interop_demo.py from https://github.com/inducer/pyopencl/tre … r/examples to test OpenCL-OpenGL interoperability.
The command I am using is the following:

optirun python2 gl_interop_demo.py

I get a segfault in libGLX_nvidia.so: here is the dmesg output

[   66.748660] bbswitch: enabling discrete graphics
[   67.097399] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[   67.097678] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.25  Wed Jan 24 20:02:43 PST 2018 (using threaded interrupts)
[   67.685037] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.25  Wed Jan 24 19:29:37 PST 2018
[   67.685604] nvidia-modeset: Allocated GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   67.685772] nvidia-modeset: Freed GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   67.770683] nvidia-modeset: Allocated GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   67.771017] nvidia-modeset: Freed GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   68.826435] nvidia-modeset: Allocated GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   68.826630] nvidia-modeset: Freed GPU:0 (GPU-46d4196a-848e-88cc-f2ea-862786ea48f0) @ PCI:0000:01:00.0
[   68.910675] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 238
[   68.940071] python2[2043]: segfault at ffffffffd2b3a988 ip 00007f9e884eac85 sp 00007ffd1dd3d330 error 5 in libGLX_nvidia.so.390.25[7f9e8849a000+c9000]
[   69.624643] nvidia-modeset: Unloading
[   69.640422] nvidia-uvm: Unloaded the UVM driver in 8 mode
[   69.667223] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
[   69.688744] bbswitch: disabling discrete graphics
[   69.703343] pci 0000:01:00.0: Refused to change power state, currently in D0

Here is the output of glxinfo | grep OpenGL:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1050/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 390.25
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 390.25
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

The benchmark glxgears runs correctly with optirun. The kernel version is 4.14.20-2. My machine is a DELL XPS 15 9560 laptop.

Last edited by eyelash (2018-02-25 13:34:31)

Offline

#2 2018-02-25 13:20:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: libGLX_nvidia segfault when running OpenCL-OpenGL program with optirun

Please wrap command output in [ code ] tags.

What are the contents of that coredump - https://wiki.archlinux.org/index.php/Co … _core_dump

Last edited by V1del (2018-02-25 13:21:22)

Offline

#3 2018-02-25 13:36:55

eyelash
Member
Registered: 2018-02-25
Posts: 2

Re: libGLX_nvidia segfault when running OpenCL-OpenGL program with optirun

Hi, thanks for the reply. Here is the output of coredumpctl:

          PID: 13962 (python2)
           UID: 1000 (eyelash)
           GID: 1000 (eyelash)
        Signal: 11 (SEGV)
     Timestamp: Sun 2018-02-25 14:30:19 CET (2min 2s ago)
  Command Line: python2 gl_interop_demo.py
    Executable: /usr/bin/python2.7
 Control Group: /user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
          Unit: user@1000.service
     User Unit: gnome-terminal-server.service
         Slice: user-1000.slice
     Owner UID: 1000 (eyelash)
       Boot ID: fcd108ade524430ca0632674a843bdf8
    Machine ID: ddd005341e0a438287dfdfba0ecefb6c
      Hostname: shiva
       Storage: /var/lib/systemd/coredump/core.python2.1000.fcd108ade524430ca0632674a843bdf8.13962.1519565419000000.lz4
       Message: Process 13962 (python2) of user 1000 dumped core.
                
                Stack trace of thread 13962:
                #0  0x00007fa722302c85 n/a (libGLX_nvidia.so.0)
                #1  0x00007fa721345a6d n/a (libnvidia-glcore.so.390.25)
                #2  0x00007fa722328783 glcuR0d4nX (libGLX_nvidia.so.0)
                #3  0x00007fa71be8dcc6 n/a (libnvidia-opencl.so.1)
                #4  0x00007fa71be93464 n/a (libnvidia-opencl.so.1)
                #5  0x00007fa71bd9c6d7 n/a (libnvidia-opencl.so.1)
                #6  0x00007fa71bd9c31b n/a (libnvidia-opencl.so.1)
                #7  0x00007fa7237a9b87 create_context_from_type (_cffi.so)
                #8  0x00007fa72379485c n/a (_cffi.so)
                #9  0x00007fa72d241e39 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                #10 0x00007fa72d29c456 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                #11 0x00007fa72d2382c8 function_call.lto_priv.225 (libpython2.7.so.1.0)
                #12 0x00007fa72d265573 PyObject_Call (libpython2.7.so.1.0)
                #13 0x00007fa72d22693f instancemethod_call.lto_priv.140 (libpython2.7.so.1.0)
                #14 0x00007fa72d265573 PyObject_Call (libpython2.7.so.1.0)
                #15 0x00007fa72d22d0e8 slot_tp_init (libpython2.7.so.1.0)
                #16 0x00007fa72d2689f5 type_call.lto_priv.51 (libpython2.7.so.1.0)
                #17 0x00007fa72d265573 PyObject_Call (libpython2.7.so.1.0)
                #18 0x00007fa72d2476ae PyEval_EvalFrameEx (libpython2.7.so.1.0)
                #19 0x00007fa72d29c456 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                #20 0x00007fa72d247cba PyEval_EvalFrameEx (libpython2.7.so.1.0)
                #21 0x00007fa72d29c456 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                #22 0x00007fa72d2b5a9a PyEval_EvalCode (libpython2.7.so.1.0)
                #23 0x00007fa72d2b9321 run_mod (libpython2.7.so.1.0)
                #24 0x00007fa72d2bac05 PyRun_FileExFlags (libpython2.7.so.1.0)
                #25 0x00007fa72d2badda PyRun_SimpleFileExFlags (libpython2.7.so.1.0)
                #26 0x00007fa72d2a23b3 Py_Main (libpython2.7.so.1.0)
                #27 0x00007fa72d5baf4a __libc_start_main (libc.so.6)
                #28 0x0000557ab00cd78a _start (python2.7)

Offline

Board footer

Powered by FluxBB