catfs icon indicating copy to clipboard operation
catfs copied to clipboard

Thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0'

Open Nutomic opened this issue 7 years ago • 3 comments

I can reproduce this crash most times (but not always) with the following steps:

  1. create a large media file in (in my case, a 1.5GB mp4)
  2. run cat file.mp4
  3. press Control+C *multiple times) to cancel the cat command

Of course it doesn't make much sense to do this, I was just testing stuff. And if the error occurs here, it might also occur in other cases.

2018-06-18 07:14:34 ERROR - "file.mp4" is not a valid cache file, deleting
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', src/catfs/error.rs:56:30
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: std::panicking::begin_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <catfs::catfs::error::RError<E>>::from
  11: catfs::catfs::file::Handle::copy
  12: <F as threadpool::FnBox>::call_box
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', src/catfs/error.rs:56:30
stack backtrace:
   0:     0x560f168c7f6b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h79684051ac41db78
   1:     0x560f168cddce - std::sys_common::backtrace::print::h9921892c7d251199
   2:     0x560f168c1bc0 - std::panicking::default_hook::{{closure}}::hb1ef6f271daa5072
   3:     0x560f168c16f6 - std::panicking::default_hook::h2b67894d489b9efc
   4:     0x560f168c200b - std::panicking::rust_panic_with_hook::h41c9d3408267e857
   5:     0x560f168c1e5e - std::panicking::begin_panic::h831f3212b8c92f84
   6:     0x560f168c1dca - std::panicking::begin_panic_fmt::h6b11c1b1e86a67d8
   7:     0x560f168c1d62 - rust_begin_unwind
   8:     0x560f168e5190 - core::panicking::panic_fmt::h53107fe7defdc8ff
   9:     0x560f168e5133 - core::panicking::panic_bounds_check::h085a39af45a0b18e
  10:     0x560f167c93b7 - <catfs::catfs::error::RError<E>>::from::h27d490962b8b7e54
  11:     0x560f167b0836 - <catfs::catfs::file::Handle as core::ops::drop::Drop>::drop::h1938f76c4e2338fe
  12:     0x560f167aa27b - core::ptr::drop_in_place::h67e4fafbf0527b3c
  13:     0x560f167aa37b - core::ptr::drop_in_place::h945f3a163c1a7185
  14:     0x560f167aa147 - <F as threadpool::FnBox>::call_box::h5aefb8f0e430b8fc
  15:     0x560f168bda13 - std::sys_common::backtrace::__rust_begin_short_backtrace::heceb445b827e0f72
  16:     0x560f168dbc6e - __rust_maybe_catch_panic
  17:     0x560f168bad72 - <F as alloc::boxed::FnBox<A>>::call_box::h283e02a755a98629
  18:     0x560f168caf57 - std::sys_common::thread::start_thread::hbfbd91005df9c030
  19:     0x560f168c2588 - std::sys::unix::thread::Thread::new::thread_start::h8f1e91b7a8bfa5fb
  20:     0x7f97c456d6da - start_thread
  21:     0x7f97c407e88e - __clone
  22:                0x0 - <unknown>
thread panicked while panicking. aborting.

SSHFS version 2.8 FUSE library version: 2.9.7 fusermount version: 2.9.7 using FUSE kernel interface version 7.19 catfs 0.8.0 cargo 0.26.0 Ubuntu 18.04 Linux 4.15.0-23-generic

Nutomic avatar Jun 18 '18 05:06 Nutomic

Could you retest with the latest master?

gaul avatar Dec 06 '20 03:12 gaul

Still happening on latest master

tnachen avatar Jun 30 '21 06:06 tnachen

What is the backtrace?

gaul avatar Jun 30 '21 14:06 gaul