fix(mobile): avoid mutex deadlocks - #15491
Merged
Merged
Conversation
Contributor
Package Changes Through 0011c5cThere are 5 changes which include tauri-utils with patch, tauri with patch, tauri-bundler with patch, tauri-cli with patch, @tauri-apps/cli with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Legend-Master
previously approved these changes
Jun 6, 2026
Legend-Master
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Could you also add a change file?
https://github.com/tauri-apps/tauri/blob/dev/.changes/README.md
Also you'll need to sign your commits for me to merge this
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
Contributor
Author
|
Will do! |
bclarke123
force-pushed
the
fix/mobile-ipc-mutex
branch
from
June 6, 2026 08:45
19844c4 to
dd1649d
Compare
Proksima
pushed a commit
to Proksima/tauri
that referenced
this pull request
Aug 5, 2026
* Avoid mutex deadlocks by acquiring locks outside of `if let` * Add .changes * Rename change-pr-15491 to mobile-run-command-deadlock.md --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes potential deadlocks when multiple threads call IPC commands concurrently on iOS / Android - in Tauri 2.9 there are four surfaces where this issue can manifest, and in 2.11 one of them has been fixed (ios
run_command). This PR fixes the other three to acquire locks before enteringif let Some(handler) = ...to avoid deadlocks on device, which are hard to trace and give the impression of instability.One note, these changes introduce two
.cloned()calls onChannelstructs - these are Arc-backed, and so these clones should be cheap, and are required to release the locks on CHANNELS / PENDING_PLUGIN_CALLS before sending to the WebView.