Skip to content

usb-debug (hosted): a 335-char InputText overruns the app's message queue (ServerQueueFull), and a client that dies mid-command wedges the single-client slot #24

Description

@tobyjaguar

Environment: KeyOS v1.4.0 (eb2c2edb3) hosted simulator, macOS arm64, loopback usb-debug channel (127.0.0.1:7664).

Sequence observed (2026-09-09):

  1. A client sent one InputText of 335 characters (670 key events) to the focused app. The app stalled and gui-server logged Could not send OnVSyncMessage: ServerQueueFull roughly 35 times per second from then on (the per-server message queue in the hosted kernel is shallow and inject_key overruns it).
  2. The client gave up and closed its socket mid-exchange.
  3. From then on every new connection was refused with usb-debug: refusing 127.0.0.1:<port>, the debug channel already has a client; the single-client serve loop still considered the dead socket its client. Only restarting the simulator recovered the channel.

Expected: (a) a large InputText should be paced or chunked inside usb-debug (or rejected with an error) instead of overrunning the app's queue; (b) a client that disconnects mid-command should free the single-client slot so the next client can connect.

Workaround we use: chunk text to about 24 characters with a short pause (works on hardware too, where injection runs at roughly 20 characters per second regardless of chunking), and never leave a client half-connected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions