Canop / dysk

A linux utility to get information on filesystems, like df but better
https://dystroy.org/dysk
MIT License
890 stars 25 forks source link

lfs crash with Plan9 mount points ( seen on wsl / Windows-Subsystems for Linux ) #36

Closed lordrasmus closed 2 years ago

lordrasmus commented 2 years ago

RUST_BACKTRACE=1 ./target/debug/lfs -a thread 'main' panicked at 'attempt to subtract with overflow', /home/ramin/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-core-0.8.1/src/stats.rs:67:9 stack backtrace: 0: rust_begin_unwind at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5 1: core::panicking::panic_fmt at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14 2: core::panicking::panic at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:48:5 3: lfs_core::stats::Stats::inodes_used at /home/ramin/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-core-0.8.1/src/stats.rs:67:9 4: lfs_core::stats::Stats::inodes_use_share at /home/ramin/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-core-0.8.1/src/stats.rs:73:13 5: lfs::table::print at ./src/table.rs:53:34 6: lfs::main at ./src/main.rs:65:9 7: core::ops::function::FnOnce::call_once at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

i could try to debug it a bit for you

but how can i compile lfs with a git checkout of lfs-core ?

Canop commented 2 years ago

To start with, lfs is only compatible with linux.

I have no idea how|if WSL manages pseudo filesystems like /proc and /sys/block and I won't install Windows to test.

If you do want to try and maybe make lfs-core compatible with Windows, fetch both lfs and lfs-core repositories, then uncomment the last line in the lfs/Cargo.toml manifest.

At some point you should probably come to the miaou chat.

lordrasmus commented 2 years ago

i don't think it will be be a problem to make lfs-core compatible with wsl

it's basically a linux kernel running an vm

i guess ist a problem with 9p mounts so it should happen on normal linux with a 9p mount to

but i will have i look at it when the lfs-core checkout is working :)

how can i enter the miaou chat ? never used that

i gues ist a room on this website https://miaou.dystroy.org/rooms ?

Canop commented 2 years ago

The best room to speak about lfs in English is https://miaou.dystroy.org/3768

But you may wait to have something running before

Canop commented 2 years ago

As discussed with lordrasmus: the inodes related info given by the pseudo filesystem aren't consistent. I'll change lfs to only load size info and bypass inodes info when those info don't make sense.