<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:chadversary@chromium.org" title="Chad Versace <chadversary@chromium.org>"> <span class="fn">Chad Versace</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [EGL, i965] dEQP-EGL.functional.sharing.gles2.multithread.simple_egl_server_sync.textures.copyteximage2d_texsubimage2d_render"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99209">bug 99209</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>jason@jlekstrand.net, kenneth@whitecape.org
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [EGL, i965] dEQP-EGL.functional.sharing.gles2.multithread.simple_egl_server_sync.textures.copyteximage2d_texsubimage2d_render"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99209#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [EGL, i965] dEQP-EGL.functional.sharing.gles2.multithread.simple_egl_server_sync.textures.copyteximage2d_texsubimage2d_render"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99209">bug 99209</a>
              from <span class="vcard"><a class="email" href="mailto:chadversary@chromium.org" title="Chad Versace <chadversary@chromium.org>"> <span class="fn">Chad Versace</span></a>
</span></b>
        <pre>+ken +jason

Helgrind complains about potential read/write races on
drm_intel_gem_bo::offset64. According to helgrind, the conflict occurs when
intel_batchbuffer_flush() updates the offset in thread1 and
brw_update_texture_surfaces() reads the offset during batchbuffer construction
in thread2.

Below is the relevant Helgrind snippet. Helgrind claims to detect this error
exactly once during the testrun.

Possible data race during write of size 8 at 0xCD29890 by thread #2
Locks held: 3, at addresses 0x7E49FE8 0x7E6E3B8 0xA382CB0
   at 0xB0E1DB7: drm_intel_update_buffer_offsets2 (intel_bufmgr_gem.c:2292)
   by 0xB0E2316: do_exec2 (intel_bufmgr_gem.c:2450)
   by 0xB0E24C0: drm_intel_gem_bo_context_exec (intel_bufmgr_gem.c:2493)
   by 0xA92EE5E: do_flush_locked (intel_batchbuffer.c:359)
   by 0xA92F0F1: _intel_batchbuffer_flush (intel_batchbuffer.c:422)
   by 0xA905724: brw_fence_insert (brw_sync.c:86)
   by 0xA905B7D: brw_dri_create_fence (brw_sync.c:255)
   by 0x811F886: dri2_create_sync (egl_dri2.c:2563)
   by 0x8112249: _eglCreateSync (eglapi.c:1659)
   by 0x811237B: eglCreateSyncKHR (eglapi.c:1684)
   by 0x79D789: eglw::FuncPtrLibrary::createSyncKHR(void*, unsigned int, int
const*) const (eglwFuncPtrLibraryImpl.inl:94)
   by 0x60E798:
deqp::egl::GLES2ThreadTest::FenceSync::init(deqp::egl::GLES2ThreadTest::EGLThread&,
bool) (teglGLES2SharingThreadedTests.cpp:301)

This conflicts with a previous read of size 8 by thread #3
Locks held: 2, at addresses 0xA386C40 0xCD29130
   at 0xB0E14B9: do_bo_emit_reloc (intel_bufmgr_gem.c:2042)
   by 0xB0E1714: drm_intel_gem_bo_emit_reloc (intel_bufmgr_gem.c:2104)
   by 0xB0D651D: drm_intel_bo_emit_reloc (intel_bufmgr.c:205)
   by 0xA90F926: brw_emit_surface_state (brw_wm_surface_state.c:173)
   by 0xA9108A8: brw_update_texture_surface (brw_wm_surface_state.c:646)
   by 0xA911C18: update_stage_texture_surfaces (brw_wm_surface_state.c:1271)
   by 0xA911D42: brw_update_texture_surfaces (brw_wm_surface_state.c:1302)
   by 0xA904480: check_and_emit_atom (brw_state_upload.c:771)
 Address 0xcd29890 is 48 bytes inside a block of size 360 alloc'd
   at 0x4C2DE60: calloc (in
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
   by 0xB0DACBF: drm_intel_gem_bo_alloc_internal (intel_bufmgr_gem.c:811)
   by 0xB0DBADB: drm_intel_gem_bo_alloc_tiled (intel_bufmgr_gem.c:945)
   by 0xB0D61A7: drm_intel_bo_alloc_tiled (intel_bufmgr.c:83)
   by 0xA93A0E4: miptree_create (intel_mipmap_tree.c:664)
   by 0xA93A154: intel_miptree_create (intel_mipmap_tree.c:688)
   by 0xA948CAB: intel_miptree_create_for_teximage (intel_tex_image.c:109)
   by 0xA9476F3: intel_alloc_texture_image_buffer (intel_tex.c:95)
   by 0xA948E01: intelTexImage (intel_tex_image.c:140)
   by 0xA5C8BAC: _mesa_get_fallback_texture (texobj.c:1049)
   by 0xA5D2385: update_single_program_texture (texstate.c:563)
   by 0xA5D242A: update_program_texture_state (texstate.c:588)
 Block was alloc'd by thread #2</pre>
        </div>
      </p>


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

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