Skip to content

[Bug]: SSH host stays in reconnection-failed after macOS sleep; no retry on wake #26888

Closed

Description

@Tamaz-sujashvili

Operating system

macOS 26.6.2 (client, Apple Silicon). SSH host: Ubuntu 26.04.1 LTS x86_64, reached directly over the public internet. No Tailscale or VPN.

Orca version

1.4.223 (relay 0.1.0+0d9e2827fa5f).

Details

Short summary

After a 27-minute sleep the app did not reconnect its SSH host. Forty minutes after full wake the host was still down, with the terminal state reconnection-failed. A plain ssh to the same host from the same Mac worked at that moment. A manual reconnect in the app worked at once.

Timeline (local time, UTC+4)

Time Event
16:23:06 Mac sleeps (Entering Sleep state due to 'Software Sleep')
16:23:31 Relay on the host reaps the client: Client write closed: Relay client stopped answering
16:39:25–16:39:27 DarkWake, 2 s
16:44:05–16:44:20 DarkWake, 15 s
16:50:23 Full wake, display on
16:50:59 crash.breadcrumb self_tree_kill, site: run-process-tree, scope: posix-process-group in main.trace.ndjson. I do not know whether it is related
17:30 orca host list reports ssh target … not connected (reconnection-failed). ssh <host> true from the same Mac succeeds. The relay log shows no client since 16:23:31
17:36:19 Manual reconnect in the app. Relay log: Socket client accepted

The sessions on the host were alive the whole time.

For comparison, on 1.4.222 the same day, after a 9-minute lid-closed sleep the relay accepted the client again 28 seconds after wake.

What I think happens (not verified in the code)

The reconnect attempts are spent while the Mac is asleep or in the two short DarkWakes, when the network is not usable. The state then becomes terminal (reconnection-failed) and nothing retries on the real wake.

Expected

  • A reconnection-failed SSH host retries on system wake and when the network comes back, not only on a manual click.
  • Attempts made during sleep or DarkWake do not count against the retry budget.

Possibly related

Activity

  1. AmethystLiang commented on Oct 9, 2026

    @AmethystLiang
    Contributor

    Thanks for reporting. Looking into it

  2. self-assigned this
    on Oct 9, 2026
  3. OrcaWin commented on Oct 11, 2026

    @OrcaWin
    Collaborator

    Update after the SSH relay retirement (#27214, #27215): this can still happen on the managed-server path. On wake, Orca now re-probes each managed server's tunnel twice and reconnects (src/main/ssh/orcad-managed-tunnel-resume.ts), but a host that already hit reconnection-failed (src/main/ssh/ssh-connection.ts) isn't retried on network return, and attempts spent during DarkWake still count.

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

Metadata

Metadata

Assignees

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