spacejam/sled

sled open error

clojurians-org opened this issue · 0 comments

Bug reports must include all following items:

/home/larluo/my-work/my-repo/back-end-data-serv〉cat data-ops/dc-cli-rust/Cargo.toml                                                 05/18/2022 10:28:33 AM[package]
name = "dc-cli-rust"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "dc-cli"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
derivative = "2.2"
serde = { version = "1.0", features = ["derive"] }
serde_with = "1.13"
serde_json = "1.0"
dotenv = "0.15"
log = "0.4"
env_logger = "0.8"
anyhow = "1.0"
itertools = "0.10"
async-trait = "0.1"
async-recursion = "1.0"

regex = "1.5"
uuid = { version = "1.0", features = [ "v4", "fast-rng", "macro-diagnostics" ] }
parking_lot = "0.12"
futures = "0.3"
tokio = { version = "1.17", features = ["full"] }

base64 = "0.13"
chrono = "0.4.19"
percent-encoding = "2.1"
urlencoding = "2.1"
ring = "0.16"
clap = { version = "3.1", features = ["derive"] }
reqwest = { version = "0.11", features = ["json", "gzip", "cookies", "native-tls-vendored"] }
cookie_store = "0.16"
reqwest_cookie_store = "0.3"
inventory = "0.2"

# sled = "0.34.7"
sled = { git = "https://github.com/spacejam/sled.git", rev = "e95ec057" }
#[tokio::main]
async fn main() -> anyhow::Result<()> {
    dotenv::dotenv().ok() ;
    env_logger::init();

    let db = &sled::open("db-cli.db").unwrap() ;
    Ok(())
}
  1. expected result
  2. actual result
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 32768. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 65536. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 131072. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 262144. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 524288. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 1048576. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 2097152. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 4194304. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 8388608. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 16777216. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 33554432. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 67108864. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 134217728. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 268435456. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 536870912. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 1073741824. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 2147483648. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 4294967296. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 8589934592. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 17179869184. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 34359738368. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 68719476736. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 137438953472. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 274877906944. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 549755813888. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 1099511627776. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 2199023255552. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 4398046511104. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 8796093022208. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 17592186044416. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 35184372088832. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::heap] starting heap slab for sizes of 70368744177664. tip: 0 max idx: 0
[2022-05-18T02:27:28Z TRACE sled::context] starting context
[2022-05-18T02:27:28Z TRACE sled::pagecache] starting pagecache
[2022-05-18T02:27:28Z DEBUG sled::pagecache::snapshot] no previous snapshot found
[2022-05-18T02:27:28Z TRACE sled::pagecache::iterator] file len: 0 segment len 524288 segments: 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iterator] ordering before clearing tears: {}, max_header_stable_lsn: 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iterator] in clean_tail_tears, found missing item in tail: None and we'll scan segments {} above lowest lsn 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iterator] unable to load new segment: Io(Other, "io error")
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iterator] filtering out segments after detected tear at (lsn, lid) -1
[2022-05-18T02:27:28Z TRACE sled::pagecache::iterator] trying to find the max stable tip for bounding batch manifests with segment iter {} of segments >= first_tip -1
[2022-05-18T02:27:28Z TRACE sled::pagecache::iterator] generated iterator over segments {} with lsn >= 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::snapshot] building on top of old snapshot: Snapshot { version: 0, stable_lsn: None, active_segment: None, pt: [] }
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iterator] unable to load new segment: Io(Other, "io error")
[2022-05-18T02:27:28Z TRACE sled::pagecache::snapshot] db is empty, returning default snapshot
[2022-05-18T02:27:28Z TRACE sled::pagecache::snapshot] generated snapshot: Snapshot { version: 0, stable_lsn: None, active_segment: None, pt: [] }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] initialized self.segments to []
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] initialized self.ordering to {}
[2022-05-18T02:27:28Z DEBUG sled::pagecache::segment] SA starting with tip 0 stable -1 free {}
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] starting log for a totally fresh system
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] evaluating free list {} in SA::next
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] advancing file tip from 0 to 524288
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] setting Segment to Active with new lsn 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::segment] segment accountant returning offset: 0 for lsn 0 on deck: {}
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] starting IoBufs with next_lsn: 0 next_lid: 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] storing lsn 0 in beginning of buffer
[2022-05-18T02:27:28Z DEBUG sled::pagecache] load_snapshot loading pages from 0..0
[2022-05-18T02:27:28Z TRACE sled::pagecache] allocating pid 0 for the first time
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page called on pid 0 to Meta(Meta { inner: {} }) with old ts 0
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page on pid 0 has log kind: Replace
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserving buf of len 9 for pid 0 with kind InlineMeta
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserved 9 bytes at lsn 20 lid 20
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page succeeded on pid 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_link pid 0 at cache info CacheInfo { ts: 1, lsn: 20, pointer: Inline(20) }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] inserting pid 0 to segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_replace pid 0 from cache infos [] to cache info CacheInfo { ts: 1, lsn: 20, pointer: Inline(20) } with lsn 0
[2022-05-18T02:27:28Z TRACE sled] calculating crc32 for header len 8 body len 1
[2022-05-18T02:27:28Z TRACE sled::pagecache] allocating pid 1 for the first time
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page called on pid 1 to Counter(0) with old ts 0
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page on pid 1 has log kind: Replace
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserving buf of len 9 for pid 1 with kind Counter
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserved 9 bytes at lsn 29 lid 29
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page succeeded on pid 1
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_link pid 1 at cache info CacheInfo { ts: 1, lsn: 29, pointer: Inline(29) }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] inserting pid 1 to segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {0}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_replace pid 1 from cache infos [] to cache info CacheInfo { ts: 1, lsn: 29, pointer: Inline(29) } with lsn 0
[2022-05-18T02:27:28Z TRACE sled] calculating crc32 for header len 8 body len 1
[2022-05-18T02:27:28Z TRACE sled::pagecache] getting page iter for idgen
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] sealed iobuf with lsn 0
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] advancing offset within the current segment from 0 to 38
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] asynchronously writing iobuf with lsn 0 to log from maybe_seal
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] waiting on cond var for make_stable(37)
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] write_to_log log_offset 0 lsn 0 len 38
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] wrote lsns 0-37 to disk at offsets 0-37, maxed false complete_len 38
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] mark_interval(0, 38)
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] pushing interval (0, 37) into fsynced_ranges []
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] new highest interval: 0 - 37
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] mark_interval new highest lsn 37
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] make_stable(37) returning
[2022-05-18T02:27:28Z TRACE sled::pagecache] pagecache started
[2022-05-18T02:27:28Z TRACE sled::pagecache] getting page iter for META
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] stabilize(0), normalized: -524288, last: -1
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] expected stabilization lsn -524288 to be greater than the previous value of -1
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] skipping roll_iobuf due to empty segment
[2022-05-18T02:27:28Z TRACE sled::node] created new node Inner { header: Header { next: None, merging_child: None, lo_len: 0, hi_len: 0, children: 0, fixed_key_length: None, fixed_value_length: None, fixed_key_stride: None, prefix_len: 0, probation_ops_remaining: 0, offset_bytes: 1, rewrite_generations: 0, activity_sketch: 0, version: 1, merging: false, is_index: false }, lo: [], hi: None, items: [] }
[2022-05-18T02:27:28Z TRACE sled::pagecache] allocating pid 2 for the first time
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page called on pid 2 to Node(Node { overlay: {}, inner: Inner { header: Header { next: None, merging_child: None, lo_len: 0, hi_len: 0, children: 0, fixed_key_length: None, fixed_value_length: None, fixed_key_stride: None, prefix_len: 0, probation_ops_remaining: 0, offset_bytes: 1, rewrite_generations: 0, activity_sketch: 0, version: 1, merging: false, is_index: false }, lo: [], hi: None, items: [] } }) with old ts 0
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page on pid 2 has log kind: Replace
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserving buf of len 73 for pid 2 with kind InlineNode
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserved 73 bytes at lsn 38 lid 38
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page succeeded on pid 2
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_link pid 2 at cache info CacheInfo { ts: 1, lsn: 38, pointer: Inline(38) }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] inserting pid 2 to segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {0, 1}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_replace pid 2 from cache infos [] to cache info CacheInfo { ts: 1, lsn: 38, pointer: Inline(38) } with lsn 0
[2022-05-18T02:27:28Z TRACE sled] calculating crc32 for header len 8 body len 65
[2022-05-18T02:27:28Z TRACE sled::pagecache] accessed pid 2 -> paging out pids []
[2022-05-18T02:27:28Z TRACE sled::meta] allocated pid 2 for leaf in new_tree for namespace [95, 95, 115, 108, 101, 100, 95, 95, 100, 101, 102, 97, 117, 108, 116]
[2022-05-18T02:27:28Z TRACE sled::node] created new node Inner { header: Header { next: None, merging_child: None, lo_len: 0, hi_len: 0, children: 1, fixed_key_length: None, fixed_value_length: Some(9), fixed_key_stride: None, prefix_len: 0, probation_ops_remaining: 0, offset_bytes: 1, rewrite_generations: 0, activity_sketch: 0, version: 1, merging: false, is_index: true }, lo: [], hi: None, items: [(Slice([]), 2)] }
[2022-05-18T02:27:28Z TRACE sled::pagecache] allocating pid 3 for the first time
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page called on pid 3 to Node(Node { overlay: {}, inner: Inner { header: Header { next: None, merging_child: None, lo_len: 0, hi_len: 0, children: 1, fixed_key_length: None, fixed_value_length: Some(9), fixed_key_stride: None, prefix_len: 0, probation_ops_remaining: 0, offset_bytes: 1, rewrite_generations: 0, activity_sketch: 0, version: 1, merging: false, is_index: true }, lo: [], hi: None, items: [(Slice([]), 2)] } }) with old ts 0
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page on pid 3 has log kind: Replace
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserving buf of len 75 for pid 3 with kind InlineNode
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserved 75 bytes at lsn 111 lid 111
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page succeeded on pid 3
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_link pid 3 at cache info CacheInfo { ts: 1, lsn: 111, pointer: Inline(111) }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] inserting pid 3 to segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {0, 1, 2}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_replace pid 3 from cache infos [] to cache info CacheInfo { ts: 1, lsn: 111, pointer: Inline(111) } with lsn 0
[2022-05-18T02:27:28Z TRACE sled] calculating crc32 for header len 8 body len 67
[2022-05-18T02:27:28Z TRACE sled::pagecache] accessed pid 3 -> paging out pids []
[2022-05-18T02:27:28Z DEBUG sled::meta] allocated pid 3 for root of new_tree [95, 95, 115, 108, 101, 100, 95, 95, 100, 101, 102, 97, 117, 108, 116]
[2022-05-18T02:27:28Z TRACE sled::pagecache] getting page iter for META
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page called on pid 0 to Meta(Meta { inner: {[95, 95, 115, 108, 101, 100, 95, 95, 100, 101, 102, 97, 117, 108, 116]: 3} }) with old ts 1
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page on pid 0 has log kind: Replace
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserving buf of len 26 for pid 0 with kind InlineMeta
[2022-05-18T02:27:28Z TRACE sled::pagecache::logger] reserved 26 bytes at lsn 186 lid 186
[2022-05-18T02:27:28Z TRACE sled::pagecache] cas_page succeeded on pid 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_link pid 0 at cache info CacheInfo { ts: 2, lsn: 186, pointer: Inline(186) }
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] inserting pid 0 to segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {0, 1, 2, 3}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] mark_replace pid 0 from cache infos [CacheInfo { ts: 1, lsn: 20, pointer: Inline(20) }] to cache info CacheInfo { ts: 2, lsn: 186, pointer: Inline(186) } with lsn 0
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] removing pid 0 from segment lsn 0 from segment Active(Active { lsn: 0, deferred_replaced_pids: {}, pids: {0, 1, 2, 3}, latest_replacement_lsn: 0, can_free_upon_deactivation: {}, deferred_heap_removals: {} })
[2022-05-18T02:27:28Z TRACE sled] calculating crc32 for header len 8 body len 18
[2022-05-18T02:27:28Z TRACE sled::pagecache] getting page iter for META
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] sealed iobuf with lsn 38
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] advancing offset within the current segment from 38 to 212
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] asynchronously writing iobuf with lsn 38 to log from maybe_seal
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] waiting on cond var for make_stable(211)
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] write_to_log log_offset 38 lsn 38 len 174
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] wrote lsns 38-211 to disk at offsets 38-211, maxed false complete_len 174
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] mark_interval(38, 174)
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] pushing interval (38, 211) into fsynced_ranges []
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] new highest interval: 38 - 211
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] mark_interval new highest lsn 211
[2022-05-18T02:27:28Z DEBUG sled::pagecache::iobuf] make_stable(211) returning
[2022-05-18T02:27:28Z TRACE sled::pagecache::iobuf] bumping atomic header lsn to -1
[2022-05-18T02:27:28Z DEBUG sled::pagecache::logger] IoBufs dropped
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] stabilize(0), normalized: -524288, last: -1
[2022-05-18T02:27:28Z TRACE sled::pagecache::segment] expected stabilization lsn -524288 to be greater than the previous value of -1
Error:
  1. sled version
# sled = "0.34.7"
sled = { git = "https://github.com/spacejam/sled.git", rev = "e95ec057" }
  1. rustc version
/home/larluo/my-work/my-repo/back-end-data-serv〉rustc --version                                                                     05/18/2022 10:29:22 AM
rustc 1.60.0 (7737e0b5c 2022-04-04)
  1. operating system
/home/larluo/my-work/my-repo/back-end-data-serv〉uname -a                                                                            05/18/2022 10:30:53 AM
Linux MiWiFi-RA72-srv 5.14.10-300.fc35.x86_64 #1 SMP Thu Oct 7 20:48:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  1. minimal code sample that helps to reproduce the issue
  2. logs, panic messages, stack traces

Incomplete bug reports will be closed.

Do not open bug reports for documentation issues. Please just open a PR with the proposed documentation change.

Thank you for understanding :)