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

Random crashes: Assertion failure in lock0lock.cc line 8150

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.2.6
    • N/A

    Description

      I am randomly running to crashes on a pair of master/master maria 10.2.6 instances. Below is the output of the crash in the log. I do not seem to be getting cores for these crashes but the backtrace is in the log output. also note the query on each crash is the same type of data into the same table each time. I am at a loss, and not sure how to proceed, so any suggestions would be appreciated.

      log output of crash.

      2017-11-30 19:59:56 0x7f1c940c7700  InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.2.6/storage/innobase/lock/lock0lock.cc line 8150
      InnoDB: Failing assertion: lock != m_wait_lock || (innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS && !thd_is_replication_slave_thread(lock->trx->mysql_thd))
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
      InnoDB: about forcing recovery.
      171130 19:59:56 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.2.6-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=1048576
      max_used_connections=61
      max_threads=4098
      thread_count=70
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 8610069 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f0750001288
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f1c940c61e0 thread_stack 0x40000
      (my_addr_resolve failure: fork)
      /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x7f1c9af8ea6b]
      /usr/sbin/mysqld(handle_fatal_signal+0x4d5) [0x7f1c9aa260e5]
      /lib64/libpthread.so.0(+0xf7e0) [0x7f1c99f537e0]
      /lib64/libc.so.6(gsignal+0x35) [0x7f1c985ae5e5]
      /lib64/libc.so.6(abort+0x175) [0x7f1c985afdc5]
      /usr/sbin/mysqld(+0x4779d7) [0x7f1c9a7fa9d7]
      /usr/sbin/mysqld(+0x84c31a) [0x7f1c9abcf31a]
      /usr/sbin/mysqld(+0x84fe6d) [0x7f1c9abd2e6d]
      /usr/sbin/mysqld(+0x8513d8) [0x7f1c9abd43d8]
      /usr/sbin/mysqld(+0x851627) [0x7f1c9abd4627]
      /usr/sbin/mysqld(+0x852679) [0x7f1c9abd5679]
      /usr/sbin/mysqld(+0x855855) [0x7f1c9abd8855]
      /usr/sbin/mysqld(+0x8561c0) [0x7f1c9abd91c0]
      /usr/sbin/mysqld(+0x8cf13b) [0x7f1c9ac5213b]
      /usr/sbin/mysqld(+0x8d4eea) [0x7f1c9ac57eea]
      /usr/sbin/mysqld(+0x8d533a) [0x7f1c9ac5833a]
      /usr/sbin/mysqld(+0x8e6604) [0x7f1c9ac69604]
      /usr/sbin/mysqld(+0x81895b) [0x7f1c9ab9b95b]
      /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x16f) [0x7f1c9aa2f7af]
      /usr/sbin/mysqld(write_record(THD*, TABLE*, st_copy_info*)+0x71) [0x7f1c9a890661]
      /usr/sbin/mysqld(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool)+0x1119) [0x7f1c9a8965f9]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x289d) [0x7f1c9a8aaa7d]
      /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool)+0x29a) [0x7f1c9a8b058a]
      /usr/sbin/mysqld(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int)+0x88c) [0x7f1c9aaf629c]
      /usr/sbin/mysqld(Log_event::apply_event(rpl_group_info*)+0x43) [0x7f1c9a842283]
      /usr/sbin/mysqld(+0x4b24d3) [0x7f1c9a8354d3]
      /usr/sbin/mysqld(handle_slave_sql+0x1625) [0x7f1c9a83ad75]
      /lib64/libpthread.so.0(+0x7aa1) [0x7f1c99f4baa1]
      /lib64/libc.so.6(clone+0x6d) [0x7f1c98664aad]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f075013e4e9): INSERT INTO radacted ( address, filename, redacted ) VALUES ( 'redacted', 'redacted', '1' )
       
      Connection ID (thread ID): 11
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      171130 20:00:03 mysqld_safe Number of processes running now: 0
      
      

      Attachments

        Issue Links

          Activity

            treyormsbee Trey Ormsbee added a comment -

            I have not been able to schedule the upgrade as of yet. I hope to get permission to do it this week or next. If I can I will stall until the release of 10.2.12. Thank you!

            treyormsbee Trey Ormsbee added a comment - I have not been able to schedule the upgrade as of yet. I hope to get permission to do it this week or next. If I can I will stall until the release of 10.2.12. Thank you!
            treyormsbee Trey Ormsbee added a comment - - edited

            I have now upgraded to 10.2.12 as of today. Ill report back if the crash happens again. It generally happens multiple times per day so I should know in 24-48 hours if all is good or not.

            Thanks,
            Trey

            treyormsbee Trey Ormsbee added a comment - - edited I have now upgraded to 10.2.12 as of today. Ill report back if the crash happens again. It generally happens multiple times per day so I should know in 24-48 hours if all is good or not. Thanks, Trey
            treyormsbee Trey Ormsbee added a comment - - edited

            EDIT-----It has been 6 almost 7 days now and I have not had a single crash since the update. I think this can be closed now. If it happens to creep back in ill open a new ticket and reference this one.

            Thanks,
            Trey-----EDIT

            I spoke too soon, the log scraper I had looking for this was not catching the crash any more.

            2018-02-04 03:15:01 0x7f3fc4220700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.12/storage/innobase/lock/lock0lock.cc line 8204
            InnoDB: Failing assertion: lock != m_wait_lock || (innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS && !thd_is_replication_slave_thread(lock->trx->mysql_thd))
            InnoDB: We intentionally generate a memory trap.
            InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
            InnoDB: If you get repeated assertion failures or crashes, even
            InnoDB: immediately after the mysqld startup, there may be
            InnoDB: corruption in the InnoDB tablespace. Please refer to
            InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
            InnoDB: about forcing recovery.
            180204 3:15:01 [ERROR] mysqld got signal 6 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.2.12-MariaDB-log
            key_buffer_size=134217728
            read_buffer_size=1048576
            max_used_connections=32
            max_threads=4098
            thread_count=41
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 8611221 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f3354001288
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f3fc421f1e0 thread_stack 0x40000
            (my_addr_resolve failure: fork)
            /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x7f3fcae4ea2b]
            /usr/sbin/mysqld(handle_fatal_signal+0x535) [0x7f3fca91b915]
            /lib64/libpthread.so.0(+0xf7e0) [0x7f3fc9e427e0]
            /lib64/libc.so.6(gsignal+0x35) [0x7f3fc849d5e5]
            /lib64/libc.so.6(abort+0x175) [0x7f3fc849edc5]
            /usr/sbin/mysqld(+0x479193) [0x7f3fca6eb193]
            /usr/sbin/mysqld(+0x88f4ea) [0x7f3fcab014ea]
            /usr/sbin/mysqld(+0x897f2d) [0x7f3fcab09f2d]
            /usr/sbin/mysqld(+0x898471) [0x7f3fcab0a471]
            /usr/sbin/mysqld(+0x898757) [0x7f3fcab0a757]
            /usr/sbin/mysqld(+0x8988a6) [0x7f3fcab0a8a6]
            /usr/sbin/mysqld(+0x898f15) [0x7f3fcab0af15]
            /usr/sbin/mysqld(+0x8998e0) [0x7f3fcab0b8e0]
            /usr/sbin/mysqld(+0x904a59) [0x7f3fcab76a59]
            /usr/sbin/mysqld(+0x909aad) [0x7f3fcab7baad]
            /usr/sbin/mysqld(+0x909efa) [0x7f3fcab7befa]
            /usr/sbin/mysqld(+0x918df6) [0x7f3fcab8adf6]
            /usr/sbin/mysqld(+0x85a89f) [0x7f3fcaacc89f]
            /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x177) [0x7f3fca9252c7]
            /usr/sbin/mysqld(write_record(THD*, TABLE*, st_copy_info*)+0x71) [0x7f3fca7822b1]
            /usr/sbin/mysqld(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool)+0x117c) [0x7f3fca7884dc]
            /usr/sbin/mysqld(mysql_execute_command(THD*)+0x2e42) [0x7f3fca79ca62]
            /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool)+0x29a) [0x7f3fca7a217a]
            /usr/sbin/mysqld(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int)+0x884) [0x7f3fca9f0ec4]
            /usr/sbin/mysqld(Log_event::apply_event(rpl_group_info*)+0x43) [0x7f3fca733a03]
            /usr/sbin/mysqld(+0x4b4cc3) [0x7f3fca726cc3]
            /usr/sbin/mysqld(handle_slave_sql+0x1810) [0x7f3fca72c780]
            /lib64/libpthread.so.0(+0x7aa1) [0x7f3fc9e3aaa1]
            /lib64/libc.so.6(clone+0x6d) [0x7f3fc8553aad]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f3354143532): INSERT INTO redacted_tbl ( redacted_clm1, redacted_clm2, redacted_clm3 ) VALUES ( 'redacted', 'redacted', '1' )

            Connection ID (thread ID): 11
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on

            The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
            information that should help you find out what is causing the crash.

            treyormsbee Trey Ormsbee added a comment - - edited EDIT-----It has been 6 almost 7 days now and I have not had a single crash since the update. I think this can be closed now. If it happens to creep back in ill open a new ticket and reference this one. Thanks, Trey-----EDIT I spoke too soon, the log scraper I had looking for this was not catching the crash any more. 2018-02-04 03:15:01 0x7f3fc4220700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.12/storage/innobase/lock/lock0lock.cc line 8204 InnoDB: Failing assertion: lock != m_wait_lock || (innodb_lock_schedule_algorithm == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS && !thd_is_replication_slave_thread(lock->trx->mysql_thd)) InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to https://jira.mariadb.org/ InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 180204 3:15:01 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.2.12-MariaDB-log key_buffer_size=134217728 read_buffer_size=1048576 max_used_connections=32 max_threads=4098 thread_count=41 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 8611221 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x7f3354001288 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x7f3fc421f1e0 thread_stack 0x40000 (my_addr_resolve failure: fork) /usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x7f3fcae4ea2b] /usr/sbin/mysqld(handle_fatal_signal+0x535) [0x7f3fca91b915] /lib64/libpthread.so.0(+0xf7e0) [0x7f3fc9e427e0] /lib64/libc.so.6(gsignal+0x35) [0x7f3fc849d5e5] /lib64/libc.so.6(abort+0x175) [0x7f3fc849edc5] /usr/sbin/mysqld(+0x479193) [0x7f3fca6eb193] /usr/sbin/mysqld(+0x88f4ea) [0x7f3fcab014ea] /usr/sbin/mysqld(+0x897f2d) [0x7f3fcab09f2d] /usr/sbin/mysqld(+0x898471) [0x7f3fcab0a471] /usr/sbin/mysqld(+0x898757) [0x7f3fcab0a757] /usr/sbin/mysqld(+0x8988a6) [0x7f3fcab0a8a6] /usr/sbin/mysqld(+0x898f15) [0x7f3fcab0af15] /usr/sbin/mysqld(+0x8998e0) [0x7f3fcab0b8e0] /usr/sbin/mysqld(+0x904a59) [0x7f3fcab76a59] /usr/sbin/mysqld(+0x909aad) [0x7f3fcab7baad] /usr/sbin/mysqld(+0x909efa) [0x7f3fcab7befa] /usr/sbin/mysqld(+0x918df6) [0x7f3fcab8adf6] /usr/sbin/mysqld(+0x85a89f) [0x7f3fcaacc89f] /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x177) [0x7f3fca9252c7] /usr/sbin/mysqld(write_record(THD*, TABLE*, st_copy_info*)+0x71) [0x7f3fca7822b1] /usr/sbin/mysqld(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool)+0x117c) [0x7f3fca7884dc] /usr/sbin/mysqld(mysql_execute_command(THD*)+0x2e42) [0x7f3fca79ca62] /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool)+0x29a) [0x7f3fca7a217a] /usr/sbin/mysqld(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int)+0x884) [0x7f3fca9f0ec4] /usr/sbin/mysqld(Log_event::apply_event(rpl_group_info*)+0x43) [0x7f3fca733a03] /usr/sbin/mysqld(+0x4b4cc3) [0x7f3fca726cc3] /usr/sbin/mysqld(handle_slave_sql+0x1810) [0x7f3fca72c780] /lib64/libpthread.so.0(+0x7aa1) [0x7f3fc9e3aaa1] /lib64/libc.so.6(clone+0x6d) [0x7f3fc8553aad] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7f3354143532): INSERT INTO redacted_tbl ( redacted_clm1, redacted_clm2, redacted_clm3 ) VALUES ( 'redacted', 'redacted', '1' ) Connection ID (thread ID): 11 Status: NOT_KILLED Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
            treyormsbee Trey Ormsbee added a comment -

            Anyone able to comment on this?

            treyormsbee Trey Ormsbee added a comment - Anyone able to comment on this?

            treyormsbee, so, you repeated the same issue with 10.2.12. Have you tried a newer release, such as 10.2.21? The locking should have changed a little by the following:

            • 10.2.17, 10.3.9: MDEV-16664 reverted the default setting to innodb_lock_schedule_algorithm=fcfs because of apparent problems
            • 10.2.19, 10.3.11: MDEV-17073 INSERT…ON DUPLICATE KEY UPDATE became more deadlock-prone

            MDEV-17073 should not have any direct impact on this assertion failure, but MDEV-16664 could.

            marko Marko Mäkelä added a comment - treyormsbee , so, you repeated the same issue with 10.2.12. Have you tried a newer release, such as 10.2.21? The locking should have changed a little by the following: 10.2.17, 10.3.9: MDEV-16664 reverted the default setting to innodb_lock_schedule_algorithm=fcfs because of apparent problems 10.2.19, 10.3.11: MDEV-17073 INSERT…ON DUPLICATE KEY UPDATE became more deadlock-prone MDEV-17073 should not have any direct impact on this assertion failure, but MDEV-16664 could.

            People

              Unassigned Unassigned
              treyormsbee Trey Ormsbee
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.