[GH-ISSUE #5691] [Bug] rust panic when flowy_user::services::db::UserDB::open_collab_db #2536

Closed
opened 2026-03-23 21:23:12 +00:00 by mirror · 4 comments
Owner

Originally created by @allanGoldZhiKang on GitHub (Jul 6, 2024).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5691

Originally assigned to: @LucasXu0 on GitHub.

Bug Description

thread '' panicked at library/core/src/panicking.rs:220:5:
unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap
stack backtrace:
0: rust_begin_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
1: core::panicking::panic_nounwind_fmt::runtime
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:110:18
2: core::panicking::panic_nounwind_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:120:5
3: core::panicking::panic_nounwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:220:5
4: rocksdb::transactions::transaction_db::TransactionDB::open_cf_descriptors_internal
5: rocksdb::transactions::transaction_db::TransactionDB::open_cf
at /Users/allan/.cargo/git/checkouts/rust-rocksdb-00c8fca3e809007a/21cf4a2/src/transactions/transaction_db.rs:200:9
6: rocksdb::transactions::transaction_db::TransactionDB::open
at /Users/allan/.cargo/git/checkouts/rust-rocksdb-00c8fca3e809007a/21cf4a2/src/transactions/transaction_db.rs:179:9
7: collab_plugins::local_storage::rocksdb::kv_impl::KVTransactionDBRocksdbImpl::open
at /Users/allan/.cargo/git/checkouts/appflowy-collab-494188f9dbf24ecc/5048762/collab-plugins/src/local_storage/rocksdb/kv_impl.rs:69:23
8: flowy_user::services::db::UserDB::open_collab_db
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/services/db.rs:208:20
9: flowy_user::services::db::UserDB::backup_or_restore
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/services/db.rs:68:22
10: flowy_user::user_manager::manager::UserManager::prepare_backup::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:533:5
11: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}}::{{closure}}::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:162:37
12: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}}::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:124:3
13: <tracing::instrument::Instrumented as core::future::future::Future>::poll
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
14: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:124:3
15: flowy_core::AppFlowyCore::init::{{closure}}::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:253:10
16: <tracing::instrument::Instrumented as core::future::future::Future>::poll
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
17: flowy_core::AppFlowyCore::init::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:102:3
18: flowy_core::AppFlowyCore:🆕:{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:95:33
19: dart_ffi::init_sdk::{{closure}}
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/dart-ffi/src/lib.rs:103:64
20: <tracing::instrument::Instrumented as core::future::future::Future>::poll
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
21: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/park.rs:281:63
22: tokio::runtime::coop::with_budget
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:107:5
23: tokio::runtime::coop::budget
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:73:5
24: tokio::runtime::park::CachedParkThread::block_on
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/park.rs:281:31
25: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/blocking.rs:66:9
26: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
27: tokio::runtime::context::runtime::enter_runtime
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/runtime.rs:65:16
28: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
29: tokio::runtime::runtime::Runtime::block_on
at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/runtime.rs:349:45
30: lib_dispatch::runtime::AFPluginRuntime::block_on
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/lib-dispatch/src/runtime.rs:85:5
31: init_sdk
at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/dart-ffi/src/lib.rs:102:29
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread caused non-unwinding panic. aborting.
Lost connection to device.

Exited.

How to Reproduce

Just AF-destop: Clean + Rebuild All

Expected Behavior

run well

Please give me a hand, thank you
@LucasXu0

Operating System

macOS Monterey 12.6

AppFlowy Version(s)

6d0c9f7 · 4 days ago

Screenshots

No response

Additional Context

No response

Originally created by @allanGoldZhiKang on GitHub (Jul 6, 2024). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5691 Originally assigned to: @LucasXu0 on GitHub. ### Bug Description thread '<unnamed>' panicked at library/core/src/panicking.rs:220:5: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap stack backtrace: 0: rust_begin_unwind at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5 1: core::panicking::panic_nounwind_fmt::runtime at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:110:18 2: core::panicking::panic_nounwind_fmt at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:120:5 3: core::panicking::panic_nounwind at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:220:5 4: rocksdb::transactions::transaction_db::TransactionDB<T>::open_cf_descriptors_internal 5: rocksdb::transactions::transaction_db::TransactionDB<T>::open_cf at /Users/allan/.cargo/git/checkouts/rust-rocksdb-00c8fca3e809007a/21cf4a2/src/transactions/transaction_db.rs:200:9 6: rocksdb::transactions::transaction_db::TransactionDB<T>::open at /Users/allan/.cargo/git/checkouts/rust-rocksdb-00c8fca3e809007a/21cf4a2/src/transactions/transaction_db.rs:179:9 7: collab_plugins::local_storage::rocksdb::kv_impl::KVTransactionDBRocksdbImpl::open at /Users/allan/.cargo/git/checkouts/appflowy-collab-494188f9dbf24ecc/5048762/collab-plugins/src/local_storage/rocksdb/kv_impl.rs:69:23 8: flowy_user::services::db::UserDB::open_collab_db at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/services/db.rs:208:20 9: flowy_user::services::db::UserDB::backup_or_restore at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/services/db.rs:68:22 10: flowy_user::user_manager::manager::UserManager::prepare_backup::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:533:5 11: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}}::{{closure}}::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:162:37 12: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}}::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:124:3 13: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9 14: flowy_user::user_manager::manager::UserManager::init_with_callback::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-user/src/user_manager/manager.rs:124:3 15: flowy_core::AppFlowyCore::init::{{closure}}::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:253:10 16: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9 17: flowy_core::AppFlowyCore::init::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:102:3 18: flowy_core::AppFlowyCore::new::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/flowy-core/src/lib.rs:95:33 19: dart_ffi::init_sdk::{{closure}} at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/dart-ffi/src/lib.rs:103:64 20: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9 21: tokio::runtime::park::CachedParkThread::block_on::{{closure}} at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/park.rs:281:63 22: tokio::runtime::coop::with_budget at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:107:5 23: tokio::runtime::coop::budget at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:73:5 24: tokio::runtime::park::CachedParkThread::block_on at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/park.rs:281:31 25: tokio::runtime::context::blocking::BlockingRegionGuard::block_on at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/blocking.rs:66:9 26: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}} at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/mod.rs:87:13 27: tokio::runtime::context::runtime::enter_runtime at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/runtime.rs:65:16 28: tokio::runtime::scheduler::multi_thread::MultiThread::block_on at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/multi_thread/mod.rs:86:9 29: tokio::runtime::runtime::Runtime::block_on at /Users/allan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/runtime.rs:349:45 30: lib_dispatch::runtime::AFPluginRuntime::block_on at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/lib-dispatch/src/runtime.rs:85:5 31: init_sdk at /Users/allan/Downloads/test/AppFlowy/frontend/rust-lib/dart-ffi/src/lib.rs:102:29 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. thread caused non-unwinding panic. aborting. Lost connection to device. Exited. ### How to Reproduce Just AF-destop: Clean + Rebuild All ### Expected Behavior run well Please give me a hand, thank you @LucasXu0 ### Operating System macOS Monterey 12.6 ### AppFlowy Version(s) 6d0c9f7 · 4 days ago ### Screenshots _No response_ ### Additional Context _No response_
mirror 2026-03-23 21:23:12 +00:00
  • closed this issue
  • added the
    v0.6.4
    label
Author
Owner

@Xazin commented on GitHub (Jul 7, 2024):

This is an issue with rust-rocksdb, it's resolved in their latest version, but because we rely on a fork it's not up-to-date.

<!-- gh-comment-id:2212430507 --> @Xazin commented on GitHub (Jul 7, 2024): This is an issue with `rust-rocksdb`, it's resolved in their latest version, but because we rely on a fork it's not up-to-date.
Author
Owner

@LucasXu0 commented on GitHub (Jul 8, 2024):

I'll sync their latest commit into the fork repo.

<!-- gh-comment-id:2212772953 --> @LucasXu0 commented on GitHub (Jul 8, 2024): I'll sync their latest commit into the fork repo.
Author
Owner

@notandyvee commented on GitHub (Jul 24, 2024):

@LucasXu0 do you know when this will be merged? Because I pulled 0.6.4 and I had the same issue. Or are there instructions with how to use the forked repo?

<!-- gh-comment-id:2248478976 --> @notandyvee commented on GitHub (Jul 24, 2024): @LucasXu0 do you know when this will be merged? Because I pulled `0.6.4` and I had the same issue. Or are there instructions with how to use the forked repo?
Author
Owner

@Xazin commented on GitHub (Sep 10, 2024):

This was resolved in an earlier version 👍

<!-- gh-comment-id:2340950095 --> @Xazin commented on GitHub (Sep 10, 2024): This was resolved in an earlier version :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#2536
No description provided.