Created attachment 140709 [details]
Demonstration for hang
If GL_FRONT is bound using glReadBuffer in a fullscreen application, the driver can hang in xshmfence_await.
This only appears to happen if the application is the only thing being displayed - even bringing up the alt-tab menu will cause rendering to resume as normal. Once this bug has occurred though, returning to the app will cause it to hang again.
Possibly this happens when the else if (buffer_type == loader_dri3_buffer_front) path of dri3_get_buffer is used.
The attached sample should demonstrate this issue - it reports a duration for the swap/read back on the order of the amount of time that the application was the sole thing rendering to the screen.
Tested radeonsi, git revision 5ba3e5c358, Fedora 27, gnome 3.26.2.
*** This bug has been marked as a duplicate of bug 106404 ***