From 5c2cad0ac48d7f223fe76b27d3d7ea9d38529e25 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Fri, 29 Sep 2023 18:34:41 +0200 Subject: [PATCH] fix(tvix/store): FuseDaemon unmount is blocking async runtime 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 Reviewed-by: Connor Brewster --- tvix/store/src/bin/tvix-store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 14b38da0a..aeae270f3 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> { 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>(()) })