Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: "attempt to subtract with overflow" during readdir of snapshot directory #56

Open
asomers opened this issue Aug 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@asomers
Copy link
Collaborator

asomers commented Aug 19, 2024

I mounted a FreeBSD 15.0-CURRENT VM's os disk with fuse-ufs. Running "ls /mnt/.snap" crashed the fuse server .

thread 'main' panicked at src/ufs.rs:374:19:
attempt to subtract with overflow
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/std/src/panicking.rs:662:5
   1: core::panicking::panic_fmt
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/core/src/panicking.rs:74:14
   2: core::panicking::panic_const::panic_const_sub_overflow
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/core/src/panicking.rs:181:21
   3: fuse_ufs::ufs::readdir_block
             at ./src/ufs.rs:374:13
   4: fuse_ufs::ufs::Ufs::readdir
             at ./src/ufs.rs:243:12
   5: <fuse_ufs::ufs::Ufs as fuser::Filesystem>::readdir::{{closure}}
             at ./src/ufs.rs:480:4
   6: core::ops::function::FnOnce::call_once
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/core/src/ops/function.rs:250:5
   7: fuse_ufs::ufs::run
             at ./src/ufs.rs:335:2
   8: <fuse_ufs::ufs::Ufs as fuser::Filesystem>::readdir
             at ./src/ufs.rs:490:9
   9: fuser::request::Request::dispatch_req
             at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.14.0/src/request.rs:364:17
  10: fuser::request::Request::dispatch
             at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.14.0/src/request.rs:57:25
  11: fuser::session::Session<FS>::run
             at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.14.0/src/session.rs:135:34
  12: fuser::mount2::{{closure}}
             at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.14.0/src/lib.rs:1017:78
  13: core::result::Result<T,E>::and_then
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/core/src/result.rs:1346:22
  14: fuser::mount2
             at /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.14.0/src/lib.rs:1017:5
  15: fuse_ufs::main
             at ./src/main.rs:24:2
  16: core::ops::function::FnOnce::call_once
             at /rustc/2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@realchonk realchonk added the bug Something isn't working label Aug 19, 2024
This was referenced Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants