-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make space copyable #3
base: master
Are you sure you want to change the base?
Conversation
Could you describe your case? It might be possible to resolve your issue without merging this pull request. |
Add ability to specify in values.yml vshard Group for each role
This is due to the fact that lua_error calls _Unwind_RaiseException under the hood, which causes rust's extern "C" functions to misbehave when an exception passes through their frame. Without this change we crash with a following log: ``` i1 | 2024-10-09 02:13:28.940 [120075] main/111/main C> panicked at library/core/src/panicking.rs:221:5: i1 | panic in a function that cannot unwind i1 | 2024-10-09 02:13:28.940 [120075] main/111/main C> backtrace: i1 | disabled backtrace i1 | 2024-10-09 02:13:28.940 [120075] main/111/main C> aborting due to panic i1 | [supervisor:120065] no ipc message from child i1 | [supervisor:120065] subprocess 120075 was signaled with SIGABRT i1 | [supervisor:120065] core dumped ``` picodata repro: ```shell pipenv run pytest -k test_submit_sql_after_revoke ``` backtrace: ``` #0 0x00007e04dc2a53f4 in ?? () from /usr/lib/libc.so.6 #1 0x00007e04dc24c120 in raise () from /usr/lib/libc.so.6 #2 0x00007e04dc2334c3 in abort () from /usr/lib/libc.so.6 #3 0x0000000005961a6a in std::sys::pal::unix::abort_internal () at library/std/src/sys/pal/unix/mod.rs:370 #4 0x0000000001e3227a in std::process::abort () at library/std/src/process.rs:2388 #5 0x0000000002e2d476 in picodata::cli::run::main::{closure#0}::{closure#1} (info=0x7e04bb8800f8) at src/cli/run.rs:120 #6 0x000000000595691f in alloc::boxed::{impl#50}::call<(&std::panic::PanicHookInfo), (dyn core::ops::function::Fn<(&std::panic::PanicHookInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global> () at library/alloc/src/boxed.rs:2084 #7 std::panicking::rust_panic_with_hook () at library/std/src/panicking.rs:808 #8 0x0000000005956513 in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:667 #9 0x0000000005953c99 in std::sys::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> () at library/std/src/sys/backtrace.rs:168 #10 0x00000000059561d4 in std::panicking::begin_panic_handler () at library/std/src/panicking.rs:665 #11 0x0000000001e34e35 in core::panicking::panic_nounwind_fmt::runtime () at library/core/src/panicking.rs:112 #12 core::panicking::panic_nounwind_fmt () at library/core/src/panicking.rs:122 #13 0x0000000001e34ec2 in core::panicking::panic_nounwind () at library/core/src/panicking.rs:221 #14 0x0000000001e350e6 in core::panicking::panic_cannot_unwind () at library/core/src/panicking.rs:309 #15 0x0000000002c17f7a in tlua::functions_write::wrapper<tlua::functions_write::Function<picodata::set_login_check::{closure_env#1}, (alloc::string::String, bool, *mut tlua::ffi::lua_State), ()>, (alloc::string::String, bool, *mut tlua::ffi::lua_State), ()> (lua=0x40c2cc90) at tarantool/tlua/src/functions_write.rs:455 #16 0x000000000321d513 in lj_BC_FUNCC () at buildvm_x86.dasc:811 #17 0x0000000003224253 in lua_pcall (L=L@entry=0x40c2cc90, nargs=<optimized out>, nresults=nresults@entry=-1, errfunc=errfunc@entry=0) at picodata/tarantool-sys/third_party/luajit/src/lj_api.c:1172 #18 0x000000000301b47b in luaT_call (L=L@entry=0x40c2cc90, nargs=<optimized out>, nreturns=nreturns@entry=-1) at picodata/tarantool-sys/src/lua/utils.c:619 ```
This is a continuation of work done in commit 52bb62c. This time the problem arose after a recent change in rustc, and resulted in lua exceptions stopping being intercepted by tarantool. I don't know yet what's the specific cause of this, what changed in rust and how did it affect the seemingly unrelated functionality of tarantool, but this change seems to help. Here's how the problem showcased in the tests: running 1 test test tlua::functions_write::error ... #1 0x16378a7 in tarantool_panic_handler+103 #2 0x183eaf5 in lj_err_throw+117 #3 0x183ee65 in lj_err_run+277 #4 0x183f63f in lua_error+15 #5 0x7673285fc50a in ??+0 #6 0x1834373 in lj_BC_FUNCC+70 #7 0x183b295 in lua_pcall+117 #8 0x76732868f87d in ??+0 #9 0x7673286adea5 in ??+0 #10 0x7673289e1acc in ??+0 #11 0x7673289e15ae in ??+0 #12 0x7673289e0f9c in ??+0 #13 0x7673289dedfb in ??+0 #14 0x7673289ced2c in ??+0 #15 0x76732858b414 in ??+0 #16 0x7673285a1659 in ??+0 #17 0x16920eb in module_func_call+139 #18 0x17b4ba3 in lbox_func_call+307 #19 0x1834373 in lj_BC_FUNCC+70 #20 0x183b295 in lua_pcall+117 #21 0x16411ef in luaT_call+15 #22 0x16381f1 in lua_main+97 #23 0x1638ab1 in run_script_f+2193 #24 0x165c3e1 in fiber_cxx_invoke(int (*)(__va_list_tag*), __va_list_tag*)+17 #25 0x15beea7 in fiber_loop+55 #26 0x1618f68 in coro_init+72 2025-02-10 19:39:05.410 [3087063] main/104/run_tests.lua C> your message: my message
I see no reasons for space to be non-copyable.