[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 19 08:32:18 UTC 2016


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

--- Comment #29 from Suzuki, Shinji <shinji.suzuki at gmail.com> ---
Sorry. I looked at only your latest comment when I replied previously because I
read it in email.

You are absolutely right. fence_finish() MUST run concurrently even if they
target same sync-object because, as you say, timeout setting in waits may be
different. I was thinking only in terms of infinite waits. I'll reapply your
patch and continue watching how my app behaves.
Thank you for noticing this before I post my buggy patch to the mailing list.

BTW, st_check_sync and st_client_wait_sync() seem identical except for the
existence of flags and timeout. Should they be merged?

(In reply to Michel Dänzer from comment #26)
> (In reply to Marek Olšák from comment #24)
> > Hm. Probably none.
> 
> Actually, I think there are: E.g. consider one thread calling
> glClientWaitSync with a non-0 timeout, blocking for some time with the mutex
> locked. If another thread calls glClientWaitSync with a 0 timeout (or
> whichever API call ends up in st_check_sync) during that time, it'll block
> until the first thread unlocks the mutex.

-- 
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/20161019/806f23cd/attachment.html>


More information about the mesa-dev mailing list