Skip to content

Fix threading related issues related to warping in GTI driver#14263

Merged
rouault merged 6 commits intoOSGeo:masterfrom
rouault:fix_14262
Mar 31, 2026
Merged

Fix threading related issues related to warping in GTI driver#14263
rouault merged 6 commits intoOSGeo:masterfrom
rouault:fix_14262

Conversation

@rouault
Copy link
Copy Markdown
Member

@rouault rouault commented Mar 31, 2026

Fixes #14262

Two separate issues:

  • potential dead lock in warper
  • crash in some scenario in error handling logic

@rouault rouault merged commit 203bb0f into OSGeo:master Mar 31, 2026
48 of 49 checks passed
@rouault
Copy link
Copy Markdown
Member Author

rouault commented Mar 31, 2026

The backport to release/3.12 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply f14e754909... Tidy up CPLErrorAccumulator::Context design
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 alg/gdalwarpkernel.cpp
Auto-merging autotest/alg/warp.py
[backport-14263-to-release/3.12 f2fb62a54b] Warping: more reliable progress interruption detection in multi-threaded case
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Tue Mar 31 13:25:41 2026 +0200
 2 files changed, 14 insertions(+), 1 deletion(-)
Auto-merging alg/gdalwarpkernel.cpp
[backport-14263-to-release/3.12 4be1c0263d] Warper: avoid potential dead-lock, when warping is done from a worker thread of the GDAL global thread pool
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Tue Mar 31 03:58:26 2026 +0200
 1 file changed, 12 insertions(+), 5 deletions(-)
Auto-merging autotest/cpp/test_cpl.cpp
Auto-merging port/cpl_error.cpp
[backport-14263-to-release/3.12 aa76f0ffa0] Error handling: avoid potential crash when a debug message ...
 Author: Even Rouault <even.rouault@spatialys.com>
 Date: Tue Mar 31 04:00:40 2026 +0200
 2 files changed, 47 insertions(+)
Auto-merging port/cpl_error.cpp
CONFLICT (content): Merge conflict in port/cpl_error.cpp
Auto-merging port/cpl_error_internal.h

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.12 release/3.12
# Navigate to the new working tree
cd .worktrees/backport-release/3.12
# Create a new branch
git switch --create backport-14263-to-release/3.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick d75e9739aa7fea6ed2712a414ffb9b60f86b6d1f,45bf064f6e508992f5ffa6854da67bce13198b5a,bbfdf88cd1de5c969d5adedb076a6aa8dcf2319f,f14e75490904ed60458c28702fc708e0c53ce09f,1edd2321f5e313e09e8d5a4cceba1943f7082a2f,37bd77befaf02233f7385c077be8ffbf424ab5f0
# Push it to GitHub
git push --set-upstream origin backport-14263-to-release/3.12
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.12

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

@rouault
Copy link
Copy Markdown
Member Author

rouault commented Mar 31, 2026

3.12 backport in #14269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/3.12 Backport to 3.12 branch funded through GSP Work funded through the GDAL Sponsorship Program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generating mosaic GTiff from GTI composed of many source GTiffs with GDAL_NUM_THREADS=ALL_CPUS fails

1 participant