<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - opencl-mesa: Anything using OpenCL segfaults, XFX Radeon RX 580"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108272">108272</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opencl-mesa: Anything using OpenCL segfaults, XFX Radeon RX 580
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>18.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jamespharvey20@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=141931" name="attach_141931" title="clinfo seems happy">attachment 141931</a> <a href="attachment.cgi?id=141931&action=edit" title="clinfo seems happy">[details]</a></span>
clinfo seems happy

Up to date Arch Linux, including: linux 4.18.12.arch1-1, xf86-video-amdgpu
18.1.0-1, mesa 18.2.2-1, opencl-mesa 18.2.2-1, xorg-server 1.20.1-1, and
plasma-desktop 5.13.5-1.

(Recently installed system that STARTED with: linux 4.18.9.arch1-1, mesa
18.2.1-1, and opencl-mesa 18.2.1-1.)

I have not tried AMDGPU-PRO.  (Not really interested anyway, and the Arch AUR
package for it is 17.40, which requires downgrading to linux 4.9 and Xorg
1.18.)

$ lspci -k | grep VGA
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Ellesmere [Radeon RX 470/480/570/570X/580/580X] (rev e7)
        Subsystem: XFX Pine Group Inc. Ellesmere [Radeon RX
470/480/570/570X/580/580X]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

It's the: XFX AMD Radeon RX 580 GTS Black Edition 8GB GDDR5 PCI Express 3.0

clinfo seems happy, see full output attached or here: <a href="http://termbin.com/iiow">http://termbin.com/iiow</a>

See glxinfo output attached or here: <a href="http://termbin.com/lgqd">http://termbin.com/lgqd</a>

Anything using OpenCL immediately segfaults.

Everything that segfaults runs just fine if I uninstall opencl-mesa, and either
use opencl-amd (Arch linux package, which extracts OpenCL library from
AMDGPU-PRO **18.30** but allows it to run with the open source AMDGPU driver.) 
Everthing also runs fine if I instead use intel-opencl-runtime to just run off
the CPUs.

-----

luxmark 3.1 crashes in pipe_radeonsi.so, called by libMesaOpenCL.so.1, called
by libOpenCL.so.1.

A gdb backtrace with opencl-mesa 18.2.2 that I compiled in debug mode with
symbols is attached or here: <a href="http://termbin.com/to7v">http://termbin.com/to7v</a>

A gdb backtrace with opencl-mesa 18.2.2 (Arch binary, so without buildtype
specified and no symbols) is here: <a href="http://termbin.com/m1yx">http://termbin.com/m1yx</a>

Setting environment variable MESA_DEBUG causes no additional output.

-----

Granted, IndigoBenchmark_x64_v4.0.64 crashes by calling
/usr/lib/libOpenCL.so::clGetPlatformIDs() which is ocl-icd, but without
opencl-mesa and instead with opencl-amd, it runs through it just fine.

A gdb backtrace is attached or here: <a href="http://termbin.com/junz6">http://termbin.com/junz6</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>