[MDEV-22617] Galera node crashes when trying to log to slow_log table in streaming replication mode Created: 2020-05-18  Updated: 2021-12-23  Resolved: 2020-05-19

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4.13
Fix Version/s: 10.5.4

Type: Bug Priority: Critical
Reporter: Hartmut Holzgraefe Assignee: Michael Widenius
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-22616 CHECK TABLE fails with wsrep_trx_frag... Closed

 Description   

When having the following configuration enabled

wsrep_trx_fragment_unit='bytes'
wsrep_trx_fragment_size=10240000
 
slow_query_log
log_output=TABLE

any slow query, e.g. SELECT SLEEP(10);, will crash the executing node with the following backtrace:

mysqld: /__w/1/s/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_ON_ES_BACKUP_DEBUGSOURCE/wsrep-lib/include/wsrep/client_state.hpp:367: int wsrep::client_state::after_row(): Assertion `state_ == s_exec' failed.
200518 15:09:08 [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.4.12-6-MariaDB-enterprise-log
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=3
max_threads=102
thread_count=12
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760260 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f4f40016358
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 = 0x7f4f44a31d98 thread_stack 0x49000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x559e2a3b008e]
/usr/sbin/mysqld(handle_fatal_signal+0x515)[0x559e29e15f55]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f4f6bb7b890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f4f6a4afe97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f4f6a4b1801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f4f6a4a139a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f4f6a4a1412]
/usr/sbin/mysqld(+0x87ffcf)[0x559e29e17fcf]
/usr/sbin/mysqld(handler::ha_write_row(unsigned char const*)+0x256)[0x559e29e21966]
/usr/sbin/mysqld(Log_to_csv_event_handler::log_slow(THD*, my_hrtime_t, char const*, unsigned long, unsigned long long, unsigned long long, bool, char const*, unsigned long)+0x6de)[0x559e29ef4bae]
/usr/sbin/mysqld(LOGGER::slow_log_print(THD*, char const*, unsigned long, unsigned long long)+0x239)[0x559e29eef9d9]
/usr/sbin/mysqld(log_slow_statement(THD*)+0x134)[0x559e29bf5724]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool)+0x699)[0x559e29c05ff9]
/usr/sbin/mysqld(do_command(THD*)+0x150)[0x559e29c08650]
/usr/sbin/mysqld(do_handle_one_connection(CONNECT*)+0x203)[0x559e29ce70b3]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x559e29ce71cd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f4f6bb706db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f4f6a59288f]



 Comments   
Comment by Michael Widenius [ 2020-05-19 ]

Fixed in my 10.5 tree by ignoring any not innodb tables when counting rows
Will be pushed soon.

Comment by Chris Calender (Inactive) [ 2020-07-02 ]

monty Can this be backported to 10.4, please?

Comment by Michael Widenius [ 2021-12-21 ]

Yes, it should be possible to backport by any developer (trivial patch)
Would be best if Jan did this, as it 's a galera issue. If he has any problems with doing that I can do it

Generated at Thu Feb 08 09:16:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.