You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spike: the newest vendor Linux build's gedit clipboard_write fails every sample at 10.2 s (defect or harness?) #268
The newest vendor Linux build (88ce5e0a…2991) fails gedit clipboard_write in every sample: 99 of 99 across the M3 gate runs, and again in m3-gate-musl. Each fails at the 10.2 s mark, like the pinned build's failed paste. cua's series passes as a declared operation. Nobody has checked whether this is the newest build's defect or another harness condition. The pinned build's "Copy nearly always fails" turned out to be the harness's emptied buffer.
Intent: know before M4's gates lean on that series whether its vendor bar is real.
Seams: the M3 harness's gedit clipboard_write case, and the newest vendor lane.
Constraints
Read-only diagnosis from the records first, then one probe on the VM's harness scene.
Never score a harness condition as a vendor failure.
A findings comment: what the newest build sent, what gedit and the clipboard did, and whether the scene's state (buffer, selection, ownership) explains it. If it is the harness, a fix and the series rerun.
This is the vendor builds' own route, not a harness condition. Both vendor builds (pinned 7ac3c2ae… and newest 88ce5e0a…) take CLIPBOARD themselves and then call AT-SPI EditableText.PasteText on gedit's text view. In GTK 3, that method passes a pointer to a variable on its own stack to an asynchronous clipboard request. When another process owns CLIPBOARD, the request completes after PasteText has returned, and the callback reads freed stack. The vendor builds always make their own process the owner first, so this happens every time. GTK's type checks then reject the stale buffer pointer and nothing is inserted (on arm64 the same read crashed gedit). The build polls CharacterCount until its 10 s deadline and answers editable Paste did not insert text, about 10.2 s after the request.
Mechanism (GTK 3.24.41; unchanged on the gtk-3-24 head)
gtk/a11y/gtktextviewaccessible.c:1796–1820:
PasteDatapaste; /* on the stack */
...
gtk_clipboard_request_text (clipboard, paste_received, &paste);
When the callback runs.gtk_selection_convert answers synchronously only when this process owns the selection (gtk/gtkselection.c:1157–1187). With any other owner, paste_received (:1780–1794) runs from the main loop after paste_text has returned. It calls gtk_text_buffer_get_iter_at_offset, gtk_text_buffer_insert and g_object_unref on the stale paste->buffer, and each fails its type check. Those are gedit's three criticals.
The sibling widgets are not affected. GTK 3's entry accessible was fixed to use the heap (gtkentryaccessible.c:1365, g_new0 (PasteData, 1)), and so is GTK 4's (gtkatspieditabletext.c:165, :328). Only GTK 3's text view still has the bug.
What the records show
Gate records. Every newest-build gedit clipboard_write sample with a valid handle failed with this error, at 10,202–10,205 ms. That covers m2/diff and m3's diff, gate, gate-final, gate-verdict, gate-t25 and gate-musl (40 of 40 in gate-musl). In gate-musl, each failing sample also had:
a clean preparation: a valid handle from the build's own Copy, and 0 text restores in its lane;
a clean witness and audit;
exactly one PasteText in the bus pass;
the snapshot cua171 left on CLIPBOARD afterwards.
Since task 24 repaired the buffer, the pinned build fails identically (40 of 40). cua pastes with the family's chord, 40 of 40, median 179 ms.
M0's traces of the same builds on this VM (newest-trace-clipboard):
The vendor build takes CLIPBOARD and calls PasteText(54), which returns true.
gedit asks the vendor build's owner for text/plain;charset=utf-8, and the owner serves it in full.
gedit logs the three criticals 2 ms after PasteText.
The pinned build's clipboard_write and type_text traces show the same sequence.
The probe
On harness gedit windows opened the way the gate opens them, each one's stderr kept. Evidence: m4/clipboard-write-268/.
case
answer
text
gedit's stderr
newest build's clipboard_write, prepared as the gate prepares it (3 samples)
editable Paste did not insert text, 10,203–10,204 ms
unchanged
the three criticals, 302 / 316 / 458 ms into each request
control A: gedit's own CopyText(0,6) (gedit owns CLIPBOARD), then a direct PasteText
true
cua171 inserted
nothing
control B: the same, but a separate process owns CLIPBOARD
true
unchanged
the three criticals, 8 ms after PasteText
The outcome follows which process owns CLIPBOARD. A vendor clipboard_write always makes it a process other than gedit, so no harness preparation can change the result.
What changes
No harness fix. Neither vendor build reaches 20 usable samples, so the series has no vendor bar, and cua's series passes as a declared deviation.
The deviation's reason now states the mechanism (scripts/linux-engine-diff/deviations.mjs, 7fc17bd).
The harness keeps every scene application's stderr, under <out>/apps/<label>.stderr (c474844). Toolkit criticals are now evidence in every run.
cua cannot reach this bug
The engine's only EditableText call is CopyText, for clipboard_read's Copy (native/linux-engine/src/copy.rs:242–248). CopyText copies synchronously, with heap-owned data, in every toolkit checked:
GTK 3 text view:gtktextviewaccessible.c:1695–1717, through gtk_clipboard_set_text, which keeps its own g_strndup (gtkclipboard.c:850–876).
GTK 3 entry:gtkentryaccessible.c:1255–1276.
GTK 4 (4.14.5 and main):gtkatspieditabletext.c:107–118 and :258–272, through gdk_clipboard_set_text.
Qt 5.15.13, 6.4.2 and dev:QGuiApplication::clipboard()->setText(...) in the AT-SPI adaptor (atspiadaptor.cpp:2163, :2117, :2649).
The engine's other text-related accessibility calls:
The focusing-click restore uses Text.AddSelection or Text.SetCaretOffset (field.rs:108, :110). In GTK 3 these are synchronous buffer calls.
Text itself always arrives as a key chord. In GTK 3 that runs the widget's own paste, which keeps its request on the heap (gtktextbuffer.c:3845).
(GTK 3's text-view CopyText never frees its copied string. That is a small leak inside the application, logged in tech-debt-tracker.md.)
The static guard
native/linux-engine/tests/no_text_mutators.rs (88877e2) fails cargo test, and so the engine-linux gate, when any string literal in the engine's src/ names PasteText, CutText, InsertText, DeleteText or SetTextContents. Comments are skipped, including the ones that say these are never called. I checked it failing first: a temporary PasteText call in copy.rs failed it, and it passed once the call was removed.
Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
[board] done: Spike answered: the newest build's gedit clipboard_write failures come from the vendor's own route (GTK 3's PasteText stack bug when another process owns CLIPBOARD), not a harness condition. Probe 3/3 with both controls (m4/clipboard-write-268/). cua cannot reach it: its only EditableText call is CopyText, and native/linux-engine/tests/no_text_mutators.rs guards that (lands with M4).
Follow-up: what changed after the findings comment
1. Control B rerun with control A's payload. The first run's control B served its own text, so the clipboard's contents changed along with its owner. In the rerun, the separate owner serves the same cua171 that gedit copied, which leaves the owning process as the only difference (21:47 PST; evidence; the first run is kept in run-1/).
case
answer
text
gedit's stderr
newest build's clipboard_write ×3
editable Paste did not insert text, 10,203 / 10,204 / 10,204 ms
unchanged
the three criticals, 312 / 325 / 322 ms into each request
control A: gedit owns CLIPBOARD (cua171), direct PasteText
true
cua171 inserted
nothing
control B: a separate process owns CLIPBOARD, serving the same cua171, direct PasteText
true
unchanged
the three criticals, 6 ms after PasteText
2. The guarantee is now the engine's send boundary.Bus::send (native/linux-engine/src/dbus.rs) refuses org.a11y.atspi.EditableText's PasteText, CutText, InsertText, DeleteText and SetTextContents before anything is sent, with an internal error naming the member. CopyText still goes through. call goes through send, and a calls_until batch that contains a refused call sends none of its calls. Hermetic tests over a socket pair show that nothing reaches the peer.
Two things keep that boundary the only way out to the bus:
Module privacy. The marshalling (encode_call), the call's type code, and the connection's socket and output buffer are private to dbus.
Inside dbus.rs, every socket write stays in connect (authentication) or flush (what send queued), and nothing hands the socket's descriptor out.
No other file in src/ opens or adopts a socket or raw descriptor: std, rustix or libc sockets, descriptor adoption, raw syscalls, or x11rb adopting a stream. The two allowances, each with its stated reason, are process spawning in named files and the DISPLAY X connection.
Each rule has a negative control, including a public raw_send inside dbus.rs and a rustix::net::socket opened in another module.
The literal scanner (tests/no_text_mutators.rs) only gives early warning: it catches literal spellings, and concat!, stringify! and escapes get past it. It now skips doc attributes.
3. Commits on feat/171-m4:
f66725d: the send boundary and its tests, encode_call made private, the scanner's #[doc] fix
Activity
#268: keep the scene applications' stderr as run evidence
#268: state the mechanism behind gedit clipboard_write's declared dev…
#171 M4: tech debt for GTK 3's CopyText leak (#268's check)
#268: the probe on a harness gedit, with gedit's stderr kept
#268: a static guard against AT-SPI text mutators in the engine
SSFSKIM commentedon Nov 2, 2026
Findings (M4 T2)
This is the vendor builds' own route, not a harness condition. Both vendor builds (pinned
7ac3c2ae…and newest88ce5e0a…) take CLIPBOARD themselves and then call AT-SPIEditableText.PasteTexton gedit's text view. In GTK 3, that method passes a pointer to a variable on its own stack to an asynchronous clipboard request. When another process owns CLIPBOARD, the request completes afterPasteTexthas returned, and the callback reads freed stack. The vendor builds always make their own process the owner first, so this happens every time. GTK's type checks then reject the stale buffer pointer and nothing is inserted (on arm64 the same read crashed gedit). The build pollsCharacterCountuntil its 10 s deadline and answerseditable Paste did not insert text, about 10.2 s after the request.Mechanism (GTK 3.24.41; unchanged on the
gtk-3-24head)gtk/a11y/gtktextviewaccessible.c:1796–1820:gtk_selection_convertanswers synchronously only when this process owns the selection (gtk/gtkselection.c:1157–1187). With any other owner,paste_received(:1780–1794) runs from the main loop afterpaste_texthas returned. It callsgtk_text_buffer_get_iter_at_offset,gtk_text_buffer_insertandg_object_unrefon the stalepaste->buffer, and each fails its type check. Those are gedit's three criticals.gtkentryaccessible.c:1365,g_new0 (PasteData, 1)), and so is GTK 4's (gtkatspieditabletext.c:165,:328). Only GTK 3's text view still has the bug.What the records show
Gate records. Every newest-build gedit
clipboard_writesample with a valid handle failed with this error, at 10,202–10,205 ms. That covers m2/diff and m3's diff, gate, gate-final, gate-verdict, gate-t25 and gate-musl (40 of 40 in gate-musl). In gate-musl, each failing sample also had:PasteTextin the bus pass;cua171left on CLIPBOARD afterwards.Since task 24 repaired the buffer, the pinned build fails identically (40 of 40). cua pastes with the family's chord, 40 of 40, median 179 ms.
M0's traces of the same builds on this VM (
newest-trace-clipboard):PasteText(54), which returnstrue.text/plain;charset=utf-8, and the owner serves it in full.PasteText.The pinned build's
clipboard_writeandtype_texttraces show the same sequence.The probe
On harness gedit windows opened the way the gate opens them, each one's stderr kept. Evidence:
m4/clipboard-write-268/.clipboard_write, prepared as the gate prepares it (3 samples)editable Paste did not insert text, 10,203–10,204 msCopyText(0,6)(gedit owns CLIPBOARD), then a directPasteTexttruecua171insertedtruePasteTextThe outcome follows which process owns CLIPBOARD. A vendor
clipboard_writealways makes it a process other than gedit, so no harness preparation can change the result.What changes
scripts/linux-engine-diff/deviations.mjs, 7fc17bd).<out>/apps/<label>.stderr(c474844). Toolkit criticals are now evidence in every run.cua cannot reach this bug
The engine's only
EditableTextcall isCopyText, forclipboard_read's Copy (native/linux-engine/src/copy.rs:242–248).CopyTextcopies synchronously, with heap-owned data, in every toolkit checked:gtktextviewaccessible.c:1695–1717, throughgtk_clipboard_set_text, which keeps its owng_strndup(gtkclipboard.c:850–876).gtkentryaccessible.c:1255–1276.main):gtkatspieditabletext.c:107–118and:258–272, throughgdk_clipboard_set_text.dev:QGuiApplication::clipboard()->setText(...)in the AT-SPI adaptor (atspiadaptor.cpp:2163,:2117,:2649).The engine's other text-related accessibility calls:
Text.AddSelectionorText.SetCaretOffset(field.rs:108,:110). In GTK 3 these are synchronous buffer calls.gtktextbuffer.c:3845).(GTK 3's text-view
CopyTextnever frees its copied string. That is a small leak inside the application, logged intech-debt-tracker.md.)The static guard
native/linux-engine/tests/no_text_mutators.rs(88877e2) failscargo test, and so theengine-linuxgate, when any string literal in the engine'ssrc/namesPasteText,CutText,InsertText,DeleteTextorSetTextContents. Comments are skipped, including the ones that say these are never called. I checked it failing first: a temporaryPasteTextcall incopy.rsfailed it, and it passed once the call was removed.Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
SSFSKIM commentedon Nov 2, 2026
[board] in-progress: M4 T2 took the spike (linux171).
SSFSKIM commentedon Nov 2, 2026
[board] in-review: Findings posted: #268 (comment)
SSFSKIM commentedon Nov 2, 2026
[board] done: Spike answered: the newest build's gedit clipboard_write failures come from the vendor's own route (GTK 3's PasteText stack bug when another process owns CLIPBOARD), not a harness condition. Probe 3/3 with both controls (m4/clipboard-write-268/). cua cannot reach it: its only EditableText call is CopyText, and native/linux-engine/tests/no_text_mutators.rs guards that (lands with M4).
#268: the send boundary refuses EditableText's text mutators
#268: control B rerun with control A's payload, so ownership is the o…
#268: the send boundary's source assertion covers what privacy cannot
SSFSKIM commentedon Nov 2, 2026
Follow-up: what changed after the findings comment
1. Control B rerun with control A's payload. The first run's control B served its own text, so the clipboard's contents changed along with its owner. In the rerun, the separate owner serves the same
cua171that gedit copied, which leaves the owning process as the only difference (21:47 PST; evidence; the first run is kept inrun-1/).clipboard_write×3editable Paste did not insert text, 10,203 / 10,204 / 10,204 mscua171), directPasteTexttruecua171insertedcua171, directPasteTexttruePasteText2. The guarantee is now the engine's send boundary.
Bus::send(native/linux-engine/src/dbus.rs) refusesorg.a11y.atspi.EditableText'sPasteText,CutText,InsertText,DeleteTextandSetTextContentsbefore anything is sent, with an internal error naming the member.CopyTextstill goes through.callgoes throughsend, and acalls_untilbatch that contains a refused call sends none of its calls. Hermetic tests over a socket pair show that nothing reaches the peer.Two things keep that boundary the only way out to the bus:
encode_call), the call's type code, and the connection's socket and output buffer are private todbus.tests/send_boundary.rsasserts what privacy cannot express:dbus.rs, every socket write stays inconnect(authentication) orflush(whatsendqueued), and nothing hands the socket's descriptor out.src/opens or adopts a socket or raw descriptor: std, rustix or libc sockets, descriptor adoption, raw syscalls, or x11rb adopting a stream. The two allowances, each with its stated reason, are process spawning in named files and theDISPLAYX connection.raw_sendinsidedbus.rsand arustix::net::socketopened in another module.The literal scanner (
tests/no_text_mutators.rs) only gives early warning: it catches literal spellings, andconcat!,stringify!and escapes get past it. It now skips doc attributes.3. Commits on
feat/171-m4:encode_callmade private, the scanner's#[doc]fixdbus.rsand to every socket and descriptor route elsewhereci-gate --gates engine-linux,testis GREEN on cf6d82f (https://github.com/SSFSKIM/cua/actions/runs/41398642642).Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
#171 spec: T2 (#268) and T3 folded (the vendor's PasteText bug and cu…
linux-engine 0.4.5: a Chrome drop under load is answered as it landed (…