No description
Find a file
Florian Klink ae2af10cf8 fix(castore/fs): enter the runtime context before blocking on tasks
fuse-backend-rs spawns multiple threads, but these don't automatically
inherit the tokio runtime context.

Spawning tasks from "the wrong thread" would then cause a panic, as seen
in https://git.snix.dev/snix/snix/issues/147.

However, cl/30575 didn't really fix this, it only removed one place
spawning tasks, without fixing the underlying issue.

PathInfoService / BlobService / DirectoryService are expected to spawn
tasks. We need to simply invoke `.enter()` from all worker threads, and
that's what this CL does.

An alternative would be to manually (re)-enter inside every function of
the FileSystem trait, but that'd be very messy.

A similar fix needs to end up in the virtiofs implementation, but we
don't have control over the (single) thread being spawned by
VhostUserDaemon there, so cannot just enter the runtime context there,
so virtiofs will stay broken for now.

Maybe it's time to re-architect this a bit - have our FileSystem impl
be little code and call to sync endpoints to do the actual work, which
is then handled by workers on another thread - but that's left for
another CL.

Change-Id: I58cdbd952f4ecc39bdc2f2fa69a788caa0cc78ba
Reviewed-on: https://cl.snix.dev/c/snix/+/30585
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
2025-06-29 15:35:18 +00:00
.gcroots feat(.envrc): gcroot third_party.sources 2022-09-15 11:27:53 +00:00
.nixery chore(3p/sources): bump to OpenSSH vulnerability hotfix 2024-07-01 17:42:30 +00:00
contrib refactor(nix-compat/nixhash/ca_hash): inline algo_str 2025-06-05 19:20:12 +00:00
fun/solves-this fix(ops): drop clbot 2025-05-16 09:22:00 +00:00
nix chore: Remove buildGo and supporting infrastructure 2025-03-21 09:58:25 +00:00
ops refactor(ops/gerrit-webhook-to-irccat): use streams data types 2025-06-29 14:05:48 +00:00
snix fix(castore/fs): enter the runtime context before blocking on tasks 2025-06-29 15:35:18 +00:00
third_party feat(modules/monorepo-gerrit): 3.11.0 -> 3.12.0 2025-06-22 17:55:52 +00:00
tools fix(tools/depotfmt.nix): double specification of edition 2025-04-30 08:42:36 +00:00
web docs(web): remove dead github mirror link 2025-06-15 16:49:53 +00:00
.editorconfig feat(editorconfig): add global editorconfig 2025-03-19 11:35:35 +00:00
.envrc chore: fix unreleased direnv bug 2025-04-09 22:39:01 +00:00
.git-blame-ignore-revs fix: add cl/4397 (treewide nixpkgs-fmt) to git-blame-ignore-revs 2022-02-07 18:15:09 +00:00
.gitignore chore: add .direnv to gitignore 2025-04-12 18:12:35 +00:00
.gitreview chore: Introduce .gitreview file 2024-08-31 13:05:23 +00:00
.hgignore chore(hgignore): ignore .git for hg 2020-06-14 18:23:13 +00:00
.mailmap chore(mailmap): add edef 2025-04-01 18:47:29 +00:00
.rgignore chore: Only exclude //third_party/git from ripgrep 2020-05-17 23:58:22 +01:00
buf.gen.yaml fix(treewide): add missing final newlines 2025-03-21 13:33:32 +00:00
buf.yaml chore(buf): Use nixpkgs-provided buf 2022-10-21 18:39:03 +00:00
default.nix fix(default.nix): drop usersFilter 2025-03-20 12:21:44 +00:00
LICENSE feat(LICENSE): add Snix Project 2025-03-17 12:45:09 +00:00
OWNERS chore: update OWNERS 2025-03-20 12:21:43 +00:00
README.md chore(*): drop everything that is not required for Tvix 2025-03-17 16:18:26 +00:00
RULES feat(whitby): Let sterni bear the wheel 2021-05-23 19:06:15 +00:00
rustfmt.toml feat(depotfmt): Check & format Rust code with rustfmt 2022-02-08 12:06:39 +00:00

Snix is a modern Rust re-implementation of the components of the Nix package manager.

For more information, checkout the website, hosted at snix.dev, which also is available in the web/ subdirectory of this repository.