Skip to content

Server folder index with heavy tombstone history crash-loops the app ~1s after connect; app burns a new device identity on each crash #135

Description

@tr3lane

Environment: VaultSync 1.8.2 (iOS 18, iPhone 12) ↔ Syncthing v2.1.2 server (Windows), LAN sync (also reproduces over relays).

Bug 1: server folder index with heavy deletion/tombstone history crash-loops the app ~1 second after connect

Symptom: the app connects (TLS completes, hello exchanged), then hard-resets the connection ~1s later — right at index exchange. Server log signature, repeating every ~10s:

Established secure connection (... TLS1.3-TLS_CHACHA20_POLY1305_SHA256 ...)
New device connection (... remote.client=syncthing remote.version=unknown-dev ...)
Lost device connection (... error="reading length: read tcp ...: wsarecv: An existing connection
  was forcibly closed by the remote host.")

Reproduces on every transport (TCP both dial directions, QUIC, relay) and on LAN with full connectivity — so it is not a network issue.

Evidence chain:

  • The folder (≈9,200 files / 1.1 GB, mostly small markdown) synced fine on first pairing — 543 MiB transferred at full LAN speed.
  • After ~4 days of server-side churn (heavy renames/deletes — i.e. a tombstone-rich index), every connection died at the ~1s mark, permanently.
  • Two fresh app reinstalls reproduced it identically → not app-local state.
  • Control test: a fresh 3-file folder shared from the same server to the same phone on the same network synced to 100% and the connection held → fault isolated to the original folder's served index.
  • A server-side scan of the live index (/rest/db/browse, all entries) found no pathological names/mtimes/types — the poison is in the non-browsable layer (deletion tombstones / version vectors).
  • Fix that proves the mechanism: rebuilding the folder's index server-side (remove folder from config → restart → re-add same config → rescan; files untouched) fixed it instantly. Reproduced the fix on a second affected folder (622 files / 318 MB) same day.

Looks like the app's index-exchange parser aborts (and the app hard-crashes) on some tombstone/version-vector record shape that desktop Syncthing peers accept without complaint.

Possibly related: earlier, offering a 2nd folder mid-initial-sync triggered an identical RST loop — may be the same parser abort with a different trigger.

Bug 2: the app generates a NEW device identity after each hard crash

During the crash-loop above, the app burned through 5 device identities in one day (each crash → new device ID → appears server-side as a brand-new pending device). This makes diagnosis very confusing (looks like repeated reinstalls), orphans stale device entries on the server, and resets sync completion tracking each cycle. Expected: device identity should survive a crash.


Happy to provide full timestamped server-side logs for any of the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions