Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35068

galera-26.4.19 msan error in getaddrinfo

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5
    • 10.5, 10.11
    • Galera
    • None

    Description

      Might be related to the Galera MSAN being built with GALERA_WITH_SSL.

      rr record sql/mariadbd --no-defaults --skip-networking --datadir=/tmp/${PWD##*/}-datadir --socket=/tmp/${PWD##*/}.sock --plugin-dir=${PWD}/mysql-test/var/plugins/ --verbose  --wsrep-provider=$WSREP_PROVIDER --wsrep-on --wsrep_cluster_address=gcomm://127.0.0.1 --binlog-format=ROW  --wsrep-new-cluster
      rr: Saving execution to trace directory `/var/lib/buildbot/.local/share/rr/mariadbd-0'.
      2024-10-03  8:24:44 0 [Note] Starting MariaDB 10.5.27-MariaDB source revision  server_uid 1HWz72/7y0BVEM1ZKoYcqD19XNU= as process 38356
      2024-10-03  8:24:44 0 [Note] WSREP: Loading provider /tmp/build/libgalera_smm.so initial position: 00000000-0000-0000-0000-000000000000:-1
      2024-10-03  8:24:44 0 [Note] WSREP: wsrep_load(): loading provider library '/tmp/build/libgalera_smm.so'
      2024-10-03  8:24:44 0 [Note] WSREP: wsrep_load(): Galera 26.4.19(r41910341) by Codership Oy <info@codership.com> loaded successfully.
      2024-10-03  8:24:44 0 [Note] WSREP: Resolved symbol 'wsrep_node_isolation_mode_set_v1'
      2024-10-03  8:24:44 0 [Note] WSREP: CRC-32C: using 64-bit x86 acceleration.
      2024-10-03  8:24:44 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootstrap: 1
      2024-10-03  8:24:44 0 [Note] WSREP: GCache DEBUG: opened preamble:
      Version: 2
      UUID: 00000000-0000-0000-0000-000000000000
      Seqno: -1 - -1
      Offset: -1
      Synced: 0
      2024-10-03  8:24:44 0 [Note] WSREP: Skipped GCache ring buffer recovery: could not determine history UUID.
      2024-10-03  8:24:44 0 [Note] WSREP: Passing config to GCS: base_dir = /tmp/build-datadir/; base_host = 192.168.188.71; base_port = 4567; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /tmp/build-datadir/; gcache.keep_pages_size = 0; gcache.keep_plaintext_size = 128M; gcache.mem_size = 0; gcache.name = galera.cache; gcache.page_size = 128M; gcache.recover = yes; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.fc_single_primary = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.se
      2024-10-03  8:24:44 0 [Note] WSREP: Start replication
      2024-10-03  8:24:44 0 [Note] WSREP: Connecting with bootstrap option: 1
      2024-10-03  8:24:44 0 [Note] WSREP: Setting GCS initial position to 00000000-0000-0000-0000-000000000000:-1
      2024-10-03  8:24:44 0 [Note] WSREP: protonet asio version 0
      2024-10-03  8:24:44 0 [Note] WSREP: Using CRC-32C for message checksums.
      2024-10-03  8:24:44 0 [Note] WSREP: backend: asio
      2024-10-03  8:24:44 0 [Note] WSREP: gcomm thread scheduling priority set to other:0 
      2024-10-03  8:24:44 0 [Note] WSREP: access file(/tmp/build-datadir//gvwstate.dat) failed(No such file or directory)
      2024-10-03  8:24:44 0 [Note] WSREP: restore pc from disk failed
      2024-10-03  8:24:44 0 [Note] WSREP: GMCast version 0
      Uninitialized bytes in getaddrinfo at offset 20 inside [0x707000000428, 48)
      ==38356==WARNING: MemorySanitizer: use-of-uninitialized-value
          #0 0x7f79ca302075 in gu::net::resolve(gu::URI const&) /tmp/galera/galerautils/src/gu_resolver.cpp:532:19
          #1 0x7f79ca1869c9 in gcomm::GMCast::set_initial_addr(gu::URI const&) /tmp/galera/gcomm/src/gmcast.cpp:290:28
          #2 0x7f79ca18170d in gcomm::GMCast::GMCast(gcomm::Protonet&, gu::URI const&, gcomm::UUID const*) /tmp/galera/gcomm/src/gmcast.cpp:141:5
          #3 0x7f79ca1d2b97 in gcomm::PC::PC(gcomm::Protonet&, gu::URI const&) /tmp/galera/gcomm/src/pc.cpp:271:19
      

      Given the code is:

                addrinfo* ai(0);
                try
                {
                    err = getaddrinfo(host.c_str(), uri.get_port().c_str(),
                                      SchemeMap::get_addrinfo(i), &ai);
                }
                catch (NotSet&)
      

      Didn't appear to be get port (based on address)

      (rr) p &uri.get_port()
      $23 = (const std::__1::string *) 0x7060000066a0
      

      or host

      gu::URI::get_port (this=0x7f79bfbfdd70) at /tmp/galera/galerautils/src/gu_uri.hpp:167
      167	            if (authority_.empty())
      (rr) b c_str
      Breakpoint 4 at 0x55c5226fbf34: c_str. (346 locations)
      (rr) reverse-continue 
      Continuing.
       
      Thread 2 hit Breakpoint 4.212, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::c_str[abi:ne190100]() const (this=0x7f79bfbfdd10) at /usr/lib/llvm-19/bin/../include/c++/v1/string:1702
      1702	  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const value_type* c_str() const _NOEXCEPT { return data(); }
      (rr) p *this
      $25 = {static __endian_factor = 2, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {__s = {{__is_long_ = 0 '\000', 
                  __size_ = 9 '\t'}, __padding_ = 0x7f79bfbfdd11 "127.0.0.1", __data_ = "127.0.0.1\000\000\000P\000\000\260\335\277\277y\177\000"}, __l = {{__is_long_ = 0, __cap_ = 1735882668900948105}, __size_ = 87960930234670, 
                __data_ = 0x7f79bfbfddb0 "`f"}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}
      (rr) p this
      $26 = (const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > *) 0x7f79bfbfdd10
      

      Attachments

        Issue Links

          Activity

            People

              janlindstrom Jan Lindström
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.