spacedriveapp / spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
https://spacedrive.com
GNU Affero General Public License v3.0
30.73k stars 900 forks source link

Panicked after click Root #1607

Open tttturtle-russ opened 11 months ago

tttturtle-russ commented 11 months ago

Describe the bug

when i want to look through files in / ,i clicked Root ,then the app panicked.And then i want to restart it,however,it throw segmentation fault.I tried these commands to make it work again,but still can not open Root

rm -rf ~/.local/share/spacedrive
rm -rf ~/.cache/spacedrive

Reproduction

  1. Open spacedrive
  2. click Root
  3. Panicked ...

Expected behavior

No response

Platform and versions

➜ pnpm --version && cargo --version && rustc --version
8.9.2
cargo 1.73.0
rustc 1.73.0 (cc66ad468 2023-10-03) (Arch Linux rust 1:1.73.0-1)

### Stack trace

```Shell
➜ ./Spacedrive-linux-x86_64.AppImage
2023-10-17T06:08:37.460150Z  INFO sd_core: Starting core with data directory '/home/russ/.local/share/spacedrive'
2023-10-17T06:08:37.500738Z  INFO sd_core::p2p::p2p_manager: Node '12D3KooWNkrGVJMjZucj6YQaquQJj12cL514BRVq7G3VntgoJwr5' is now online listening at addresses: {}
2023-10-17T06:08:37.585751Z  INFO sd_core: Spacedrive online.
2023-10-17T06:08:37.593037Z  INFO sd_desktop::tauri_plugins: Internal server listening on: http://127.0.0.1:37299

** (spacedrive:295661): WARNING **: 14:09:02.795: atk-bridge: get_device_events_reply: unknown signature
2023-10-17T06:10:41.903590Z ERROR sd_core: panicked at library/std/src/sys/unix/time.rs:77:9:
assertion failed: tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64 panic.file="library/std/src/sys/unix/time.rs:77" panic.column=9
fatal runtime error: failed to initiate panic, error 3
[1]    295661 IOT instruction (core dumped)  ./Spacedrive-linux-x86_64.AppImage

Additional context

No response

HeavenVolkoff commented 10 months ago

@Brendonovich @fogodev, any idea what may be causing this? Seems like an internal panic inside rust std?

Brendonovich commented 10 months ago

here's the code that's panicking

const fn new(tv_sec: i64, tv_nsec: i64) -> Timespec {
    assert!(tv_nsec >= 0 && tv_nsec < NSEC_PER_SEC as i64);
    // SAFETY: The assert above checks tv_nsec is within the valid range
    Timespec { tv_sec, tv_nsec: unsafe { Nanoseconds(tv_nsec as u32) } }
}

maybe a file has an invalid value for tv_nsec? kinda hard to tell without a full stacktrace.

tttturtle-russ commented 10 months ago

Sorry, but the stack trace above is all.And i know a little about rust so that i can't help with the code