Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,061
    • Issues 3,061
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 996
    • Merge requests 996
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Issues
  • #1430
Closed
Open
Issue created Sep 25, 2019 by Bugzilla Migration User@bugzilla-migration

Hang when using glWaitSync with multithreaded shared GL contexts

Submitted by Emmanuel Durand

Assigned to Default DRI bug account

Link to original bug (#111784)

Description

Created attachment 145472 Output of dmesg

I develop a tool which uses a separate thread for uploading textures to the GPU, in parallel to the rendering thread. These two threads are synchronized using OpenGL fences, which prevents the rendering to happen while a texture is being copied from a PBO.

On recent AMD hardware (tested on a Vega 56 and a Radeon VII) this setup hangs almost instantaneously. From my tests it seems that it waits for a glWaitSync to finish. The exact same code runs flawlessly on Intel (Mesa driver) and Nvidia (proprietary driver).

I managed to somewhat reproduce the issue in a simpler code, which merely creates two shared OpenGL contexts and does nothing except creating fences and waiting for the other thread. This example hangs with AMDGPU driver, but once again runs fine on Intel (Mesa driver) and Nvidia (proprietary driver).

I'll attach the code to this thread, and it can be found here too: https://gitlab.com/sat-metalab/splash/blob/fix/radeon_test/tests/sandbox/radeon_mesa_shared_context_freeze.cpp.

Attachment 145472, "Output of dmesg":
dmesg

Version: git

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking