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

[DRAFT] void lock_wait_end(trx_t*) [with bool from_deadlock = false]: Assertion `from_deadlock || trx->lock.wait_thr' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      origin/bb-13.0-bar-MDEV-40155, origin/13.0 19ca85156ad2f500ae90b4a2b3c31f0e7646333e

      # 2026-07-21T04:13:58 [2756436] | mariadbd: /data/Server/13.0A/storage/innobase/lock/lock0lock.cc:2479: void lock_wait_end(trx_t*) [with bool from_deadlock = false]: Assertion `from_deadlock || trx->lock.wait_thr' failed.
      

      StackTrace

      # 2026-07-21T04:15:24 [2756436] #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2026-07-21T04:15:24 [2756436] #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2026-07-21T04:15:24 [2756436] #2  __GI___pthread_kill (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
      # 2026-07-21T04:15:24 [2756436] #3  0x0000558c78f8e3c1 in my_write_core (sig=6) at /data/Server/13.0A/mysys/stacktrace.c:424
      # 2026-07-21T04:15:24 [2756436] #4  0x0000558c789a0a3f in handle_fatal_signal (sig=6) at /data/Server/13.0A/sql/signal_handler.cc:298
      # 2026-07-21T04:15:24 [2756436] #5  <signal handler called>
      # 2026-07-21T04:15:24 [2756436] #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2026-07-21T04:15:24 [2756436] #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2026-07-21T04:15:24 [2756436] #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      # 2026-07-21T04:15:24 [2756436] #9  0x00007084c444527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      # 2026-07-21T04:15:24 [2756436] #10 0x00007084c44288ff in __GI_abort () at ./stdlib/abort.c:79
      # 2026-07-21T04:15:24 [2756436] #11 0x00007084c442881b in __assert_fail_base (fmt=0x7084c45d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x558c791b16a8 "from_deadlock || trx->lock.wait_thr", file=file@entry=0x558c791aad58 "/data/Server/13.0A/storage/innobase/lock/lock0lock.cc", line=line@entry=2479, function=function@entry=0x558c791b1600 "void lock_wait_end(trx_t*) [with bool from_deadlock = false]") at ./assert/assert.c:96
      # 2026-07-21T04:15:24 [2756436] #12 0x00007084c443b517 in __assert_fail (assertion=0x558c791b16a8 "from_deadlock || trx->lock.wait_thr", file=0x558c791aad58 "/data/Server/13.0A/storage/innobase/lock/lock0lock.cc", line=2479, function=0x558c791b1600 "void lock_wait_end(trx_t*) [with bool from_deadlock = false]") at ./assert/assert.c:105
      # 2026-07-21T04:15:24 [2756436] #13 0x0000558c78cc1e10 in lock_wait_end<false> (trx=trx@entry=0x7084c1c06800) at /data/Server/13.0A/storage/innobase/lock/lock0lock.cc:2479
      # 2026-07-21T04:15:24 [2756436] #14 0x0000558c78cbbac8 in lock_cancel_waiting_and_release<>(ib_lock_t *) (lock=0x7084c1c06a00) at /data/Server/13.0A/storage/innobase/lock/lock0lock.cc:6704
      # 2026-07-21T04:15:24 [2756436] #15 0x0000558c78cc7690 in lock_sys_t::cancel<false> (this=0x558c7a4ddec0 <lock_sys>, trx=trx@entry=0x7084c1c06800, lock=<optimized out>, lock@entry=0x7084c1c06a00) at /data/Server/13.0A/storage/innobase/lock/lock0lock.cc:6857
      # 2026-07-21T04:15:24 [2756436] #16 0x0000558c78c43443 in innobase_kill_query (thd=0x688398000d60) at /data/Server/13.0A/storage/innobase/handler/ha_innodb.cc:4989
      # 2026-07-21T04:15:24 [2756436] #17 0x0000558c789a25a0 in kill_handlerton (thd=0x688398000d60, plugin=<optimized out>, level=0x7084c01fdcdc) at /data/Server/13.0A/sql/handler.cc:986
      # 2026-07-21T04:15:24 [2756436] #18 0x0000558c786b921f in plugin_foreach_with_mask (thd=thd@entry=0x688398000d60, func=func@entry=0x558c789a253f <kill_handlerton(THD*, plugin_ref, void*)>, type=type@entry=1, state_mask=state_mask@entry=8, arg=arg@entry=0x7084c01fdcdc) at /data/Server/13.0A/sql/sql_plugin.cc:2570
      # 2026-07-21T04:15:24 [2756436] #19 0x0000558c789a5f54 in ha_kill_query (thd=thd@entry=0x688398000d60, level=<optimized out>) at /data/Server/13.0A/sql/handler.cc:993
      # 2026-07-21T04:15:24 [2756436] #20 0x0000558c78633c17 in THD::awake_no_mutex (this=this@entry=0x688398000d60, state_to_set=state_to_set@entry=KILL_QUERY, killed_errno_arg=killed_errno_arg@entry=0, killed_err_msg_arg=killed_err_msg_arg@entry=0x0) at /data/Server/13.0A/sql/sql_class.cc:2128
      # 2026-07-21T04:15:24 [2756436] #21 0x0000558c78697846 in kill_one_thread (thd=thd@entry=0x6883ac000d60, id=id@entry=422, kill_signal=kill_signal@entry=KILL_QUERY, type=type@entry=KILL_TYPE_ID, wsrep_high_priority=wsrep_high_priority@entry=@0x7084c01fdd7f: false) at /data/Server/13.0A/sql/sql_parse.cc:9197
      # 2026-07-21T04:15:24 [2756436] #22 0x0000558c78697958 in sql_kill (thd=thd@entry=0x6883ac000d60, id=422, state=state@entry=KILL_QUERY, type=type@entry=KILL_TYPE_ID) at /data/Server/13.0A/sql/sql_parse.cc:9323
      # 2026-07-21T04:15:24 [2756436] #23 0x0000558c7869dd0a in mysql_execute_command (thd=thd@entry=0x6883ac000d60, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/13.0A/sql/sql_parse.cc:5468
      # 2026-07-21T04:15:24 [2756436] #24 0x0000558c7869fb22 in mysql_parse (thd=thd@entry=0x6883ac000d60, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7084c01fe3c0) at /data/Server/13.0A/sql/sql_parse.cc:7945
      # 2026-07-21T04:15:24 [2756436] #25 0x0000558c786a1176 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x6883ac000d60, packet=packet@entry=0x6883ac13ec91 " KILL SOFT QUERY @kill_id /* E_R Thread3 QNO 1249 CON_ID 398 */ ", packet_length=packet_length@entry=64, blocking=blocking@entry=true) at /data/Server/13.0A/sql/sql_parse.cc:1903
      # 2026-07-21T04:15:24 [2756436] #26 0x0000558c786a2774 in do_command (thd=thd@entry=0x6883ac000d60, blocking=blocking@entry=true) at /data/Server/13.0A/sql/sql_parse.cc:1437
      # 2026-07-21T04:15:24 [2756436] #27 0x0000558c787fbe43 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558c7c94a090, put_in_cache=put_in_cache@entry=true) at /data/Server/13.0A/sql/sql_connect.cc:1510
      # 2026-07-21T04:15:24 [2756436] #28 0x0000558c787fc060 in handle_one_connection (arg=0x558c7c94a090) at /data/Server/13.0A/sql/sql_connect.cc:1422
      # 2026-07-21T04:15:24 [2756436] #29 0x00007084c449caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      # 2026-07-21T04:15:24 [2756436] #30 0x00007084c4529c6c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      RQG startup options used

      # $RQG_HOME/rqg.pl \
      # --gendata=conf/mariadb/innodb_ai.zz \
      # --gendata_sql=conf/mariadb/table_stress.sql \
      # --max_gd_duration=900 \
      # --grammar=conf/mariadb/innodb_ai.yy \
      # --redefine=conf/mariadb/redefine_ai_purge_mvcc.yy \
      # --reporters=CrashRecovery \
      # --mysqld=--loose-innodb_lock_schedule_algorithm=fcfs \
      # --mysqld=--loose-idle_write_transaction_timeout=0 \
      # --mysqld=--loose-idle_transaction_timeout=0 \
      # --mysqld=--loose-idle_readonly_transaction_timeout=0 \
      # --mysqld=--connect_timeout=60 \
      # --mysqld=--interactive_timeout=28800 \
      # --mysqld=--slave_net_timeout=60 \
      # --mysqld=--net_read_timeout=30 \
      # --mysqld=--net_write_timeout=60 \
      # --mysqld=--loose-table_lock_wait_timeout=50 \
      # --mysqld=--wait_timeout=28800 \
      # --no_mask \
      # --queries=10000000 \
      # --seed=random \
      # --reporters=None \
      # --reporters=ErrorLog \
      # --reporters=Deadlock \
      # --validators=None \
      # --mysqld=--log_output=none \
      # --mysqld=--log_bin_trust_function_creators=1 \
      # --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      # --engine=InnoDB \
      # --restart_timeout=240 \
      # --mysqld=--plugin-load-add=file_key_management.so \
      # --mysqld=--loose-file-key-management-filename=$RQG_HOME/conf/mariadb/encryption_keys.txt \
      # --mysqld=--plugin-load-add=provider_lzo.so \
      # --mysqld=--plugin-load-add=provider_bzip2.so \
      # --mysqld=--plugin-load-add=provider_lzma.so \
      # --mysqld=--plugin-load-add=provider_snappy.so \
      # --mysqld=--plugin-load-add=provider_lz4.so \
      # --mysqld=--loose-innodb_compression_level=1 \
      # --duration=300 \
      # --mysqld=--loose-innodb_fatal_semaphore_wait_threshold=300 \
      # --mysqld=--loose-innodb_data_file_path=ibdata1:1M:autoextend:autoshrink \
      # --mysqld=--lock-wait-timeout=86400 \
      # --mysqld=--innodb-lock-wait-timeout=50 \
      # --mysqld=--loose-innodb_fast_shutdown=1 \
      # --mysqld=--sql_mode=traditional \
      # --mysqld=--innodb_file_per_table=1 \
      # --mysqld=--loose-innodb_read_only_compressed=OFF \
      # --mysqld=--loose-innodb-sync-debug \
      # --mysqld=--innodb_stats_persistent=on \
      # --mysqld=--innodb_adaptive_hash_index=off \
      # --mysqld=--innodb_random_read_ahead=OFF \
      # --mysqld=--log-bin \
      # --mysqld=--sync-binlog=1 \
      # --mysqld=--loose-innodb_evict_tables_on_commit_debug=on \
      # --mysqld=--loose-max-statement-time=30 \
      # --threads=9 \
      # --rr= \
      # --mysqld=--innodb_use_native_aio=1 \
      # --mysqld=--innodb_undo_log_truncate=OFF \
      # --mysqld=--innodb_undo_tablespaces=0 \
      # --mysqld=--innodb_rollback_on_timeout=OFF \
      # --mysqld=--innodb_page_size=8K \
      # --mysqld=--innodb-buffer-pool-size=256M \
      # --vardir_type=fast \
      # --no_mask \
      # --batch \
      # --basedir1=/Server_bin/13.0A_debug_Og \
      # --basedir2=/Server_bin/13.0A_debug_Og \
      # --script_debug=_nix_ \
      # --major_runid=1784625362 \
      # --minor_runid=39
      #--------
      # vardir ->/dev/shm/rqg/1784625362/39<- fs_type=tmpfs
      

      Core dump is present on sdp:-
      /data/results/1784625362/TBR-2460

      Attachments

        Activity

          People

            saahil Saahil Alam
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.25d
                0.25d

                Git Integration

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