tvix/store/fuse: Debug assert triggered in DumbSeeker when reading file

#302
Opened by cbrewster at 2023-09-10T13·46+00

Steps to reproduce:

Stack trace:

thread 'tokio-runtime-worker' panicked at 'absolute_offset is larger than self.pos', store/src/blobservice/dumb_seeker.rs:64:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: JoinError::Panic(Id(26), ...)

  1. thread 'tokio-runtime-worker' panicked at 'absolute_offset is larger than self.pos', store/src/blobservice/dumb_seeker.rs:62:9
    stack backtrace:
       0:     0x55c8e2de3e21 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h63269f8f54853ab3
       1:     0x55c8e2e0fb6f - core::fmt::write::h250dd3fc350bbada
       2:     0x55c8e2df07e1 - std::io::Write::write_fmt::h0fd841d7fefd9302
       3:     0x55c8e2de3c25 - std::sys_common::backtrace::print::hc99c547a903c74f7
       4:     0x55c8e2df88d7 - std::panicking::default_hook::{{closure}}::h5bbb3f780658c969
       5:     0x55c8e2df8642 - std::panicking::default_hook::h1946653929a625f2
       6:     0x55c8e2df8cac - std::panicking::rust_panic_with_hook::h8216316e1970270b
       7:     0x55c8e2de40d1 - std::panicking::begin_panic_handler::{{closure}}::h45b7865605f63cc8
       8:     0x55c8e2de3f06 - std::sys_common::backtrace::__rust_end_short_backtrace::h2efe3248368b98bf
       9:     0x55c8e2df89d2 - rust_begin_unwind
      10:     0x55c8e1ee4593 - core::panicking::panic_fmt::h90a1387c4eee835e
      11:     0x55c8e222f7e4 - <tvix_store::blobservice::dumb_seeker::DumbSeeker<R> as std::io::Seek>::seek::h6231f54032221d17
                                   at /home/flokli/dev/nixos/code.tvl.fyi-submit2/tvix/store/src/blobservice/dumb_seeker.rs:62:9
      12:     0x55c8e21b47a7 - std::io::impls::<impl std::io::Seek for alloc::boxed::Box<S>>::seek::h304a356439953d3f
                                   at /build/rustc-1.71.1-src/library/std/src/io/impls.rs:194:9
      13:     0x55c8e21376ca - <tvix_store::fuse::FUSE as fuser::Filesystem>::read::h12eaf487bde2e6c5
                                   at /home/flokli/dev/nixos/code.tvl.fyi-submit2/tvix/store/src/fuse/mod.rs:504:20
      14:     0x55c8e1f1bbd6 - fuser::request::Request::dispatch_req::hd7bb99be9236c4f1
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.12.0/src/request.rs:305:17
      15:     0x55c8e1f1e070 - fuser::request::Request::dispatch::h98ecb4c9c1da2e78
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.12.0/src/request.rs:56:25
      16:     0x55c8e201ae80 - fuser::session::Session<FS>::run::h5917497bf3d29919
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuser-0.12.0/src/session.rs:133:34
      17:     0x55c8e1ef24db - tvix_store::main::{{closure}}::{{closure}}::h3fc9e572ba247c1e
                                   at /home/flokli/dev/nixos/code.tvl.fyi-submit2/tvix/store/src/bin/tvix-store.rs:295:27
      18:     0x55c8e202918e - <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll::h8d77587a7e6c84cb
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/blocking/task.rs:42:21
      19:     0x55c8e1f6f08f - tokio::runtime::task::core::Core<T,S>::poll::{{closure}}::ha1ccb0f2c4bead04
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/core.rs:223:17
      20:     0x55c8e2017f8f - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::h4a55b0ddfd829c76
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/loom/std/unsafe_cell.rs:14:9
      21:     0x55c8e1f6d39b - tokio::runtime::task::core::Core<T,S>::poll::h5e0756932b4fbb24
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/core.rs:212:13
      22:     0x55c8e1f00681 - tokio::runtime::task::harness::poll_future::{{closure}}::hc2b324219ddad08d
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/harness.rs:476:19
      23:     0x55c8e1f38d03 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h358647d59fc64d48
                                   at /build/rustc-1.71.1-src/library/core/src/panic/unwind_safe.rs:271:9
      24:     0x55c8e1f154bb - std::panicking::try::do_call::h677c005ef5e80d69
                                   at /build/rustc-1.71.1-src/library/std/src/panicking.rs:500:40
      25:     0x55c8e1f1a5fb - __rust_try
      26:     0x55c8e1f13fe8 - std::panicking::try::hd2ee0d14be5dfde8
                                   at /build/rustc-1.71.1-src/library/std/src/panicking.rs:464:19
      27:     0x55c8e1f575ea - std::panic::catch_unwind::h977c08646731d7bc
                                   at /build/rustc-1.71.1-src/library/std/src/panic.rs:142:14
      28:     0x55c8e1efd196 - tokio::runtime::task::harness::poll_future::h79595959262c30e0
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/harness.rs:464:18
      29:     0x55c8e1f01a4b - tokio::runtime::task::harness::Harness<T,S>::poll_inner::h56d014598498231d
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/harness.rs:198:27
      30:     0x55c8e1f06373 - tokio::runtime::task::harness::Harness<T,S>::poll::hec4f841526b92fc3
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/harness.rs:152:15
      31:     0x55c8e1f9bf0b - tokio::runtime::task::raw::poll::hfd72f15b50fdbe85
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/raw.rs:255:5
      32:     0x55c8e2b194e7 - tokio::runtime::task::raw::RawTask::poll::h6b6d61180c79b6b5
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/raw.rs:200:18
      33:     0x55c8e2b4dbb7 - tokio::runtime::task::UnownedTask<S>::run::h6959181c931f4232
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/task/mod.rs:431:9
      34:     0x55c8e2b3ca67 - tokio::runtime::blocking::pool::Task::run::h3f77479861b86078
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/blocking/pool.rs:159:9
      35:     0x55c8e2b3f92f - tokio::runtime::blocking::pool::Inner::run::h3a6e194f29a2927d
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/blocking/pool.rs:513:17
      36:     0x55c8e2b3ee14 - tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}::hf0efabc40cc61a45
                                   at /home/flokli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.0/src/runtime/blocking/pool.rs:471:13
      37:     0x55c8e2ae2ff9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1b2ca2301639f6d5
                                   at /build/rustc-1.71.1-src/library/std/src/sys_common/backtrace.rs:135:18
      38:     0x55c8e2b4ca32 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h3138260ed7774f28
                                   at /build/rustc-1.71.1-src/library/std/src/thread/mod.rs:529:17
      39:     0x55c8e2b4b072 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h4bc37d49bf336f53
                                   at /build/rustc-1.71.1-src/library/core/src/panic/unwind_safe.rs:271:9
      40:     0x55c8e2b4f87b - std::panicking::try::do_call::hba801b80c44d609d
                                   at /build/rustc-1.71.1-src/library/std/src/panicking.rs:500:40
      41:     0x55c8e2b5040b - __rust_try
      42:     0x55c8e2b4f291 - std::panicking::try::hed61bbd2623c5f65
                                   at /build/rustc-1.71.1-src/library/std/src/panicking.rs:464:19
      43:     0x55c8e2b4c842 - std::panic::catch_unwind::hb2995050e4fe9142
                                   at /build/rustc-1.71.1-src/library/std/src/panic.rs:142:14
      44:     0x55c8e2b4c842 - std::thread::Builder::spawn_unchecked_::{{closure}}::h9b23f06b4c0b074f
                                   at /build/rustc-1.71.1-src/library/std/src/thread/mod.rs:528:30
      45:     0x55c8e2aeb2bf - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4728ea5debf1a3a7
                                   at /build/rustc-1.71.1-src/library/core/src/ops/function.rs:250:5
      46:     0x55c8e2de5575 - std::sys::unix::thread::Thread::new::thread_start::h3d2db76b69650540
      47:     0x7fe991efedd4 - start_thread
      48:     0x7fe991f809b0 - __clone3
      49:                0x0 - <unknown>
    Error: JoinError::Panic(Id(18), ...)
    

    flokli at 2023-09-10T14·28+00

  2. cl/9292

    flokli at 2023-09-10T14·39+00

  3. cbrewster closed this issue at 2023-09-14T13·25+00