<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 - [KBL] Hang when running Vkcube"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105930">105930</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[KBL] Hang when running Vkcube
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>DRI git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lionel.g.landwerlin@linux.intel.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=138657" name="attach_138657" title="i915 error state">attachment 138657</a> <a href="attachment.cgi?id=138657&action=edit" title="i915 error state">[details]</a></span>
i915 error state

While running Vkcube, I get hangs after a few seconds.
The command stream is full of invalid instructions :

--- batch buffer (rcs0) at 0x00000000 00021000
unknown instruction ff7b7b7b
unknown instruction ff7b7b7b
unknown instruction ff7b7b7b

Vkcube also ends up crashing and under valgrind I managed to get this couple of
backtraces :

==14443== Invalid free() / delete / delete[] / realloc()
==14443==    at 0x7B6EA11: anv_state_stream_finish (anv_allocator.c:885)
==14443==    by 0x7B7C19C: anv_cmd_buffer_reset (anv_cmd_buffer.c:299)
==14443==    by 0x7B7D7DA: anv_ResetCommandPool (anv_cmd_buffer.c:881)
==14443==    by 0x58FBEE8: vkResetCommandPool (trampoline.c:1644)
==14443==    by 0x1114AD: render_cube (cube.c:442)
==14443==    by 0x10FA8C: mainloop_wayland (main.c:1185)
==14443==    by 0x1100C8: mainloop (main.c:1362)
==14443==    by 0x1101DA: main (main.c:1392)
==14443==  Address 0xff7b7b7bff7b7b7b is not stack'd, malloc'd or (recently)
free'd
==14443== 
vkcube: ../src/intel/vulkan/anv_allocator.c:817: anv_state_pool_free_no_vg:
Assertion `util_is_power_of_two_or_zero(state.alloc_size)' failed.
==14443== 
==14443== Process terminating with default action of signal 6 (SIGABRT)
==14443==    at 0x5EEEE7B: raise (raise.c:51)
==14443==    by 0x5EF0230: abort (abort.c:79)
==14443==    by 0x5EE79D9: __assert_fail_base (assert.c:92)
==14443==    by 0x5EE7A51: __assert_fail (assert.c:101)
==14443==    by 0x7B6E64E: anv_state_pool_free_no_vg (anv_allocator.c:817)
==14443==    by 0x7B6EAB4: anv_state_stream_finish (anv_allocator.c:887)
==14443==    by 0x7B7C19C: anv_cmd_buffer_reset (anv_cmd_buffer.c:299)
==14443==    by 0x7B7D7DA: anv_ResetCommandPool (anv_cmd_buffer.c:881)
==14443==    by 0x58FBEE8: vkResetCommandPool (trampoline.c:1644)
==14443==    by 0x1114AD: render_cube (cube.c:442)
==14443==    by 0x10FA8C: mainloop_wayland (main.c:1185)
==14443==    by 0x1100C8: mainloop (main.c:1362)

Unfortunately it seems it's just valgrind rereading the corrupted batchbuffer,
so still not sure who's responsible for the corruption.

This is using mesa master :

commit 7fe586f6fb69cd829d687dd58562ef5922667905
Author: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>>
Date:   Thu Apr 5 10:27:22 2018 +0200

    radv: only enable PERFECT_ZPASS_COUNTS for precision occlusion queries

And Vkcube master :

commit 0062eec985134a0bd1e85588c34bf0d55ebf51eb
Author: Bas Nieuwenhuizen <<a href="mailto:basni@chromium.org">basni@chromium.org</a>>
Date:   Sun Feb 25 02:43:48 2018 +0100

    Link with libm.</pre>
        </div>
      </p>


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

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>