This repository was archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Problems when file://
storage runs out of space #67
Copy link
Copy link
Open
Labels
Description
Steps to reproduce:
- Mount tmpfs with a size limit
- Create ZboxFS
file://
storage on that size - Create a
zbox::File
there and start filling it with data (withoutfinish
ing) ad infinum.
Expected:
Eventually std::io::Write::write
returns IO error suggesting that allowed storage space is exhaused. Ideally the file may be finish()
ed at that point, with the data previously accepted by std::io::Write::write
without error being guaranteed to fit on remaining space.
Actual:
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: "/file" "security.capability"
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: error 61
[2020-01-01T00:45:51Z DEBUG fuse::request] WRITE(153376) ino 0x0000000000000002, fh 0, offset 314085376, size 4096, flags 0x0
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] write: "/file" 0x1000 @ 0x12b89000
[2020-01-01T00:45:51Z DEBUG fuse::request] GETXATTR(153377) ino 0x0000000000000002, name "security.capability", size 0
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: "/file" "security.capability"
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: error 61
[2020-01-01T00:45:51Z DEBUG fuse::request] WRITE(153378) ino 0x0000000000000002, fh 0, offset 314089472, size 4096, flags 0x0
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] write: "/file" 0x1000 @ 0x12b8a000
[2020-01-01T00:45:51Z DEBUG zbox::trans::txmgr] run tx failed: Io(Custom { kind: Other, error: "other os error" })
[2020-01-01T00:45:51Z DEBUG zbox::trans::txmgr] abort tx#3
[2020-01-01T00:45:51Z WARN zbox::trans::txmgr] abort tx#3 failed: No space left on device (os error 28)
[2020-01-01T00:45:51Z ERROR zboxmount::zboxfuse] IO error: other os error
[2020-01-01T00:45:51Z WARN fuse::request] Ignoring unknown FUSE operation 40
[2020-01-01T00:45:51Z DEBUG fuse::request] GETXATTR(153380) ino 0x0000000000000002, name "security.capability", size 0
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: "/file" "security.capability"
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] getxattr: error 61
[2020-01-01T00:45:51Z DEBUG fuse::request] WRITE(153381) ino 0x0000000000000002, fh 0, offset 314089472, size 4096, flags 0x0
[2020-01-01T00:45:51Z DEBUG fuse_mt::fusemt] write: "/file" 0x1000 @ 0x12b8a000
[2020-01-01T00:45:51Z DEBUG zbox::trans::txmgr] run tx failed: Io(Custom { kind: Other, error: "other os error" })
[2020-01-01T00:45:51Z DEBUG zbox::trans::txmgr] abort tx#3
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/3eeb8d4f2fbae0bb1c587d00b5abeaf938da47f4/src/libcore/macros/mod.rs:15:40
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:84
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:61
4: core::fmt::write
at src/libcore/fmt/mod.rs:1025
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1426
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:65
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:50
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:193
9: std::panicking::default_hook
at src/libstd/panicking.rs:210
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:471
11: rust_begin_unwind
at src/libstd/panicking.rs:375
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:84
13: core::panicking::panic
at src/libcore/panicking.rs:51
14: core::option::Option<T>::unwrap
at /rustc/3eeb8d4f2fbae0bb1c587d00b5abeaf938da47f4/src/libcore/macros/mod.rs:15
15: zbox::trans::txmgr::TxMgr::abort_trans
at /home/vi/.cargo/registry/src/github.com-1ecc6299db9ec823/zbox-0.8.8/src/trans/txmgr.rs:157
16: zbox::trans::txmgr::TxHandle::abort
at /home/vi/.cargo/registry/src/github.com-1ecc6299db9ec823/zbox-0.8.8/src/trans/txmgr.rs:238
17: zbox::trans::txmgr::TxHandle::run
at /home/vi/.cargo/registry/src/github.com-1ecc6299db9ec823/zbox-0.8.8/src/trans/txmgr.rs:208
18: <zbox::file::File as std::io::Write>::write
at /home/vi/.cargo/registry/src/github.com-1ecc6299db9ec823/zbox-0.8.8/src/file.rs:586
...
Additionally, storage cannot be opened again after that:
[2020-01-01T00:52:25Z INFO zbox::base] ZboxFS v0.8.8 - Zero-details, privacy-focused in-app file system
[2020-01-01T00:52:25Z INFO zbox::fs::fs] open repo: file:///tmp/limit/q, read_only: false
[2020-01-01T00:52:25Z DEBUG zbox::volume::volume] volume opened: Storage(FileStorage { base: "/tmp/limit/q" })
[2020-01-01T00:52:25Z DEBUG zbox::trans::wal] cold redo abort tx#3
[2020-01-01T00:52:25Z DEBUG zbox::trans::wal] cold abort completed
[2020-01-01T00:52:25Z DEBUG zbox::trans::wal] WalQueue opened, seq: 6, watermarks: (txid: 3, block: 6)
Error: Io(Custom { kind: Other, error: "Decrypt error" })