NamseEnt / namseent

Mono Repository for Namse Entertainment Ltd.
GNU Affero General Public License v3.0
13 stars 2 forks source link

[Bug]: Assertion fail on reserve_team_asset_upload #964

Closed bigfoodK closed 2 months ago

bigfoodK commented 2 months ago

Expected Behavior

run normally

Actual Behavior

Error occurs on while updating TeamAssetTotalBytesDoc https://github.com/NamseEnt/namseent/blob/614c6211efc0134f96298c14d66ea2f71c18d7e1/luda-editor/new-server/database/database/src/document_store/sqlite/mod.rs#L586-L589

doc.used_bytes was 0, byte_size was 1021507

Steps to Reproduce

Upload psd on 614c6211efc0134f96298c14d66ea2f71c18d7e1

Other Info

No response

bigfoodK commented 2 months ago
thread 'tokio-runtime-worker' panicked at /home/bigfood/programming/namseent/luda-editor/new-server/database/database/src/document_store/sqlite/mod.rs:587:13:
assertion `left == right` failed
  left: 0
 right: 1
stack backtrace:
   0: rust_begin_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:72:14
   2: core::panicking::assert_failed_inner
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:408:17
   3: core::panicking::assert_failed
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:363:5
   4: database::document_store::sqlite::update
             at /home/bigfood/programming/namseent/luda-editor/new-server/database/database/src/document_store/sqlite/mod.rs:587:13
   5: <database::document_store::sqlite::SqliteKvStore as database::document_store::DocumentStore>::transact::{{closure}}
             at /home/bigfood/programming/namseent/luda-editor/new-server/database/database/src/document_store/sqlite/mod.rs:335:41
   6: <database::document_store::in_memory::InMemoryCachedKsStore<Store> as database::document_store::DocumentStore>::transact::{{closure}}
             at /home/bigfood/programming/namseent/luda-editor/new-server/database/database/src/document_store/in_memory.rs:174:58
   7: database::Database::transact::{{closure}}
             at /home/bigfood/programming/namseent/luda-editor/new-server/database/database/src/lib.rs:55:50
   8: server::api::asset::reserve_team_asset_upload::reserve_team_asset_upload::{{closure}}
             at ./src/api/asset/reserve_team_asset_upload/mod.rs:66:6
   9: server::ws_handler::handle::handle::{{closure}}
             at ./src/ws_handler/handle.rs:299:117
  10: server::ws_handler::handle_msg::{{closure}}
             at ./src/ws_handler/mod.rs:124:70
  11: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/future/future.rs:123:9
  12: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:328:17
  13: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/loom/std/unsafe_cell.rs:16:9
  14: tokio::runtime::task::core::Core<T,S>::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:317:13
  15: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:485:19
  16: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panic/unwind_safe.rs:272:9
  17: std::panicking::try::do_call
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:559:40
  18: __rust_try
  19: std::panicking::try
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:523:19
  20: std::panic::catch_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panic.rs:149:14
  21: tokio::runtime::task::harness::poll_future
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:473:18
  22: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:208:27
  23: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:153:15
  24: tokio::runtime::task::raw::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:271:5
  25: tokio::runtime::task::raw::RawTask::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:201:18
  26: tokio::runtime::task::LocalNotified<S>::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/mod.rs:427:9
  27: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:648:17
  28: tokio::runtime::coop::with_budget
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:107:5
  29: tokio::runtime::coop::budget
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:73:5
  30: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:584:9
  31: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:535:24
  32: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:500:21
  33: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/scoped.rs:40:9
  34: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context.rs:180:26
  35: std::thread::local::LocalKey<T>::try_with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:283:12
  36: std::thread::local::LocalKey<T>::with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:260:9
  37: tokio::runtime::context::set_scheduler
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context.rs:180:9
  38: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:495:9
  39: tokio::runtime::context::runtime::enter_runtime
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/runtime.rs:65:16
  40: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:487:5
  41: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/worker.rs:455:45
  42: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/blocking/task.rs:42:21
  43: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:328:17
  44: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/loom/std/unsafe_cell.rs:16:9
  45: tokio::runtime::task::core::Core<T,S>::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:317:13
  46: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:485:19
  47: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panic/unwind_safe.rs:272:9
  48: std::panicking::try::do_call
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:559:40
  49: __rust_try
  50: std::panicking::try
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:523:19
  51: std::panic::catch_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panic.rs:149:14
  52: tokio::runtime::task::harness::poll_future
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:473:18
  53: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:208:27
  54: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:153:15
  55: tokio::runtime::task::raw::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:271:5
  56: tokio::runtime::task::raw::RawTask::poll
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:201:18
  57: tokio::runtime::task::UnownedTask<S>::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/mod.rs:464:9
  58: tokio::runtime::blocking::pool::Task::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/blocking/pool.rs:159:9
  59: tokio::runtime::blocking::pool::Inner::run
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/blocking/pool.rs:513:17
  60: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/bigfood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/blocking/pool.rs:471:13
bigfoodK commented 2 months ago

Closed #965