Repository navigation
fix: raise tao to 0.37.1 to remove the keyboard reentrancy deadlock (#2817) - #2819
Merged
Merged
Conversation
…2817) tao 0.34.8 held a global non-reentrant mutex while its WM_KEYUP branch called PeekMessageW. A WM_KILLFOCUS delivered by that peek reentered the same callback and the event-loop thread waited on itself forever. Raise the declared tauri floor to 2.12.1, which resolves tao 0.37.1, and add a regression test file: T1 pins the resolved tao floor, T2 drives the reentrancy on a hidden window the test owns.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Adds src-tauri/tests/tauri_npm_version_coupling.rs only. The test reads Cargo.lock and package-lock.json and fails when the Rust tauri crate and the npm @tauri-apps/api package differ in major.minor. At this commit the two differ on purpose (tauri 2.12.1, @tauri-apps/api 2.10.1): this is the D15 natural negative candidate. The lockfile alignment follows in a later commit. Refs #2817
…-tauri-keyboard-deadlock
… tauri 2.12.1 package-lock.json: @tauri-apps/api 2.10.1 to 2.12.1, lockfile only, so the npm API shares major.minor with the Rust tauri crate. @tauri-apps/cli stays at 2.10.1. Diagnostic fixture Cargo.lock: semver 1.0.27 to 1.0.28, so every fixture pin exists in the workspace lock. Adds .github/workflows/g-fe-certification.yml, a single-purpose workflow that runs the five frontend certification commands on this branch. Refs #2817
…-tauri-keyboard-deadlock
…-tauri-keyboard-deadlock
|
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.



Closes #2817
Reported problem and the upstream defect this change removes
Issue #2817 reports the interface freezing.
The approved plan's reading of upstream source is that
tao 0.34.8holds a global non-reentrant mutex (KEY_EVENT_BUILDERS) while itsWM_KEYUPbranch callsPeekMessageW. That peek can deliver pending sent messages, so aWM_KILLFOCUSarriving at that instant reenters the same callback on a thread that already holds the mutex. By the same reading,tao 0.37.1no longer does this; T2 exercises that sequence on0.37.1.This is an analysis of the dependency's code, not a proven cause of the reported freeze. The freeze was not reproduced on the old version, so this PR does not show that this defect is what the user hit. It removes a defect that fits the report.
Change: seven paths, no application code
Relative to
mainat070e7aa91c506d084a0746cbb436e5a9db0d0211:src-tauri/Cargo.toml:tauriset to2.12.1; Windows-only dev-dependencytao 0.37.1for the harness.Cargo.lock: resolvestauri 2.12.1and a singletao 0.37.1.src-tauri/tests/tao_keyboard_reentrancy.rs: T1 pins the resolvedtaoat>= 0.37.1. T2 (Windows) drives the reentrancy on a hidden window the test owns, bounded by a watchdog.package-lock.json:@tauri-apps/api2.10.1to2.12.1, so the JS API minor matches the crate.crates/terminal-snapshot-renderer/tests/fixtures/diagnostic-failure-harness/Cargo.lock: fixture locksemver1.0.27to1.0.28, so it stays a subset of the workspace lock.src-tauri/tests/tauri_npm_version_coupling.rs: one test that fails when thetauricrate and@tauri-apps/apidisagree on major.minor..github/workflows/g-fe-certification.yml: the hosted carrier that produces the frontend certification evidence set for this issue.Integration with
main, kept separate from the changeThe branch contains four merges of
main, never a rebase:60184dde(of2ed19c1c),4856aa1e(ofc0709653),ae35162b(ofd9c7db92) and the head181b76b1(of070e7aa9).The last one brings in
src/terminal/components/TerminalView.tsxfrom PR #2830 (#2829), two lines. That file is not part of this change. Two things a reader should know about it:frontend-regressionjob was skipped, so that file had no full frontend suite run onmain.@tauri-apps/api 2.12.1. Two runs executed the frontend suite on that combination, each with 269 test files and 3700 tests passed: G-FE's strict serialnpm teston the head itself, andfrontend-regression, with its known-debt guard, on merge commitd5d0c64b.Final identity
181b76b1139d0c9c064734b940a85b865f5a15eb, treec8e7e088d272e14debf4afa1ce272563e3acb7a3, parentsae35162b4d703e8b4ae69c9185a00d0cfe834319and070e7aa91c506d084a0746cbb436e5a9db0d0211.pushworkflows, G-FE among them, ran on the head itself. Thepull_requestworkflows ran on merge commitd5d0c64bc5d3c22f543a45640c49e52a654bd9e5, "Merge 181b76b… into 070e7aa", not on the head.070e7aa91c506d084a0746cbb436e5a9db0d0211(base), second parent181b76b1139d0c9c064734b940a85b865f5a15eb(head), treec8e7e088d272e14debf4afa1ce272563e3acb7a3, the same tree as the head. So those runs built the head's tree, on a different commit. Below, "for this head" means evidence associated with this head; the commit each job executed on is named.CI for this head: eight runs, all
success, attempt 136965645361d5d0c64b36965645357d5d0c64b36965645359d5d0c64b36965645358d5d0c64b36965645318d5d0c64b36965642157181b76b136965642198181b76b136965642002181b76b1mainreport success for this PR head.issue-1850-windows-profile (release):Inventory restored gate-debug targetandUpload gate-debug inventory.rust-regression(job110708698205, on merge commitd5d0c64b),cargo test --locked --lib --bins --tests: lib5841 passed; 0 failed; 26 ignored; 29 of 29 integration targets ran.d5d0c64b: T1resolved_tao_is_at_least_0_37_1 ... ok, T2win_harness::wm_keyup_peek_does_not_deadlock_on_reentrant_wm_killfocus ... ok, not ignored, and the coupling testtauri_crate_and_npm_api_share_a_major_minor ... ok. Windows only, one execution.frontend-regression(on merge commitd5d0c64b, stepnpm test with #480 known-debt guard):Test Files 269 passed (269),Tests 3700 passed (3700). This is not the strict run; the strict serialnpm testis G-FE's, on the head.TerminalView.tsx, is in neither list. The absence is consistent with that configuration; the platform's filter decision itself was not observed. Both workflows ran on the pull_request event.Frontend certification (G-FE) on this head
36965642002, job110708687792, artifactg-fe-evidence-181b76b1139d0c9c064734b940a85b865f5a15eb(ID11209745879), ten evidence files retrieved, their nine recorded digests matched. The five command status lines each record exit 0 and the recorded installed API version is2.12.1.181b76b1139d0c9c064734b940a85b865f5a15eb, certified by the frontend owner from the ten evidence files, not from the job colour. Both tree-state logs empty; toolchainv24.13.0and npm11.6.2; five commands with exit 0; installed@tauri-apps/api2.12.1; nine of nine digests matched.npm testproves mocked seams only, and the hosted read proves nothing about the user's machine or about Tauri runtime behaviour. Record:ci-181b76b1/fe-evidence-verdict.md, sha256c7cb0c56e091919f0bfd8c5144ae65e0fbe486c42dbc03714a130c5214c99bfb.Registered exceptions
0.41.0to0.42.0, on the lines that carry it." Measured on this head against1cbade7b:Cargo.lockline 13 andsrc-tauri/Cargo.tomlline 3, one hunk each, nothing else. It is not a version bump made by this PR; the value came frommain.d9c7db92. This head is a second refresh, on070e7aa9, authorized separately by room 30 (route B, disposition 042207; continuation 043102). The second refresh touches none of E-VER's paths.check:frontend-dependenciestakes its evidence from the real installed tree on the hosted runner at the assigned SHA, instead of a local run. By its registered limits it proves nothing about the user's machine or local install, and nothing about Tauri runtime behaviour.36965642002) and for the earlier heads23c5c2adandae35162b. The frontend owner is the certifying owner; a green job does not certify.History of earlier heads, including the reds
3e6992ca: coupling test negative control. It failed as designed, on an older base.23c5c2ad: ten runs, all green, including the coupling test positive control and T1, T2 on Windows.ae35162b, attempt 1: PR regression gates red. One Windows unit test failed,capture::state::tests::contention_is_lock_busy_and_bounded(measured 588.4544 ms against a 250 ms limit). Its file is not touched by this change and is identical tomain. Because the unit-test binary failed, the Windows integration targets did not run in that attempt.ae35162b, attempt 2: one authorized rerun of that single job. Green. The coupling test, T1 and T2 executed and wereok. The red of attempt 1 remains unexplained: no cause is attributed, neither a flaky test nor a regression from this change.All of the above names earlier SHAs. None of it is evidence for the head of this PR. In the run for this head, on merge commit
d5d0c64b, that test passed, in one execution; that does not explain the earlier red.Not run, by user disposition
Omitted under plan amendment A, on the user's instruction. These are NOT RUN, not passed:
What this PR does not claim
d5d0c64bwith the head's tree, shows thattao 0.37.1resolves, builds and passes T1, T2 and the suite. It does not show by reproduction that the reported freeze was this deadlock, or that it is gone.npm testexercises mocked seams only.telegram.send_messagefinding stays open and unexplained. No follow-up issue was filed.Release and packaging
This PR makes no release and no version bump, and nothing was packaged or installed locally for it. CI does package: the
Bundle validationworkflow builds the Windows installers as part of its normal run, and did so in the run for this head (on merge commitd5d0c64b) and for the earlier heads. Those are CI build outputs, not a release.