Skip to content

Daemon can become permanently non-responsive after repeated operations #1

Description

@c-wri

Observed

After repeated paste/use, the daemon can enter a state where operations keep failing until clipreg.service is manually restarted. Restarting immediately restores operation. The journal currently provides no useful failure signal for the stuck state.

Violated invariant

A bounded operation must return the daemon to command-ready state or fail observably. An alive-but-permanently-unusable daemon violates the runtime liveness contract.

Investigation / acceptance

  • Instrument transaction phase/progress without logging clipboard payloads.
  • Identify whether the stall is Wayland dispatch, data-source lifecycle, transfer completion, transaction cleanup, socket/client state, or another bounded state transition.
  • Add the lowest-level durable regression that reproduces the root cause.
  • Stress repeated paste/grab operations on supported COSMIC while recording NRestarts and post-loop command responsiveness.
  • Service restart is containment only and does not close this issue.

Current corrective evidence

PR #2 identified the escaped root cause: stable_snapshot_current() could synchronously receive ClipReg's own restored selection instead of routing through the existing self-owned clone boundary, deadlocking the single Wayland event loop.

The corrective checkpoint has:

  • a regression that failed on the pre-fix beta and passes after correction;
  • green Ubuntu 24.04 canonical CI;
  • live Pop!_OS/COSMIC Terminal stress evidence with 39 traced operations;
  • repeated snapshot-clipboard-clone-owned / snapshot-primary-clone-owned progress;
  • bounded terminal-grab failures returning through transaction-finish rather than poisoning daemon state;
  • NRestarts remaining 0 -> 0;
  • post-loop clipreg list, clipreg doctor, and clipreg app responsiveness.

The liveness acceptance conditions are therefore satisfied by the candidate. Keep this issue open until PR #2 is integrated, then close it as fixed.

Separate terminal input/selection defects exposed during the same run are tracked independently in #5 and #6 and remain blockers for v0.2.0-rc.1; they do not invalidate the liveness evidence because those failures were bounded and command-ready state was preserved.

This issue blocks v0.2.0-rc.1 promotion until the corrective PR is integrated.

Metadata

Metadata

Assignees

Labels

area:runtimeNative daemon, protocol, transaction, or persistence behaviorbugSomething is not workingpriority:blockerBlocks the next release promotionrelease:0.2Targets the v0.2.0 line

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions