首页 > 解决方案 > 我应该担心 SIG35 吗?

问题描述

使用 GDB 运行程序(使用 Seastar)时,我得到了 SIG35。TLS 存在一些问题。我只能推测这可能与那个问题有关。

我看不到关于 SIG35 的足够信息,特别是在 Google 上,除了它是一个实时信号。

回溯

--Type <RET> for more, q to quit, c to continue without paging--c

Thread 3 "reactor-1" received signal SIG35, Real-time event 35.
[Switching to Thread 0x7fffef60d640 (LWP 412412)]
0x00007ffff64c81fb in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
(gdb) bt
#0  0x00007ffff64c81fb in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#1  0x00007ffff64d85a7 in Botan::Montgomery_Params::square_this(Botan::BigInt&, std::vector<unsigned long, Botan::secure_allocator<unsigned long> >&) const () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#2  0x00007ffff64d86d3 in Botan::Montgomery_Int::square_this_n_times(std::vector<unsigned long, Botan::secure_allocator<unsigned long> >&, unsigned long) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#3  0x00007ffff64da4bf in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#4  0x00007ffff64da6d2 in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#5  0x00007ffff64e6f0b in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#6  0x00007ffff64e7627 in Botan::is_miller_rabin_probable_prime(Botan::BigInt const&, Botan::Modular_Reducer const&, Botan::RandomNumberGenerator&, u--Type <RET> for more, q to quit, c to continue without paging--<RET.
nsigned long) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#7  0x00007ffff64e1fef in Botan::is_prime(Botan::BigInt const&, Botan::RandomNumberGenerator&, unsigned long, bool) ()
   from /lib/x86_64-linux-gnu/libbotan-2.so.12
#8  0x00007ffff64d5fc6 in Botan::generate_rsa_prime(Botan::RandomNumberGenerator&, Botan::RandomNumberGenerator&, unsigned long, Botan::BigInt const&, unsigned long) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#9  0x00007ffff65bf9ae in Botan::RSA_PrivateKey::RSA_PrivateKey(Botan::RandomNumberGenerator&, unsigned long, unsigned long) ()
   from /lib/x86_64-linux-gnu/libbotan-2.so.12
#10 0x0000000000588503 in TLS::credentials::createCert (this=0x6c71938 <creds>, hostname="www.google.com") at ./ProxyServer.h:350
#11 0x000000000057fed1 in TLS::credentials::cert_chain (this=0x6c71938 <creds>, algos=std::vector of length 1, capacity 1 = {...}, 
--Type <RET> for more, q to quit, c to continue without paging--<RET>
    type="tls-server", hostname="www.google.com") at ./ProxyServer.h:384
#12 0x00007ffff65e5db1 in Botan::Credentials_Manager::find_cert_chain(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<Botan::X509_DN, std::allocator<Botan::X509_DN> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#13 0x00007ffff65e5e51 in Botan::Credentials_Manager::cert_chain_single_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#14 0x00007ffff6628d97 in ?? () from /lib/x86_64-linux-gnu/libbotan-2.so.12
--Type <RET> for more, q to quit, c to continue without paging--<RET>
#15 0x00007ffff662a525 in Botan::TLS::Server::session_create(Botan::TLS::Server_Handshake_State&, bool) ()
   from /lib/x86_64-linux-gnu/libbotan-2.so.12
#16 0x00007ffff662d373 in Botan::TLS::Server::process_client_hello_msg(Botan::TLS::Handshake_State const*, Botan::TLS::Server_Handshake_State&, std::vector<unsigned char, std::allocator<unsigned char> > const&, bool) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#17 0x00007ffff662e0c2 in Botan::TLS::Server::process_handshake_msg(Botan::TLS::Handshake_State const*, Botan::TLS::Handshake_State&, Botan::TLS::Handshake_Type, std::vector<unsigned char, std::allocator<unsigned char> > const&, bool) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#18 0x00007ffff6608ddf in Botan::TLS::Channel::process_handshake_ccs(std::vector<unsigned char, Botan::secure_allocator<unsigned char> > const&, unsigned long, Botan::TLS::Record_Type, Botan::TLS::Protocol_Version, bool) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
#19 0x00007ffff660926a in Botan::TLS::Channel::received_data(unsigned char const*, unsigned long) () from /lib/x86_64-linux-gnu/libbotan-2.so.12
--Type <RET> for more, q to quit, c to continue without paging--<RET>

回溯似乎表明这种情况发生在Botan::RandomNumberGenerator.

Botan::RandomNumberGenerator/AutoSeeded_RNG不是线程安全的,但我使用它Botan::Serialized_RNG rng{new Botan::AutoSeeded_RNG()};是线程安全的。

标签: c++

解决方案


推荐阅读