Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: tikv的client-cpp客户端引用rust源码客户端编译 执行example出现panic报错问题
To improve efficiency, please provide the following information. A clear problem description will help resolve the issue faster:
Overview: I am using the https://github.com/tikv/client-cpp client, and I compiled the dependent rust-client library locally. After compiling the example test program generated by client-cpp and retrieving the inserted key-value, a panic error occurred.
Background Problem Description: What operations have been performed
In the above client-cpp client, the tikv-client rust client is used. Since I need my own OpenSSL, I compiled the source code locally and pointed the tikv-client dependency in client-cpp’s Cargo.toml to the local one. After compiling client-cpp, the generated example links to my TiKV cluster. After retrieving the corresponding key-value, a panic occurred. I set the Rust source to Tsinghua source.
Here is the key error information I captured. Could you please take a look at how to handle this?
24: std::panicking::try
at /rustc/015a824f2dffe32707fceb59c47effaf7b73486c/library/std/src/panicking.rs:456:19
25: std::panic::catch_unwind
at /rustc/015a824f2dffe32707fceb59c47effaf7b73486c/library/std/src/panic.rs:137:14
26: cxx::unwind::catch_unwind
at /root/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cxx-1.0.18/src/unwind.rs:13:11
27: tikv_client_glue$cxxbridge1$transaction_commit
at ./src/lib.rs:12:1
28: _ZN16tikv_client_glue18transaction_commitERNS_11TransactionE
29: _ZN11tikv_client11Transaction6commitEv
at ./src/tikv_client.cpp:112:23
30: main
at ./example/main.cpp:27:15
31: __libc_start_main
32: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Error: panic in ffi function tikv_client_rust::ffi::transaction_commit, aborting.
Aborted