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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed from THD::my_ok_with_recreate_info on ALTER on locked table

Details

    Description

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE'',USER'',PASSWORD'');
      CREATE TABLE ti (c INT) ENGINE=InnoDB;
      CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
      LOCK TABLES t WRITE;
      ALTER TABLE t ENGINE=InnoDB;
      

      Leads to:

      CS 10.6.20 2e580dc2a8da4aaf3a7f1b3cfb4f897dbb5f7089 (Debug)

      mariadbd: /test/10.6_dbg/sql/sql_error.cc:334: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      

      CS 10.6.20 2e580dc2a8da4aaf3a7f1b3cfb4f897dbb5f7089 (Debug)

      Core was generated by `/test/MD190824-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1352901)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00001534a364526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00001534a36288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00001534a362881b in __assert_fail_base (fmt=0x1534a37d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5650618a0360 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x5650618a0240 "/test/10.6_dbg/sql/sql_error.cc", line=line@entry=334, function=function@entry=0x5650618a0398 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:94
      #6  0x00001534a363b507 in __assert_fail (assertion=0x5650618a0360 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x5650618a0240 "/test/10.6_dbg/sql/sql_error.cc", line=334, function=0x5650618a0398 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:103
      #7  0x0000565060b7d31a in Diagnostics_area::set_ok_status (this=0x153448006d28, affected_rows=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x1534a12fde20 "Records: 0  Duplicates: 0  Warnings: 2") at /test/10.6_dbg/sql/sql_error.cc:334
      #8  0x0000565060b71030 in my_ok (message=0x1534a12fde20 "Records: 0  Duplicates: 0  Warnings: 2", id=0, affected_rows_arg=<optimized out>, thd=0x153448000d58)at /test/10.6_dbg/sql/sql_class.h:4540
      #9  THD::my_ok_with_recreate_info (this=this@entry=0x153448000d58, info=@0x1534a1300200: {m_records_copied = 0, m_records_duplicate = 0}, warn_count=<optimized out>) at /test/10.6_dbg/sql/sql_class.cc:8596
      #10 0x0000565060ca6975 in mysql_alter_table (thd=thd@entry=0x153448000d58, new_db=new_db@entry=0x1534480059f8, new_name=new_name@entry=0x153448005e60, create_info=create_info@entry=0x1534a13003b0, table_list=<optimized out>, table_list@entry=0x153448013548, recreate_info=recreate_info@entry=0x1534a1300200, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>)at /test/10.6_dbg/sql/sql_table.cc:11108
      #11 0x0000565060d28232 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x153448000d58) at /test/10.6_dbg/sql/sql_alter.cc:675
      #12 0x0000565060bce139 in mysql_execute_command (thd=thd@entry=0x153448000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.6_dbg/sql/sql_parse.cc:6125
      #13 0x0000565060bcfa74 in mysql_parse (thd=thd@entry=0x153448000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1534a13012b0)at /test/10.6_dbg/sql/sql_parse.cc:8165
      #14 0x0000565060bd1f0b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153448000d58, packet=packet@entry=0x15344800b0b9 "", packet_length=packet_length@entry=27, blocking=blocking@entry=true)at /test/10.6_dbg/sql/sql_class.h:242
      #15 0x0000565060bd4132 in do_command (thd=0x153448000d58, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1410
      #16 0x0000565060d1fd86 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5650639c0cd8, put_in_cache=put_in_cache@entry=true)at /test/10.6_dbg/sql/sql_connect.cc:1417
      #17 0x0000565060d20086 in handle_one_connection (arg=arg@entry=0x5650639c0cd8)at /test/10.6_dbg/sql/sql_connect.cc:1319
      #18 0x000056506116d0b6 in pfs_spawn_thread (arg=0x5650639bd928)at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #19 0x00001534a369ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #20 0x00001534a3729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.6.20 (dbg), 10.11.10 (dbg), 11.1.7 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.5.2 (dbg), 11.6.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.1.7 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.5.2 (opt), 11.6.1 (opt)

      Attachments

        Issue Links

          Activity

            When the ALTER is changed to MyISAM the issue does not occur:

            CS 11.2.6 a8517608894f43954e210035d357400b3d637195 (Debug)

            11.2.6-dbg>ALTER TABLE t ENGINE=MyISAM;
            ERROR 12622 (HY000): Can't use this operation before executing 'unlock tables'
            

            Roel Roel Van de Paar added a comment - When the ALTER is changed to MyISAM the issue does not occur: CS 11.2.6 a8517608894f43954e210035d357400b3d637195 (Debug) 11.2.6-dbg>ALTER TABLE t ENGINE=MyISAM; ERROR 12622 (HY000): Can't use this operation before executing 'unlock tables'

            MTR Testcase

            --source include/have_innodb.inc
            --source plugin/spider/spider/include/init_spider.inc
            SET spider_same_server_link= on;
            eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT $MASTER_MYPORT);
            CREATE TABLE ti (c INT) ENGINE=InnoDB;
            CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
            LOCK TABLES t WRITE;
            ALTER TABLE t ENGINE=InnoDB;
            

            Roel Roel Van de Paar added a comment - MTR Testcase --source include/have_innodb.inc --source plugin/spider/spider/include/init_spider.inc SET spider_same_server_link= on ; eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1" , DATABASE "test" , USER "root" , PORT $MASTER_MYPORT); CREATE TABLE ti (c INT ) ENGINE=InnoDB; CREATE TABLE t (c INT ) ENGINE=Spider COMMENT= 'WRAPPER "mysql",SRV "srv",TABLE "ti"' ; LOCK TABLES t WRITE; ALTER TABLE t ENGINE=InnoDB;
            ycp Yuchen Pei added a comment - - edited

            Cannot reproduce with the following test case (no errors) at the current 10.6 60b93cdd305f7f3842abafe61bfd23130d0681d1 with ASAN, nor at 2e580dc2a8da4aaf3a7f1b3cfb4f897dbb5f7089 in the description, with or without ASAN

            # in spider/bugfix suite
            --source include/have_innodb.inc
            --source ../../include/init_spider.inc
            SET spider_same_server_link= on;
            eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT $MASTER_1_MYPORT);
            CREATE TABLE ti (c INT) ENGINE=InnoDB;
            CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
            LOCK TABLES t WRITE;
            ALTER TABLE t ENGINE=InnoDB;
            

            ycp Yuchen Pei added a comment - - edited Cannot reproduce with the following test case (no errors) at the current 10.6 60b93cdd305f7f3842abafe61bfd23130d0681d1 with ASAN, nor at 2e580dc2a8da4aaf3a7f1b3cfb4f897dbb5f7089 in the description, with or without ASAN # in spider/bugfix suite --source include/have_innodb.inc --source ../../include/init_spider.inc SET spider_same_server_link= on ; eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1" , DATABASE "test" , USER "root" , PORT $MASTER_1_MYPORT); CREATE TABLE ti (c INT ) ENGINE=InnoDB; CREATE TABLE t (c INT ) ENGINE=Spider COMMENT= 'WRAPPER "mysql",SRV "srv",TABLE "ti"' ; LOCK TABLES t WRITE; ALTER TABLE t ENGINE=InnoDB;
            Roel Roel Van de Paar added a comment - - edited

            No errors at all? Odd (and incorrect as t is locked).

            Build 10.6 at the same current revision 60b93cdd305f7f3842abafe61bfd23130d0681d1 (debug) and it crashes also:

            CS 10.6.20 60b93cdd305f7f3842abafe61bfd23130d0681d1 (Debug)

            Welcome to the MariaDB monitor.  Commands end with ; or \g.
            Your MariaDB connection id is 4
            Server version: 10.6.20-MariaDB-debug MariaDB Server
             
            Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
             
            Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
             
            10.6.20-dbg>INSTALL PLUGIN Spider SONAME 'ha_spider.so';
            Query OK, 0 rows affected, 1 warning (0.488 sec)
             
            10.6.20-dbg>CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE'',USER'',PASSWORD'');
            Query OK, 0 rows affected (0.002 sec)
             
            10.6.20-dbg>CREATE TABLE ti (c INT) ENGINE=InnoDB;
            Query OK, 0 rows affected (0.005 sec)
             
            10.6.20-dbg>CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
            Query OK, 0 rows affected (0.004 sec)
             
            10.6.20-dbg>LOCK TABLES t WRITE;
            Query OK, 0 rows affected (0.003 sec)
             
            10.6.20-dbg>ALTER TABLE t ENGINE=InnoDB;
            ERROR 2013 (HY000): Lost connection to server during query
            

            Also in MTR for/in the same version:

            CS 10.6.20 60b93cdd305f7f3842abafe61bfd23130d0681d1 (Debug)

            /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test$ cat main/test.test
            --source include/have_innodb.inc
            --source plugin/spider/spider/include/init_spider.inc
            SET spider_same_server_link= on;
            eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT $MASTER_MYPORT);
            CREATE TABLE ti (c INT) ENGINE=InnoDB;
            CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
            LOCK TABLES t WRITE;
            ALTER TABLE t ENGINE=InnoDB;
             
            /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test$ ./mtr test
            Logging: ./mtr  test
            VS config: 
            vardir: /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var
            Checking leftover processes...
            Removing old var directory...
            Creating var directory '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var'...
            Checking supported features...
            MariaDB Version 10.6.20-MariaDB-debug
             - SSL connections supported
             - binaries are debug compiled
             - binaries built with wsrep patch
            Collecting tests...
            Installing system database...
             
            ==============================================================================
             
            TEST                                      RESULT   TIME (ms) or COMMENT
            --------------------------------------------------------------------------
             
            worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029
            INSTALL SONAME 'ha_spider';
            Warnings:
            Warning	1105	Cannot enable tc-log at run-time. XA features of SPIDER are disabled
            SET spider_internal_sql_log_off= 0;
            SET spider_same_server_link= on;
            CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT 19000);
            CREATE TABLE ti (c INT) ENGINE=InnoDB;
            CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"';
            LOCK TABLES t WRITE;
            ALTER TABLE t ENGINE=InnoDB;
            main.test                                [ fail ]
                    Test ended at 2024-09-07 08:50:50
             
            CURRENT_TEST: main.test
            mysqltest: At line 8: query 'ALTER TABLE t ENGINE=InnoDB' failed: <Unknown> (2013): Lost connection to server during query
             
             
            Server [mysqld.1 - pid: 2660398, winpid: 2660398, exit: 256] failed during test run
            Server log from this test:
            ----------SERVER LOG START-----------
            $ /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd --defaults-group-suffix=.1 --defaults-file=/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/my.cnf --log-output=file --innodb --innodb-cmpmem --innodb-cmp-per-index --innodb-trx --innodb-locks --innodb-lock-waits --innodb-metrics --innodb-buffer-pool-stats --innodb-buffer-page --innodb-buffer-page-lru --innodb-sys-columns --innodb-sys-fields --innodb-sys-foreign --innodb-sys-foreign-cols --innodb-sys-indexes --innodb-sys-tables --innodb-sys-virtual --core-file --loose-debug-sync-timeout=300
            2024-09-07  8:50:50 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32214)
            2024-09-07  8:50:50 0 [Warning] Changed limits: max_open_files: 1024  max_connections: 151 (was 151)  table_cache: 421 (was 2000)
            2024-09-07  8:50:50 0 [Note] Starting MariaDB 10.6.20-MariaDB-debug-log source revision 60b93cdd305f7f3842abafe61bfd23130d0681d1 server_uid 9vyflyXftaZZJjCZNPC9nNXJTuo= as process 2660404
            2024-09-07  8:50:50 0 [Note] Plugin 'partition' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'SEQUENCE' is disabled.
            2024-09-07  8:50:50 0 [Note] InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
            2024-09-07  8:50:50 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
            2024-09-07  8:50:50 0 [Note] InnoDB: Using transactional memory
            2024-09-07  8:50:50 0 [Note] InnoDB: Number of pools: 1
            2024-09-07  8:50:50 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
            2024-09-07  8:50:50 0 [Note] InnoDB: Using liburing
            2024-09-07  8:50:50 0 [Note] InnoDB: Initializing buffer pool, total size = 8388608, chunk size = 8388608
            2024-09-07  8:50:50 0 [Note] InnoDB: Completed initialization of buffer pool
            2024-09-07  8:50:50 0 [Note] InnoDB: 128 rollback segments are active.
            2024-09-07  8:50:50 0 [Note] InnoDB: Creating shared tablespace for temporary tables
            2024-09-07  8:50:50 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
            2024-09-07  8:50:50 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
            2024-09-07  8:50:50 0 [Note] InnoDB: 10.6.20 started; log sequence number 52375; transaction id 16
            2024-09-07  8:50:50 0 [Note] InnoDB: Loading buffer pool(s) from /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/mysqld.1/data/ib_buffer_pool
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_DELETED' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_CMP' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'THREAD_POOL_WAITS' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_CMP_RESET' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'THREAD_POOL_QUEUES' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'FEEDBACK' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'THREAD_POOL_GROUPS' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'user_variables' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'INNODB_TABLESPACES_ENCRYPTION' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'THREAD_POOL_STATS' is disabled.
            2024-09-07  8:50:50 0 [Note] Plugin 'unix_socket' is disabled.
            2024-09-07  8:50:50 0 [Warning] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: unknown option '--loose-pam-debug'
            2024-09-07  8:50:50 0 [Warning] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: unknown option '--loose-aria'
            2024-09-07  8:50:50 0 [Note] InnoDB: Buffer pool(s) load completed at 240907  8:50:50
            2024-09-07  8:50:50 0 [Note] Server socket created on IP: '127.0.0.1'.
            2024-09-07  8:50:50 0 [Note] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: ready for connections.
            Version: '10.6.20-MariaDB-debug-log'  socket: '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/tmp/mysqld.1.sock'  port: 19000  MariaDB Server
            mariadbd: /test/10.6_dbg/sql/sql_error.cc:347: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
            ----------SERVER LOG END-------------
             
             
             - found 'core' (0/5)
            Core generated by '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd'
            

            Suggestions:
            1. Not sure if you tried debug (your comment did not mention it); it is needed. ASAN build not needed.
            2. For referece, my CMAKE:

            cmake . -DWITH_SSL=bundled -DBUILD_CONFIG=mysql_release -DWITH_UNIT_TESTS=0 -DWITH_TOKUDB=0 -DWITH_JEMALLOC=no -DFEATURE_SET=community -DDEBUG_EXTNAME=OFF -DWITH_EMBEDDED_SERVER=0 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost_980321 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DWITH_SAFEMALLOC=OFF -DPLUGIN_PERFSCHEMA=YES -DWITH_DBUG_TRACE=OFF -DWITH_ZLIB=bundled -DWITH_ROCKSDB=1 -DWITH_PAM=ON -DWITH_MARIABACKUP=0 -DFORCE_INSOURCE_BUILD=1 -DCMAKE_C_FLAGS='-Og -march=native -mtune=native' -DCMAKE_CXX_FLAGS='-Og -march=native -mtune=native' -DMYSQL_MAINTAINER_MODE=OFF -DWARNING_AS_ERROR='' -DCMAKE_BUILD_TYPE=Debug
            

            3. For reference, my gcc version: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 on Ubuntu 24.04 LTS
            4. Perhaps try a binary build (./scripts/make_binary_distribution after build) in combination with MTR (i.e. plugin/spider/spider/include/) in case it makes a difference
            5. Try direct CLI with the original testcase (with socket path adjusted to your setup)
            If all else fails, I can setup rr server with a reproducer.

            Roel Roel Van de Paar added a comment - - edited No errors at all? Odd (and incorrect as t is locked). Build 10.6 at the same current revision 60b93cdd305f7f3842abafe61bfd23130d0681d1 (debug) and it crashes also: CS 10.6.20 60b93cdd305f7f3842abafe61bfd23130d0681d1 (Debug) Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 4 Server version: 10.6.20-MariaDB-debug MariaDB Server   Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.   Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.   10.6.20-dbg>INSTALL PLUGIN Spider SONAME 'ha_spider.so'; Query OK, 0 rows affected, 1 warning (0.488 sec)   10.6.20-dbg>CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE'',USER'',PASSWORD''); Query OK, 0 rows affected (0.002 sec)   10.6.20-dbg>CREATE TABLE ti (c INT) ENGINE=InnoDB; Query OK, 0 rows affected (0.005 sec)   10.6.20-dbg>CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"'; Query OK, 0 rows affected (0.004 sec)   10.6.20-dbg>LOCK TABLES t WRITE; Query OK, 0 rows affected (0.003 sec)   10.6.20-dbg>ALTER TABLE t ENGINE=InnoDB; ERROR 2013 (HY000): Lost connection to server during query Also in MTR for/in the same version: CS 10.6.20 60b93cdd305f7f3842abafe61bfd23130d0681d1 (Debug) /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test$ cat main/test.test --source include/have_innodb.inc --source plugin/spider/spider/include/init_spider.inc SET spider_same_server_link= on; eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT $MASTER_MYPORT); CREATE TABLE ti (c INT) ENGINE=InnoDB; CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"'; LOCK TABLES t WRITE; ALTER TABLE t ENGINE=InnoDB;   /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test$ ./mtr test Logging: ./mtr test VS config: vardir: /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var'... Checking supported features... MariaDB Version 10.6.20-MariaDB-debug - SSL connections supported - binaries are debug compiled - binaries built with wsrep patch Collecting tests... Installing system database...   ==============================================================================   TEST RESULT TIME (ms) or COMMENT --------------------------------------------------------------------------   worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029 INSTALL SONAME 'ha_spider'; Warnings: Warning 1105 Cannot enable tc-log at run-time. XA features of SPIDER are disabled SET spider_internal_sql_log_off= 0; SET spider_same_server_link= on; CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (HOST "127.0.0.1", DATABASE "test", USER "root", PORT 19000); CREATE TABLE ti (c INT) ENGINE=InnoDB; CREATE TABLE t (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "ti"'; LOCK TABLES t WRITE; ALTER TABLE t ENGINE=InnoDB; main.test [ fail ] Test ended at 2024-09-07 08:50:50   CURRENT_TEST: main.test mysqltest: At line 8: query 'ALTER TABLE t ENGINE=InnoDB' failed: <Unknown> (2013): Lost connection to server during query     Server [mysqld.1 - pid: 2660398, winpid: 2660398, exit: 256] failed during test run Server log from this test: ----------SERVER LOG START----------- $ /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd --defaults-group-suffix=.1 --defaults-file=/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/my.cnf --log-output=file --innodb --innodb-cmpmem --innodb-cmp-per-index --innodb-trx --innodb-locks --innodb-lock-waits --innodb-metrics --innodb-buffer-pool-stats --innodb-buffer-page --innodb-buffer-page-lru --innodb-sys-columns --innodb-sys-fields --innodb-sys-foreign --innodb-sys-foreign-cols --innodb-sys-indexes --innodb-sys-tables --innodb-sys-virtual --core-file --loose-debug-sync-timeout=300 2024-09-07 8:50:50 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32214) 2024-09-07 8:50:50 0 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 (was 151) table_cache: 421 (was 2000) 2024-09-07 8:50:50 0 [Note] Starting MariaDB 10.6.20-MariaDB-debug-log source revision 60b93cdd305f7f3842abafe61bfd23130d0681d1 server_uid 9vyflyXftaZZJjCZNPC9nNXJTuo= as process 2660404 2024-09-07 8:50:50 0 [Note] Plugin 'partition' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'SEQUENCE' is disabled. 2024-09-07 8:50:50 0 [Note] InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!! 2024-09-07 8:50:50 0 [Note] InnoDB: Compressed tables use zlib 1.3.1 2024-09-07 8:50:50 0 [Note] InnoDB: Using transactional memory 2024-09-07 8:50:50 0 [Note] InnoDB: Number of pools: 1 2024-09-07 8:50:50 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2024-09-07 8:50:50 0 [Note] InnoDB: Using liburing 2024-09-07 8:50:50 0 [Note] InnoDB: Initializing buffer pool, total size = 8388608, chunk size = 8388608 2024-09-07 8:50:50 0 [Note] InnoDB: Completed initialization of buffer pool 2024-09-07 8:50:50 0 [Note] InnoDB: 128 rollback segments are active. 2024-09-07 8:50:50 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2024-09-07 8:50:50 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2024-09-07 8:50:50 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2024-09-07 8:50:50 0 [Note] InnoDB: 10.6.20 started; log sequence number 52375; transaction id 16 2024-09-07 8:50:50 0 [Note] InnoDB: Loading buffer pool(s) from /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/mysqld.1/data/ib_buffer_pool 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_CONFIG' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_DELETED' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_CMP' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'THREAD_POOL_WAITS' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_CMP_RESET' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'THREAD_POOL_QUEUES' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'FEEDBACK' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'THREAD_POOL_GROUPS' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'user_variables' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'INNODB_TABLESPACES_ENCRYPTION' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'THREAD_POOL_STATS' is disabled. 2024-09-07 8:50:50 0 [Note] Plugin 'unix_socket' is disabled. 2024-09-07 8:50:50 0 [Warning] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: unknown option '--loose-pam-debug' 2024-09-07 8:50:50 0 [Warning] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: unknown option '--loose-aria' 2024-09-07 8:50:50 0 [Note] InnoDB: Buffer pool(s) load completed at 240907 8:50:50 2024-09-07 8:50:50 0 [Note] Server socket created on IP: '127.0.0.1'. 2024-09-07 8:50:50 0 [Note] /test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd: ready for connections. Version: '10.6.20-MariaDB-debug-log' socket: '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/mysql-test/var/tmp/mysqld.1.sock' port: 19000 MariaDB Server mariadbd: /test/10.6_dbg/sql/sql_error.cc:347: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed. ----------SERVER LOG END-------------     - found 'core' (0/5) Core generated by '/test/MD070924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd' Suggestions: 1. Not sure if you tried debug (your comment did not mention it); it is needed. ASAN build not needed. 2. For referece, my CMAKE: cmake . -DWITH_SSL=bundled -DBUILD_CONFIG=mysql_release -DWITH_UNIT_TESTS=0 -DWITH_TOKUDB=0 -DWITH_JEMALLOC=no -DFEATURE_SET=community -DDEBUG_EXTNAME=OFF -DWITH_EMBEDDED_SERVER=0 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost_980321 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DWITH_SAFEMALLOC=OFF -DPLUGIN_PERFSCHEMA=YES -DWITH_DBUG_TRACE=OFF -DWITH_ZLIB=bundled -DWITH_ROCKSDB=1 -DWITH_PAM=ON -DWITH_MARIABACKUP=0 -DFORCE_INSOURCE_BUILD=1 -DCMAKE_C_FLAGS='-Og -march=native -mtune=native' -DCMAKE_CXX_FLAGS='-Og -march=native -mtune=native' -DMYSQL_MAINTAINER_MODE=OFF -DWARNING_AS_ERROR='' -DCMAKE_BUILD_TYPE=Debug 3. For reference, my gcc version: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 on Ubuntu 24.04 LTS 4. Perhaps try a binary build (./scripts/make_binary_distribution after build) in combination with MTR (i.e. plugin/spider/spider/include/) in case it makes a difference 5. Try direct CLI with the original testcase (with socket path adjusted to your setup) If all else fails, I can setup rr server with a reproducer.

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              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.