[Mesa-dev] [Bug 98172] Concurrent call to glClientWaitSync results in segfault in one of the waiters.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 12 11:41:30 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98172

--- Comment #5 from shinji.suzuki at gmail.com ---
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'.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161012/9b3b5da9/attachment-0001.html>


More information about the mesa-dev mailing list