Panic with OOM but should show which memory #517

Closed
opened 2023-03-06 08:53:44 +00:00 by kryptonian · 1 comment

My testing of Garage resulted in a OOM panic, and I think it should include which memory it ran out of rather than a generic out of memory error. :)

$ RUST_LOG=garage=debug ./garage -c ./garage.toml server
2023-03-06T08:45:36.093558Z  INFO garage::server: Loading configuration...
2023-03-06T08:45:36.093976Z  INFO garage::server: Initializing background runner...
2023-03-06T08:45:36.094004Z  INFO garage::server: Initializing Garage main data store...
2023-03-06T08:45:36.094248Z  INFO garage_model::garage: Opening database...
2023-03-06T08:45:36.094258Z  INFO garage_model::garage: Opening LMDB database at: /tmp/samip537/test/db.lmdb
======== PANIC (internal Garage error) ========
panicked at 'Unable to open LMDB DB: Io(Os { code: 12, kind: OutOfMemory, message: "Out of memory" })', garage.rs:138:53

Panics are internal errors that Garage is unable to handle on its own.
They can be caused by bugs in Garage's code, or by corrupted data in
the node's storage. If you feel that this error is likely to be a bug
in Garage, please report it on our issue tracker a the following address:

        https://git.deuxfleurs.fr/Deuxfleurs/garage/issues

Please include the last log messages and the the full backtrace below in
your bug report, as well as any relevant information on the context in
which Garage was running when this error occurred.

GARAGE VERSION: v0.8.1 [features: k2v, sled, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs]

BACKTRACE:
   0: garage::main::{{closure}}::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: core::result::Result<T,E>::expect
   8: garage_model::garage::Garage::new
   9: garage::server::run_server::{{closure}}
  10: garage::main::{{closure}}
  11: std::thread::local::LocalKey<T>::with
  12: tokio::park::thread::CachedParkThread::block_on
  13: tokio::runtime::thread_pool::ThreadPool::block_on
  14: garage::main
  15: std::sys_common::backtrace::__rust_begin_short_backtrace
  16: std::rt::lang_start::{{closure}}
  17: std::rt::lang_start_internal
  18: main

Aborted
My testing of Garage resulted in a OOM panic, and I think it should include which memory it ran out of rather than a generic out of memory error. :) ``` $ RUST_LOG=garage=debug ./garage -c ./garage.toml server 2023-03-06T08:45:36.093558Z INFO garage::server: Loading configuration... 2023-03-06T08:45:36.093976Z INFO garage::server: Initializing background runner... 2023-03-06T08:45:36.094004Z INFO garage::server: Initializing Garage main data store... 2023-03-06T08:45:36.094248Z INFO garage_model::garage: Opening database... 2023-03-06T08:45:36.094258Z INFO garage_model::garage: Opening LMDB database at: /tmp/samip537/test/db.lmdb ======== PANIC (internal Garage error) ======== panicked at 'Unable to open LMDB DB: Io(Os { code: 12, kind: OutOfMemory, message: "Out of memory" })', garage.rs:138:53 Panics are internal errors that Garage is unable to handle on its own. They can be caused by bugs in Garage's code, or by corrupted data in the node's storage. If you feel that this error is likely to be a bug in Garage, please report it on our issue tracker a the following address: https://git.deuxfleurs.fr/Deuxfleurs/garage/issues Please include the last log messages and the the full backtrace below in your bug report, as well as any relevant information on the context in which Garage was running when this error occurred. GARAGE VERSION: v0.8.1 [features: k2v, sled, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs] BACKTRACE: 0: garage::main::{{closure}}::{{closure}} 1: std::panicking::rust_panic_with_hook 2: std::panicking::begin_panic_handler::{{closure}} 3: std::sys_common::backtrace::__rust_end_short_backtrace 4: rust_begin_unwind 5: core::panicking::panic_fmt 6: core::result::unwrap_failed 7: core::result::Result<T,E>::expect 8: garage_model::garage::Garage::new 9: garage::server::run_server::{{closure}} 10: garage::main::{{closure}} 11: std::thread::local::LocalKey<T>::with 12: tokio::park::thread::CachedParkThread::block_on 13: tokio::runtime::thread_pool::ThreadPool::block_on 14: garage::main 15: std::sys_common::backtrace::__rust_begin_short_backtrace 16: std::rt::lang_start::{{closure}} 17: std::rt::lang_start_internal 18: main Aborted ```
Contributor

It does:

panicked at 'Unable to open LMDB DB:

This is a duplicate of #439.

It does: > panicked at 'Unable to open LMDB DB: This is a duplicate of #439.
lx closed this issue 2023-03-06 10:49:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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: Deuxfleurs/garage#517
No description provided.