Skip to content

fix(fileprovider): fix EDEADLK hydration deadlock + CLI pull prefix#73

Merged
Jesssullivan merged 2 commits intomainfrom
fix/fileprovider-hydration-deadlock
Mar 10, 2026
Merged

fix(fileprovider): fix EDEADLK hydration deadlock + CLI pull prefix#73
Jesssullivan merged 2 commits intomainfrom
fix/fileprovider-hydration-deadlock

Conversation

@Jesssullivan
Copy link
Copy Markdown
Owner

Summary

  • item(for:) was returning downloaded: true (default), telling fileproviderd content was already local. Finder read attempts got EDEADLK because no local content existed. Fix: return downloaded: false for non-root items.
  • CLI pull prefix derivation used split('/').next() which only took the first segment. For multi-segment prefixes like devices/A29247/manifests/<hash>, this gave devices instead of devices/A29247. Fix: use rsplit_once("/manifests/").

Test plan

  • Push file with --prefix devices/<id>, pull via CLI — chunks found correctly
  • Open placeholder file in Finder CloudStorage — triggers fetchContents instead of EDEADLK
  • Domain reset + enumerate shows files as placeholders with correct download state

The Swift FileProvider extension calls tcfs_provider_enumerate_changes()
but cbindgen was not exporting TcfsChangeEvent, causing the function
declaration to be omitted from the generated header. This resulted in
an undefined symbol linker error on aarch64-darwin.
…LK hydration

item(for:) was returning downloaded=true (default), which told fileproviderd
the content was already materialized locally. When Finder tried to read the
file, it got EDEADLK because no local content existed.

Also fixes CLI pull prefix derivation for multi-segment prefixes like
devices/A29247 — rsplit_once("/manifests/") instead of split("/").next().
@Jesssullivan Jesssullivan merged commit f15fa9d into main Mar 10, 2026
7 of 8 checks passed
@Jesssullivan Jesssullivan deleted the fix/fileprovider-hydration-deadlock branch April 5, 2026 20:50
Jesssullivan added a commit to tinyland-inc/tummycrypt that referenced this pull request Apr 8, 2026
…esssullivan#73)

* fix(fileprovider): add TcfsChangeEvent to cbindgen exports

The Swift FileProvider extension calls tcfs_provider_enumerate_changes()
but cbindgen was not exporting TcfsChangeEvent, causing the function
declaration to be omitted from the generated header. This resulted in
an undefined symbol linker error on aarch64-darwin.

* fix(fileprovider): return downloaded=false in item(for:) to fix EDEADLK hydration

item(for:) was returning downloaded=true (default), which told fileproviderd
the content was already materialized locally. When Finder tried to read the
file, it got EDEADLK because no local content existed.

Also fixes CLI pull prefix derivation for multi-segment prefixes like
devices/A29247 — rsplit_once("/manifests/") instead of split("/").next().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant