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

Assertion failure or server crash in test_plugin_options upon server audit installation

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.5, 10.6
    • Plugin - Audit

    Description

      10.3 32bab2ce non-debug

      Thread 3 received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 3881406.3881443]
      0x000055793926e07e in test_plugin_options (tmp_root=0x3c1ffc00f110, tmp=0x55793b556658, argc=0x4fc56af7d7cc, argv=0x3c1ffc021650) at /data/src/10.3/sql/sql_plugin.cc:4029
      4029	  if (tmp->plugin->system_vars || (*argc > 1))
      (rr) bt
      #0  0x000055793926e07e in test_plugin_options (tmp_root=0x3c1ffc00f110, tmp=0x55793b556658, argc=0x4fc56af7d7cc, argv=0x3c1ffc021650)
          at /data/src/10.3/sql/sql_plugin.cc:4029
      #1  0x000055793926e601 in plugin_initialize (tmp_root=0x3c1ffc00f110, plugin=plugin@entry=0x55793b556658, argc=argc@entry=0x4fc56af7d7cc, argv=argv@entry=0x3c1ffc021650, 
          options_only=options_only@entry=false) at /data/src/10.3/sql/sql_plugin.cc:1422
      #2  0x000055793926e99e in finalize_install (thd=0x3c1ffc009d68, table=0x3c1ffc01e858, name=0x4fc56af7d7f0, argc=0x4fc56af7d7cc, argv=0x3c1ffc021650)
          at /data/src/10.3/sql/sql_plugin.cc:2110
      #3  0x000055793926ee02 in mysql_install_plugin (thd=thd@entry=0x3c1ffc009d68, name=<optimized out>, dl_arg=<optimized out>) at /data/src/10.3/sql/sql_plugin.cc:2216
      #4  0x000055793925fcb4 in mysql_execute_command (thd=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:5983
      #5  0x0000557939263692 in mysql_parse (thd=0x3c1ffc009d68, rawbuf=<optimized out>, length=53, parser_state=0x4fc56af7f610, is_com_multi=<optimized out>, 
          is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7871
      #6  0x0000557939264ee6 in dispatch_command (command=COM_QUERY, thd=0x3c1ffc009d68, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, 
          is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:200
      #7  0x0000557939266db4 in do_command (thd=0x3c1ffc009d68) at /data/src/10.3/sql/sql_parse.cc:1398
      #8  0x000055793933e634 in do_handle_one_connection (connect=connect@entry=0x700ffe38) at /data/src/10.3/sql/sql_connect.cc:1403
      #9  0x000055793933e822 in handle_one_connection (arg=0x700ffe38) at /data/src/10.3/sql/sql_connect.cc:1308
      #10 0x00007ff7ea5efea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #11 0x00004e1045363def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 32bab2ce

      mysqld: /data/src/10.3/sql/sql_plugin.cc:4054: int test_plugin_options(MEM_ROOT*, st_plugin_int*, int*, char**): Assertion `tmp->nbackups == 0' failed.
      220916 19:03:32 [ERROR] mysqld got signal 6 ;
       
      #3  0x000004e527844662 in __GI___assert_fail (assertion=0x55a64caa6cbc "tmp->nbackups == 0", file=0x55a64caa54b0 "/data/src/10.3/sql/sql_plugin.cc", line=4054, 
          function=0x55a64caa6c38 "int test_plugin_options(MEM_ROOT*, st_plugin_int*, int*, char**)") at assert.c:101
      #4  0x000055a64be8b017 in test_plugin_options (tmp_root=0xce7340062f8, tmp=0x55a64e170ed0, argc=0x73af03c9f684, argv=0xce73401b318)
          at /data/src/10.3/sql/sql_plugin.cc:4054
      #5  0x000055a64be8291d in plugin_initialize (tmp_root=0xce7340062f8, plugin=0x55a64e170ed0, argc=0x73af03c9f684, argv=0xce73401b318, options_only=false)
          at /data/src/10.3/sql/sql_plugin.cc:1422
      #6  0x000055a64be84bcd in finalize_install (thd=0xce734000d90, table=0xce73402bd00, name=0x73af03c9f6c0, argc=0x73af03c9f684, argv=0xce73401b318)
          at /data/src/10.3/sql/sql_plugin.cc:2110
      #7  0x000055a64be851d7 in mysql_install_plugin (thd=0xce734000d90, name=0xce7340058b0, dl_arg=0xce7340058c0) at /data/src/10.3/sql/sql_plugin.cc:2216
      #8  0x000055a64be71783 in mysql_execute_command (thd=0xce734000d90) at /data/src/10.3/sql/sql_parse.cc:5983
      #9  0x000055a64be773f2 in mysql_parse (thd=0xce734000d90, rawbuf=0xce734013868 "INSTALL /* QNO 228 CON_ID 13 */ SONAME 'server_audit'", length=53, 
          parser_state=0x73af03ca0600, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7871
      #10 0x000055a64be63c27 in dispatch_command (command=COM_QUERY, thd=0xce734000d90, packet=0xce734027c71 "INSTALL /* QNO 228 CON_ID 13 */ SONAME 'server_audit'", 
          packet_length=53, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #11 0x000055a64be625e5 in do_command (thd=0xce734000d90) at /data/src/10.3/sql/sql_parse.cc:1398
      #12 0x000055a64bfdff08 in do_handle_one_connection (connect=0x55a64e193780) at /data/src/10.3/sql/sql_connect.cc:1403
      #13 0x000055a64bfdfc73 in handle_one_connection (arg=0x55a64e193780) at /data/src/10.3/sql/sql_connect.cc:1308
      #14 0x00000ab1020a4ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x000004e52790ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The scenario to reproduce is the same as in MDEV-25248 (and MDEV-22647) – one connection installs/uninstalls server_audit plugin, while another one enables/disables server_audit_logging variable.
      However, it seems (almost?) impossible to reproduce with the MTR test case from MDEV-25248, because the failure described there always happens first: either safe_mutex error pops up or, on builds without safe_mutex, a hang occurs.

      Below is an RQG test which can reproduce the failures described here. It also more often fails with MDEV-25248, but it can also trigger the assertion failure or the crash above, and with some luck can also fail under rr.

      git clone https://github.com/MariaDB/randgen --branch mdev29557 rqg-mdev29557
      cd rqg-mdev29557
      perl ./runall-trials.pl --trials=100 --basedir=<basedir> --grammar=mdev29557.yy --threads=2 --skip-gendata --vardir=/dev/shm/var_mdev29557-10.3 --rr --duration=30
      

      Remember to set the basedir.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.