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

Assertion `sp && savepoint_next && *sp && *sp <= savepoint_level' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Issue:
      ------
      mariadbd: /home/ppandith/wl-24813/storage/federatedx/federatedx_txn.cc:321: int federatedx_txn::sp_rollback(ulong*): Assertion `sp && savepoint_next && *sp && *sp <= savepoint_level' failed.

      Version used:
      -------------
      Branch : main
      commit: f4a85225ea17b2c77c20e761773090a08aa3eceb
      Version : 13.1.0

      Stack trace:

      #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=6) at ./nptl/pthread_kill.c:89
      #3  my_write_core (sig=6) at /home/ppandith/wl-24813/mysys/stacktrace.c:424
      #4  handle_fatal_signal (sig=6) at /home/ppandith/wl-24813/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #9  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 __GI_abort () at ./stdlib/abort.c:79
      #11 __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=assertion@entry="sp && savepoint_next && *sp && *sp <= savepoint_level", 
          file=file@entry="/home/ppandith/wl-24813/storage/federatedx/federatedx_txn.cc", line=line@entry=321, 
          function=function@entry="int federatedx_txn::sp_rollback(ulong*)") at ./assert/assert.c:96
      #12 __assert_fail (assertion="sp && savepoint_next && *sp && *sp <= savepoint_level", 
          file="/home/ppandith/wl-24813/storage/federatedx/federatedx_txn.cc", line=321, function="int federatedx_txn::sp_rollback(ulong*)")
          at ./assert/assert.c:105
      #13 federatedx_txn::sp_rollback (this=, sp=) at /home/ppandith/wl-24813/storage/federatedx/federatedx_txn.cc:321
      #14 ha_federatedx::savepoint_rollback (thd=, sv=) at /home/ppandith/wl-24813/storage/federatedx/ha_federatedx.cc:3587
      #15 ha_rollback_to_savepoint (thd=, sv=) at /home/ppandith/wl-24813/sql/handler.cc:3317
      #16 trans_rollback_to_savepoint (thd=, name=...) at /home/ppandith/wl-24813/sql/transaction.cc:756
      #17 mysql_execute_command (thd=, is_called_from_prepared_stmt=false) at /home/ppandith/wl-24813/sql/sql_parse.cc:5633
      #18 mysql_parse (thd=, rawbuf="ROLLBACK TO SAVEPOINT sp1", length=25, parser_state=) at /home/ppandith/wl-24813/sql/sql_parse.cc:7945
      #19 dispatch_command (command=COM_QUERY, thd=, packet="ROLLBACK TO SAVEPOINT sp1", packet_length=25, blocking=true)
          at /home/ppandith/wl-24813/sql/sql_parse.cc:1903
      #20 do_command (thd=, blocking=true) at /home/ppandith/wl-24813/sql/sql_parse.cc:1437
      #21 do_handle_one_connection (connect=, put_in_cache=true) at /home/ppandith/wl-24813/sql/sql_connect.cc:1503
      #22 handle_one_connection (arg=) at /home/ppandith/wl-24813/sql/sql_connect.cc:1415
      #23 pfs_spawn_thread (arg=) at /home/ppandith/wl-24813/storage/perfschema/pfs.cc:2198
      #24 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #25 clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      How to repeat:

      Slave:

      create table s1( a int);
      

      Master: Start server with federated engine enabled

      create table s1(a int)  ENGINE="FEDERATED" CONNECTION='mysql://u3:pass1@127.0.0.1:3306/m8/s1';
       
      UPDATE s1 JOIN s1 AS OUTR2 SET OUTR2.a = 1 ;
      BEGIN ;  
      UPDATE s1 JOIN s1 AS OUTR2 SET OUTR2.a = 1 ;
      SAVEPOINT sp1 ;  
      ROLLBACK TO SAVEPOINT sp1 ;
      

      Attachments

        Activity

          People

            bsrikanth Srikanth Bondalapati
            mariadb-pavithrapandith Pavithra Pandith
            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.