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

Hashicorp: Memory leak in initialize_encryption_plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.9
    • Fix Version/s: 10.9
    • Component/s: Encryption, Plugins
    • Labels:
      None
    • Environment:
      gcc (Debian 10.2.1-6) 10.2.1 20210110

      Description

      Run any hashicorp MTR test on an ASAN build. For the failure, it's enough just to start the server with the plugin.

      bb-10.9-MDEV-19281-v5 a47e08aa2b

      vault.hashicorp_encode 'innodb'          [ pass ]    733
      ***Warnings generated in error logs during shutdown after running tests: vault.hashicorp_encode
       
      ==3901211==ERROR: LeakSanitizer: detected memory leaks
      SUMMARY: AddressSanitizer: 192 byte(s) leaked in 12 allocation(s).
      Attempting backtrace. You can use the following information to find out
      

      ==3901211==ERROR: LeakSanitizer: detected memory leaks
       
      Direct leak of 144 byte(s) in 6 object(s) allocated from:
          #0 0x7feae9df1e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x7feae146ba4d  (<unknown module>)
          #2 0x7feae146d22b  (<unknown module>)
          #3 0x7feae1532812  (<unknown module>)
          #4 0x7feae146b999  (<unknown module>)
          #5 0x7feae146cbe0  (<unknown module>)
          #6 0x7feae1468788  (<unknown module>)
          #7 0x7feae1b10f73  (<unknown module>)
          #8 0x7feae1c0428a  (<unknown module>)
          #9 0x7feae1bab534  (<unknown module>)
          #10 0x7feae1c572e5  (<unknown module>)
          #11 0x7feae1c57d5b  (<unknown module>)
          #12 0x56143a6a9f32 in initialize_encryption_plugin(st_plugin_int*) /data/src/bb-10.9-MDEV-19281-v5/sql/encryption.cc:69
          #13 0x56143a035a6c in plugin_initialize /data/src/bb-10.9-MDEV-19281-v5/sql/sql_plugin.cc:1463
          #14 0x56143a037980 in plugin_init(int*, char**, int) /data/src/bb-10.9-MDEV-19281-v5/sql/sql_plugin.cc:1756
          #15 0x561439c2048d in init_server_components /data/src/bb-10.9-MDEV-19281-v5/sql/mysqld.cc:5101
          #16 0x561439c226b0 in mysqld_main(int, char**) /data/src/bb-10.9-MDEV-19281-v5/sql/mysqld.cc:5716
          #17 0x561439c0b894 in main /data/src/bb-10.9-MDEV-19281-v5/sql/main.cc:34
          #18 0x7feae9413d09 in __libc_start_main ../csu/libc-start.c:308
          #19 0x561439c0b7b9 in _start (/mnt8t/src/bb-10.9-MDEV-19281-v5/sql/mariadbd+0x18197b9)
       
      Indirect leak of 48 byte(s) in 6 object(s) allocated from:
          #0 0x7feae9df1e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x7feae146ba4d  (<unknown module>)
          #2 0x7feae146d22b  (<unknown module>)
          #3 0x7feae153281f  (<unknown module>)
          #4 0x7feae146b999  (<unknown module>)
          #5 0x7feae146cbe0  (<unknown module>)
          #6 0x7feae1468788  (<unknown module>)
          #7 0x7feae1b10f73  (<unknown module>)
          #8 0x7feae1c0428a  (<unknown module>)
          #9 0x7feae1bab534  (<unknown module>)
          #10 0x7feae1c572e5  (<unknown module>)
          #11 0x7feae1c57d5b  (<unknown module>)
          #12 0x56143a6a9f32 in initialize_encryption_plugin(st_plugin_int*) /data/src/bb-10.9-MDEV-19281-v5/sql/encryption.cc:69
          #13 0x56143a035a6c in plugin_initialize /data/src/bb-10.9-MDEV-19281-v5/sql/sql_plugin.cc:1463
          #14 0x56143a037980 in plugin_init(int*, char**, int) /data/src/bb-10.9-MDEV-19281-v5/sql/sql_plugin.cc:1756
          #15 0x561439c2048d in init_server_components /data/src/bb-10.9-MDEV-19281-v5/sql/mysqld.cc:5101
          #16 0x561439c226b0 in mysqld_main(int, char**) /data/src/bb-10.9-MDEV-19281-v5/sql/mysqld.cc:5716
          #17 0x561439c0b894 in main /data/src/bb-10.9-MDEV-19281-v5/sql/main.cc:34
          #18 0x7feae9413d09 in __libc_start_main ../csu/libc-start.c:308
          #19 0x561439c0b7b9 in _start (/mnt8t/src/bb-10.9-MDEV-19281-v5/sql/mariadbd+0x18197b9)
       
      SUMMARY: AddressSanitizer: 192 byte(s) leaked in 12 allocation(s).
      220506 16:58:53 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.9.0-MariaDB-debug-log
      read_buffer_size=131072
      max_used_connections=1
      thread_count=0
      Thread pointer: 0x0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x0 thread_stack 0x100000
      sanitizer_common/sanitizer_common_interceptors.inc:4101(__interceptor_backtrace.part.0)[0x7feae9d8bdf1]
      mysys/stacktrace.c:212(my_print_stacktrace)[0x56143bbe170c]
      sql/signal_handler.cc:226(handle_fatal_signal)[0x56143a856980]
      sigaction.c:0(__restore_rt)[0x7feae98f7140]
      linux/raise.c:51(__GI_raise)[0x7feae9428ce1]
      stdlib/abort.c:81(__GI_abort)[0x7feae9412537]
      sanitizer_common/sanitizer_posix_libcdep.cpp:149(__sanitizer::Abort())[0x7feae9e0d11b]
      sanitizer_common/sanitizer_termination.cpp:59(__sanitizer::Die())[0x7feae9e17ce8]
      lsan/lsan_common_linux.cpp:115(__lsan::HandleLeaks())[0x7feae9e1d258]
      sanitizer_common/sanitizer_mutex.h:187(__sanitizer::GenericScopedLock<__sanitizer::BlockingMutex>::~GenericScopedLock())[0x7feae9e1c9d5]
      stdlib/cxa_finalize.c:84(__cxa_finalize)[0x7feae942bac6]
      crtstuff.c:0(__do_global_dtors_aux)[0x7feae9d6bc33]
      The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /mnt8t/src/bb-10.9-MDEV-19281-v5/mysql-test/var/mysqld.1/data
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units     
      Max cpu time              unlimited            unlimited            seconds   
      Max file size             unlimited            unlimited            bytes     
      Max data size             unlimited            unlimited            bytes     
      Max stack size            8388608              unlimited            bytes     
      Max core file size        unlimited            unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             385901               385901               processes 
      Max open files            1024                 1024                 files     
      Max locked memory         12659513856          12659513856          bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       385901               385901               signals   
      Max msgqueue size         819200               819200               bytes     
      Max nice priority         0                    0                    
      Max realtime priority     0                    0                    
      Max realtime timeout      unlimited            unlimited            us        
      Core pattern: core
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sysprg Julius Goryavsky
              Reporter:
              elenst Elena Stepanova
              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.