Skip to content

Fix deadlock when rendering annotation layers - #66712

Merged
alexbruy merged 2 commits into
qgis:masterfrom
nyalldawson:fix_hang
Jul 8, 2026
Merged

Fix deadlock when rendering annotation layers#66712
alexbruy merged 2 commits into
qgis:masterfrom
nyalldawson:fix_hang

Conversation

@nyalldawson

Copy link
Copy Markdown
Collaborator

Description

Also potentially a cause of a lot of other deadlocks!

It's not safe to use a static QRegularExpression, these need to be thread_local instead. Otherwise we can hit a deadlock in Qt internals when accessing the same QRegularExpression across multiple threads.

AI tool usage

  • AI tool(s) (Copilot, Claude, or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. Failure to be honest might result in banning.
It's not safe to use a static QRegularExpression, these need to be thread_local instead
@github-actions github-actions Bot added this to the 4.4.0 milestone Jul 7, 2026
@github-actions github-actions Bot added Expressions Related to the QGIS expression engine or specific expression functions Server Related to QGIS server PostGIS data provider labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit f21a443)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
To execute locally, unzip the downloaded zip file and run bin\qgis-bin.exe in the extracted directory.
You might be prompted by Windows Defender click "Run anyway"
(Built from commit f21a443)

@alexbruy
alexbruy merged commit a1afd05 into qgis:master Jul 8, 2026
44 checks passed
@qgis-bot

qgis-bot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

The backport to release-3_44 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 18c3ce9454c... Fix deadlock when rendering annotation layers
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging src/core/expression/qgsexpression.cpp
CONFLICT (content): Merge conflict in src/core/expression/qgsexpression.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_44 release-3_44
# Navigate to the new working tree
cd .worktrees/backport-release-3_44
# Create a new branch
git switch --create backport-66712-to-release-3_44
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 18c3ce9454c8a1568ad7d9655da625daf15068fe f21a443ae28522b1c77524461e4dc29f348dc5f6
# Push it to GitHub
git push --set-upstream origin backport-66712-to-release-3_44
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_44

Then, create a pull request where the base branch is release-3_44 and the compare/head branch is backport-66712-to-release-3_44.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-3_44 backport release-4_2 Crash/Data Corruption Expressions Related to the QGIS expression engine or specific expression functions failed backport The automated backport attempt failed, needs a manual backport PostGIS data provider Server Related to QGIS server

4 participants