Summary
On a macOS guest, clipboard sharing became permanently stuck on stale content after the per-user spice-vdagent process crashed once. The agent did not restart automatically. Manually kickstarting the LaunchAgent immediately restored host-to-guest clipboard updates.
Both macOS plists currently set:
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<false/>
</dict>
According to launchd.plist(5), Crashed=true restarts a job after a crash signal such as SIGSEGV; false restarts it only in the inverse condition. Consequently, a single crash leaves the clipboard agent stopped indefinitely.
Environment
- macOS guest: 15.7.3 (24G419), arm64
- Virtual machine: Apple Virtualization backend (
Apple Virtual Machine 1)
- Guest tools package:
com.redhat.spice.vdagent 0.22.1
- Installed plist matches the current repository version
The host UTM version was not available from inside the guest, but the issue is in the guest LaunchAgent policy and the installed package matches this repository's latest release.
Observed evidence
After clipboard synchronization stopped:
$ launchctl print gui/501/com.redhat.spice.vdagent
state = not running
runs = 1
successive crashes = 1
last terminating signal = Segmentation fault: 11
At the same time:
spice-vdagentd was running.
/dev/tty.com.redhat.spice.0 existed.
/var/run/spice-vdagent-sock existed.
- The local macOS pasteboard service was running.
Restarting the user agent:
launchctl kickstart -k gui/$(id -u)/com.redhat.spice.vdagent
produced:
While copying fresh text on the host, the guest NSPasteboard.changeCount then changed from 358 to 359, and the new host text pasted successfully in the guest. This rules out the host clipboard setting, virtio channel, and guest pasteboard as the persistent failure.
The original agent crash trigger was not recovered because no .ips crash report was generated. This issue is specifically about the deterministic failure to recover after any crash.
Likely regression
Commit c729770 ("darwin: fix launch scripts") changed Crashed from true to false in both:
That appears to invert the intended restart behavior. The daemon is exposed to the same permanent-stop failure if it crashes.
Expected behavior
If spice-vdagent or spice-vdagentd crashes, launchd should restart it (with appropriate throttling) so clipboard sharing recovers without requiring a VM reboot or manual launchctl kickstart.
Suggested fix
Restore <true/> for KeepAlive.Crashed in both macOS plists, or add another supervised recovery mechanism if avoiding an unbounded crash loop is the reason for the current setting.
Summary
On a macOS guest, clipboard sharing became permanently stuck on stale content after the per-user
spice-vdagentprocess crashed once. The agent did not restart automatically. Manually kickstarting the LaunchAgent immediately restored host-to-guest clipboard updates.Both macOS plists currently set:
According to
launchd.plist(5),Crashed=truerestarts a job after a crash signal such asSIGSEGV;falserestarts it only in the inverse condition. Consequently, a single crash leaves the clipboard agent stopped indefinitely.Environment
Apple Virtual Machine 1)com.redhat.spice.vdagent0.22.1The host UTM version was not available from inside the guest, but the issue is in the guest LaunchAgent policy and the installed package matches this repository's latest release.
Observed evidence
After clipboard synchronization stopped:
At the same time:
spice-vdagentdwas running./dev/tty.com.redhat.spice.0existed./var/run/spice-vdagent-sockexisted.Restarting the user agent:
launchctl kickstart -k gui/$(id -u)/com.redhat.spice.vdagentproduced:
While copying fresh text on the host, the guest
NSPasteboard.changeCountthen changed from358to359, and the new host text pasted successfully in the guest. This rules out the host clipboard setting, virtio channel, and guest pasteboard as the persistent failure.The original agent crash trigger was not recovered because no
.ipscrash report was generated. This issue is specifically about the deterministic failure to recover after any crash.Likely regression
Commit
c729770("darwin: fix launch scripts") changedCrashedfromtruetofalsein both:com.redhat.spice.vdagent.plistcom.redhat.spice.vdagentd.plistThat appears to invert the intended restart behavior. The daemon is exposed to the same permanent-stop failure if it crashes.
Expected behavior
If
spice-vdagentorspice-vdagentdcrashes, launchd should restart it (with appropriate throttling) so clipboard sharing recovers without requiring a VM reboot or manuallaunchctl kickstart.Suggested fix
Restore
<true/>forKeepAlive.Crashedin both macOS plists, or add another supervised recovery mechanism if avoiding an unbounded crash loop is the reason for the current setting.