<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Concurrent call to glClientWaitSync results in segfault in one of the waiters."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98172#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Concurrent call to glClientWaitSync results in segfault in one of the waiters."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98172">bug 98172</a>
              from <span class="vcard"><a class="email" href="mailto:shinji.suzuki@gmail.com" title="shinji.suzuki@gmail.com">shinji.suzuki@gmail.com</a>
</span></b>
        <pre>Hello Michael-san.
I'm afraid my testing was not enough and I spoke too soon. Today I've run my
app remotely through ssh session by pointing DISPLAY to :0 as I'm away from my
home machine. Now the app crashes, though much less often, even with modified
library containing your patch. Remoting and screen being blanked seems to
affect some timing as I get around 25fps only v.s. around 35fps that I get when
I work on the console.
Here is the call stack. (assert() is my lame attempt in trying to understand
what code path is being taken, which is apparently compiled to no-op.)

state_tracker/st_cb_syncobj.c
    118        if (screen->fence_finish(screen, fence, timeout)) {            

   │119           assert(0);                                                  

  >│120           screen->fence_reference(screen, &so->fence, NULL);          

   │121           so->b.StatusFlag = GL_TRUE;                                 

   │122        }                                                              


r600_pipe_common.c
    766             if (pipe_reference(&(*rdst)->reference, &rsrc->reference))

  >│767                     ws->fence_reference(&(*rdst)->gfx, NULL);         

   │768                     ws->fence_reference(&(*rdst)->sdma, NULL);        

   │769                     FREE(*rdst);                                      


radeon_drm_cs.c
    667     static void radeon_fence_reference(struct pipe_fence_handle **dst,

   │668                                        struct pipe_fence_handle *src) 

   │669     {                                                                 

  >│670         pb_reference((struct pb_buffer**)dst, (struct pb_buffer*)src);

   │671     }                                                                 


src/gallium/auxiliary/pipebuffer/pb_buffer.h

    235     static inline void                                                

   │236     pb_reference(struct pb_buffer **dst,                              

   │237                  struct pb_buffer *src)                               

   │238     {                                                                 

  >│239        struct pb_buffer *old = *dst;                                  

   │240                                                                       

   │241        if (pipe_reference(&(*dst)->reference, &src->reference))       

   │242           pb_destroy( old );                                          

   │243        *dst = src;                                                    

   │244     }                                                                 


(gdb) p old
$1 = <optimized out>
(gdb) p dst
$2 = (struct pb_buffer **) 0x8
(gdb) 

I'll attach the diff that corresponds to your patch to make sure I'm not making
mistake in applying your patch by hand as some hunks were rejected by 'patch'.</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>
      </ul>
    </body>
</html>