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

SPIDER plugin initialization fails upon startup

    XMLWordPrintable

Details

    Description

      If server is started with --plugin-load-add=ha_spider, it throws an error on startup.

      --let restart_parameters= --plugin-load-add=ha_spider
      --source include/restart_mysqld.inc
       
      SELECT COUNT(*) FROM information_schema.SPIDER_ALLOC_MEM;
      

      10.7 dd9da61d

      [ERROR] SPIDER plugin initialization failed at 'drop procedure if exists mysql.spider_fix_one_table' by 'Unknown storage engine 'Aria''
      2022-10-27 22:19:57 0 [ERROR] Plugin 'SPIDER' init function returned error.
      2022-10-27 22:19:57 0 [ERROR] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.
      

      And if instead the plugin is installed into mysql.plugin, the failure upon server restart is different:

      INSTALL SONAME 'ha_spider';
      --source include/restart_mysqld.inc
      SELECT COUNT(*) FROM information_schema.SPIDER_ALLOC_MEM;
      

      [ERROR] SPIDER plugin initialization failed at 'drop procedure mysql.spider_fix_one_table' by 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement'
      2022-10-28  0:54:26 0 [ERROR] Plugin 'SPIDER' init function returned error.
      2022-10-28  0:54:26 0 [ERROR] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.
      

      It happens regardless of the build type (debug, release, all the same).
      On a debug build, additionally a query from a spider system table causes a mutex failure.

      10.7 dd9da61d

      safe_mutex: Trying to lock uninitialized mutex at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/spider/spd_i_s.cc, line 110
      221027 22:25:32 [ERROR] mysqld got signal 6 ;
       
      #5  0x00007f1d001aa537 in __GI_abort () at abort.c:79
      #6  0x000055faf75188f5 in safe_mutex_lock (mp=0x7f1cf871fea0 <spider_mem_calc_mutex>, my_flags=0, file=0x7f1cf85c9f40 "/home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/spider/spd_i_s.cc", line=110) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/mysys/thr_mutex.c:245
      #7  0x00007f1cf8385cb3 in inline_mysql_mutex_lock (that=0x7f1cf871fea0 <spider_mem_calc_mutex>, src_file=0x7f1cf85c9f40 "/home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/spider/spd_i_s.cc", src_line=110) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/include/mysql/psi/mysql_thread.h:750
      #8  0x00007f1cf83867f7 in spider_i_s_alloc_mem_fill_table (thd=0x62b00008c218, tables=0x6290000e6a18, cond=0x0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/spider/spd_i_s.cc:110
      #9  0x000055faf5b488ab in get_schema_tables_result (join=0x6290000e7f00, executed_place=PROCESSED_BY_JOIN_EXEC) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_show.cc:8869
      #10 0x000055faf5a1d36b in JOIN::exec_inner (this=0x6290000e7f00) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_select.cc:4739
      #11 0x000055faf5a1b137 in JOIN::exec (this=0x6290000e7f00) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_select.cc:4560
      #12 0x000055faf5a1f558 in mysql_select (thd=0x62b00008c218, tables=0x6290000e6a18, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x6290000e7ed0, unit=0x62b000090628, select_lex=0x6290000e6318) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_select.cc:5040
      #13 0x000055faf59efbe5 in handle_select (thd=0x62b00008c218, lex=0x62b000090550, result=0x6290000e7ed0, setup_tables_done_option=0) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_select.cc:554
      #14 0x000055faf591a889 in execute_sqlcom_select (thd=0x62b00008c218, all_tables=0x6290000e6a18) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:6253
      #15 0x000055faf59094c1 in mysql_execute_command (thd=0x62b00008c218, is_called_from_prepared_stmt=false) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:3944
      #16 0x000055faf592561d in mysql_parse (thd=0x62b00008c218, rawbuf=0x6290000e6238 "SELECT COUNT(*) FROM information_schema.SPIDER_ALLOC_MEM", length=56, parser_state=0x7f1cf64d7990) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:8014
      #17 0x000055faf58fbfb7 in dispatch_command (command=COM_QUERY, thd=0x62b00008c218, packet=0x6290000dc219 "SELECT COUNT(*) FROM information_schema.SPIDER_ALLOC_MEM", packet_length=56, blocking=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:1894
      #18 0x000055faf58f8d8a in do_command (thd=0x62b00008c218, blocking=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_parse.cc:1407
      #19 0x000055faf5d8b522 in do_handle_one_connection (connect=0x608000003238, put_in_cache=true) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_connect.cc:1416
      #20 0x000055faf5d8aeb8 in handle_one_connection (arg=0x608000003238) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/sql/sql_connect.cc:1318
      #21 0x000055faf69377a2 in pfs_spawn_thread (arg=0x61700000ac18) at /home/jenkins/workspace/sandbox-elenst/Nightly-Build-CS/src/storage/perfschema/pfs.cc:2201
      #22 0x00007f1d00697ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x00007f1d00284aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The failures started happening after this commit in 10.7

      commit c160a115b8b6dcd54bb3daf1a751ee9c68b7ee47 (origin/bb-10.7-MDEV-27233)
      Author: Nayuta Yanagisawa
      Date:   Mon Apr 25 18:29:01 2022 +0900
       
          MDEV-27233 Server hangs when using --init-file which loads Spider and creates a Spider table
      

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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