Add a defensive diagnosis for patch 0058 + hardening - #141
Conversation
…-up) The 0058 gate keeps every frame correct but decides per frame and reports nothing. A persistent coordinate fault can hold a swapchain on the GDI copy path for a whole session at about one core of CPU, with a correct screen and no visible sign (issue 100: 98.9% against 25.2% of a core). Patch 0071 counts gate decisions per swapchain on the CS thread and separates resize races from persistent faults: a drag changes the compared rect pair every frame, a fault repeats it. 120 identical-pair frames, or a fallback ratio above half for two five-second windows in a row, print a one-shot warning: two MESSAGE lines that survive WINEDEBUG=-all plus one machine-parsable err:winediag evidence line. Destroying a swapchain that ever fell back prints a one-line summary. The launchers now default to WINEDEBUG=-all,+winediag so winediag notices reach the log; all other debug output stays off. build-audit gains the 0071 fingerprint, SERIES.sha256 is refrozen, and BASE.txt reserves 0070 for the Max for Live font-list cache branch. TROUBLESHOOTING gains a CPU-spikes entry with the check and report steps; the GPU renderer note documents the mechanism and the pending runtime verification: a 0059-reverted build at 125% must warn within seconds, a ten-second resize drag must not, a healthy session must stay silent. Compile-verified; wined3d.dll builds clean and carries both audit fingerprints.
| - If you started Live from the desktop menu, run | ||
| `journalctl --user --since "-15min" | grep -i "present-size mismatch"`. | ||
|
|
||
| If that command returns any text related to Wine or Ableton, please | ||
| [open an issue](https://github.com/shibco/ableton-linux/issues) and | ||
| paste the full log line that contains `Sustained present-size | ||
| mismatch`. |
There was a problem hiding this comment.
The destroy summary added in this PR also contains present-size mismatch, and it
fires for transient fallbacks too (measured: a healthy session logged
2 of 2334 presents fell back and still produced the line at exit) — so this grep
as written sends healthy users to the issue tracker looking for a "Sustained" line
their log doesn't have. The trailing colon matches the evidence line only; verified
against real session logs: benign session 0 hits, faulted session exactly 1.
| - If you started Live from the desktop menu, run | |
| `journalctl --user --since "-15min" | grep -i "present-size mismatch"`. | |
| If that command returns any text related to Wine or Ableton, please | |
| [open an issue](https://github.com/shibco/ableton-linux/issues) and | |
| paste the full log line that contains `Sustained present-size | |
| mismatch`. | |
| - If you started Live from the desktop menu, run | |
| `journalctl --user --since "-15min" | grep -i "sustained present-size mismatch:"`. | |
| If that command prints anything, please | |
| [open an issue](https://github.com/shibco/ableton-linux/issues) and | |
| paste the whole line. It starts with `err:winediag:` and holds the | |
| data we need. |
ClickSentinel
left a comment
There was a problem hiding this comment.
Tested at 14f6727 on COSMIC/Wayland: build and audit clean, and the warning path exercised for real. With 0059's swapchain.c bracket reverted to resurrect issue 100's fault at 125%, the warning fires at exactly identical-pair 120 and the evidence line alone pins the mechanism — dst (0,0)-(1706,896) client (0,0)-(1365,717), both DPI contexts shown. On the healthy build, a machine-paced 26 s edge drag measured 613 of 3028 presents falling back (20%, longest run 7) with no warning: the resize/fault split holds with wide margin.
Three corrections from the runtime data:
- Check 1 in the notes (revert the texture.c hunk) won't fire the warning — that hunk brings back the visual bar while the gate keeps agreeing. Reverting the swapchain.c bracket is what reproduces the sustained fallback; that's the rig above.
- Check 3 can't pass as written: the destroy summary fires for transient fallbacks too — a near-idle session logged
2 of 2334 presents fell backand still printed it. Either gate the summary onwarnedor amend the check; the TROUBLESHOOTING grep currently matches this benign line, see the inline suggestion. - The evidence line prints
session unknown desktop unknownon every run. XDG_SESSION_TYPE and XDG_CURRENT_DESKTOP are present in the Unix environment but don't survive the env conversion, soGetEnvironmentVariableAnever sees them. Without a Unix-side read the compositor field — the main triage axis for this bug class — is dead for all reporters.
Minor: beta/tester-kit/run-session (hard) and scripts/max9 (default) still set plain WINEDEBUG=-all, dropping the evidence line for the people most likely to report. And if #153 merges first, SERIES_GAPS[0070] needs a manual fix at this branch's rebase — the audit never rechecks gap entries for numbers that exist.
Those items are your call, otherwise, approved.
|
Ready for another look @ClickSentinel |
ClickSentinel
left a comment
There was a problem hiding this comment.
Both must-fixes from the last pass are genuinely fixed, and the merge against upstream/main is clean.
Should fix
-
The idle reset disables the ratio rule for any fault that presents in bursts. Modelling both revisions: an oscillating fault at 100% fallback in 8 s bursts separated by 6 s mouse pauses warns at t=14 s under
14f6727and stays silent for the whole 80 s / 4801-of-4801-frame run under0f57214. The cliff is exactlyPRESENT_MISMATCH_IDLE_MS— the same fault with 0.5 s pauses still warns at 10 s. The stable-run rule is untouched, so issue 100's persistent shape still fires in 2 s; what narrows is the backstop for the oscillating topology the patch message names as "the danger left". Fix: on an idle gap discard the partial window but keepwindow_strikesunless the gap is long. Tested at a 30 s strike-reset threshold — the two-bursts-across-a-60-s-gap false positive stays silent and the 8 s/6 s fault warns at 19 s. -
The evidence line's trailing counters read 0 when the ratio rule fires.
swapchain_present_mismatch_warnprints the liveconsecutiveandstable_run, but the ratio path runs on every present including agreeing ones, and the agrees branch zeroes both — an oscillating-fault report readsconsecutive 0 identical-pair 0. This commit fixed the same problem for the rectangles by passinglast_dst/last_clientand left the counters beside them live. Fix: printconsecutive_max/stable_run_max, already tracked and meaningful on both paths. -
The recorded verification predates the code in this commit. The notes now read "Runtime verification is done", but the destroy predicate changed from
mismatchestowarnedhere — check 3 ("no destroy summary must appear") is asserted against code that no longer exists, and the run behind it is the one that produced the transient summary. Check 2's cited evidence (613 of 3028 presents, longest run 7) came from a 96 DPI session while check 2 specifies 125%, where the drag false-positive risk is higher. Fix: re-run checks 2 and 3 against0f57214and state the scale each measurement ran at. -
The tester kit lost its forced
WINEDEBUG.beta/tester-kit/run-sessionwent fromexport WINEDEBUG=-allto${WINEDEBUG:--all,+winediag}, and theunsetlist above it does not includeWINEDEBUG— a tester with an ambient value now silently changes the session the kit exists to make reproducible. Fix: addWINEDEBUGto thatunsetline, or keep the hard assignment here.
Comment only
- The
journalctlinstruction is unverified for a desktop-menu launch.scripts/ableton-livedoes not redirect its own stderr, so where the line lands is the desktop launcher's choice. On COSMIC, app scopes show stderr at/dev/nullfor some apps and an inherited pipe for others, andsystemd-run --user --scopeinherits stdio rather than routing to the journal. A user whose launcher chose/dev/nullgets nothing from either instruction. Fix: tee the launcher's stderr to a fixed path and point TROUBLESHOOTING there — one instruction that survives every launch path.
Held
The XDG fix is correct and measured: is_special_env_var in dlls/ntdll/unix/env.c:331 prefixes every XDG_ with WINE_HOST_, and a probe under the built runtime read WINE_HOST_XDG_SESSION_TYPE="wayland" and WINE_HOST_XDG_CURRENT_DESKTOP="COSMIC" with both bare names absent — the len >= sizeof(buf) guard is right against both of GetEnvironmentVariableA's return conventions. +winediag is not a spam channel: the base tree has 58 winediag call sites, 55 ERR_ / 2 WARN_ / 1 FIXME_, no TRACE_. All five user-facing launchers now open it. Registration is complete on all four surfaces, and the idle-reset block is safe on the first present because window_start gates the subtraction.
|
"Should" fix --_-- |
gonna create an issue for the attitude |
|
did fix |
Truncate live.log only when this launcher is bringing Live up. Every Live desktop entry runs the same script to hand its file to the running instance, so the old unconditional truncation wiped that session's log. Give ableton-live-beta the same capture at live-beta.log. Say five seconds in the burst rule, in the notes and the patch message, and record the 30 second reset as a chosen trade.
#100 and others describe a fault that pins Live on the GDI path at 98.9% of a CPU core against 25.2%, with a corrected user interface.
This patch is a revision for
0058that further defends against this behaviour. At the same time, this PR adds defensive local telemetry that will help us understand any instance where the behaviour gets out of control.TROUBLESHOOTING.mdhas a new entry for CPU spikes during mouse input. The mechanism and the test plan are innotes/ABLETON-WINE-GPU-RENDERER.md.