Draft: new memory leak
Under picodata stress test I get the panic like:
2024-05-24 19:50:31.774 [96332] main/845/pico.sql otm.rs:529 E> Space _sql_query upsert error: box error: MemoryIssue: Failed to allocate 16384 bytes in mempool for new slab
2024-05-24 19:50:31.775 [96332] main/845/pico.sql otm.rs:402 E> _sql_stat: failed to update span stats: box error: MemoryIssue: Failed to allocate 16384 bytes in mempool for new slab
2024-05-24 19:50:31.775 [96332] main/845/pico.sql otm.rs:402 E> _sql_stat: failed to update span stats: box error: MemoryIssue: Failed to allocate 16384 bytes in mempool for new slab
2024-05-24 19:50:31.776 [96332] main/845/pico.sql otm.rs:402 E> _sql_stat: failed to update span stats: box error: MemoryIssue: Failed to allocate 16384 bytes in mempool for new slab
2024-05-24 19:50:31.946 [96332] main/112/raft_main_loop node.rs:2199 W> dropping raft ready: Ready {
number: 55,
ss: None,
hs: None,
read_states: [],
entries: [
term: 3
index: 51
context: "\203\244kind\253ddl_prepare\256schema_version\021\243ddl\204\244kind\252drop_index\250space_id\315\004\002\250index_id\002\251initiator!"
,
],
snapshot: ,
is_persisted_msg: false,
light: LightReady {
commit_index: None,
committed_entries: [],
messages: [],
},
must_sync: true,
}
picodata> thread 'main' panicked at src/traft/node.rs:2200:17:
transaction failed: transaction rolled-back: box error: MemoryIssue: Failed to allocate 16384 bytes in mempool for new slab
stack backtrace:
0: rust_begin_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
2: picodata::traft::node::NodeImpl::advance
at /Users/darthunix/git/picodata/src/traft/node.rs:2200:17
3: picodata::traft::node::MainLoop::iter_fn::{{closure}}
at /Users/darthunix/git/picodata/src/traft/node.rs:2399:19
4: picodata::traft::node::MainLoop::start::{{closure}}::{{closure}}
at /Users/darthunix/git/picodata/src/traft/node.rs:2367:20
5: tarantool::fiber::async::block_on
at /Users/darthunix/git/picodata/tarantool/tarantool/src/fiber/async.rs:253:33
6: picodata::traft::node::MainLoop::start::{{closure}}
at /Users/darthunix/git/picodata/src/loop.rs:8:17
7: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015:9
8: tarantool::fiber::Fyber<F,T>::trampoline_for_ffi
at /Users/darthunix/git/picodata/tarantool/tarantool/src/fiber.rs:821:17
9: _ZL16fiber_cxx_invokePFiP13__va_list_tagES0_
at /Users/darthunix/git/picodata/tarantool-sys/src/lib/core/fiber.h:1283:10
10: fiber_loop
at /Users/darthunix/git/picodata/tarantool-sys/src/lib/core/fiber.c:1085:18
11: coro_init
at /Users/darthunix/git/picodata/tarantool-sys/third_party/coro/coro.c:108:3
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 3
[supervisor:96331] no ipc message from child
[supervisor:96331] subprocess 96332 was signaled with SIGABRT