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,053
    • Issues 3,053
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 999
    • Merge requests 999
  • 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
  • #4847
Closed
Open
Issue created May 27, 2021 by Clément Bœsch@ubitux

Iris deadlock since introduction of threaded context (regression since 21.1)

System information

System:    Host: bee Kernel: 5.12.5-arch1-1 x86_64 bits: 64 Desktop: i3 4.19.2 Distro: Arch Linux
CPU:       Info: Quad Core model: Intel Core i7-6770HQ bits: 64 type: MT MCP cache: L2: 6 MiB
           Speed: 2288 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 2288 2: 2800 3: 2759 4: 2054 5: 1209 6: 800 7: 800
           8: 2328
Graphics:  Device-1: Intel Iris Pro Graphics 580 driver: i915 v: kernel
           Device-2: Logitech C922 Pro Stream Webcam type: USB driver: snd-usb-audio,uvcvideo
           Display: server: X.org 1.20.11 driver: loaded: modesetting resolution: <missing: xdpyinfo>
           OpenGL: renderer: Mesa Intel Iris Pro Graphics 580 (SKL GT4) v: 4.6 Mesa 21.1.1

Describe the issue

Since mesa 21.1, OpenRA deterministically deadlocks at startup (just after then logo splash screen, when it's supposed to display the menu and background shell map).

This is a regression related to threaded context: GALLIUM_THREAD=0 "solves" the issue.

Note that this only happens with the following environment:

  • openra-20210321: some code shuffling upstream (https://github.com/OpenRA/OpenRA/commit/0d4b81fe6f96d96436ddf31b451508bbe099d5b5) "fixed" the issue by side effect, so don't use bleed
  • only happens with the mono runtime, dotnet is not affected (make RUNTIME=mono && ./launch-game.sh Game.Mod=ra) if you're building the game yourself

I'm happy to provide any additional information and help figuring out the source of the problem.

Regression

I did actually run a bisect and as expected it boiled down to:

206495cac4e48b4dac8295a0c4182d186968eb97 is the first bad commit
commit 206495cac4e48b4dac8295a0c4182d186968eb97
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri May 15 11:23:03 2020 -0700

    iris: Enable u_threaded_context

    This implements most of the remaining u_threaded_context support.  Most
    of the heavy lifting was done in the previous patches which fixed things
    up for the new thread safety requirements.  Only a few things remain.

    u_threaded_context support can be disabled via an environment variable:

       GALLIUM_THREAD=0

    On Felix's Tigerlake with the GPU at fixed frequency, enabling
    u_threaded_context improves performance of several games:

       - Civilization VI: +17%
       - Shadow of Mordor: +6%
       - Bioshock Infinite +6%
       - Xonotic: +6%

    Various microbenchmarks improve substantially as well:

       - GfxBench5 gl_driver2: +58%
       - SynMark2 OglBatch6: +54%
       - Piglit drawoverhead: +25%

    Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964>

 src/gallium/drivers/iris/iris_context.c  | 13 ++++++++++++-
 src/gallium/drivers/iris/iris_context.h  |  1 +
 src/gallium/drivers/iris/iris_fence.c    |  2 ++
 src/gallium/drivers/iris/iris_resource.c | 28 ++++++++++++++++++++++++++++
 src/gallium/drivers/iris/iris_resource.h |  5 +++++
 5 files changed, 48 insertions(+), 1 deletion(-)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking