about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
authorBrian Olsen <brian@maven-group.org>2023-09-29T16·34+0200
committerBrian Olsen <me@griff.name>2023-10-02T12·50+0000
commit5c2cad0ac48d7f223fe76b27d3d7ea9d38529e25 (patch)
tree4ee968785e9a562925398524da31ef1d1942212c /tvix/store
parentf5a33ab15f8208b82717bfb6f045da76e8046b34 (diff)
fix(tvix/store): FuseDaemon unmount is blocking async runtime r/6686
The unmount method in FuseDaemon calls join on a bunch of threads and that is
a blocking call but it is called from an async context in the tvix-store
binary.

This change wraps the call to unmount in a spawn_blocking.

Change-Id: If89183b4a3f890874e75f5faf90cd24cb18da1e1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9489
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/bin/tvix-store.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs
index 14b38da0a5c7..aeae270f3582 100644
--- a/tvix/store/src/bin/tvix-store.rs
+++ b/tvix/store/src/bin/tvix-store.rs
@@ -350,7 +350,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             tokio::spawn(async move {
                 tokio::signal::ctrl_c().await.unwrap();
                 info!("interrupt received, unmounting…");
-                fuse_daemon.unmount()?;
+                tokio::task::spawn_blocking(move || fuse_daemon.unmount()).await??;
                 info!("unmount occured, terminating…");
                 Ok::<_, io::Error>(())
             })