[MDEV-18894] Galera: 10.4 nodes are crashed with Segfault while using Transaction-Precise History system versioned table Created: 2019-03-12  Updated: 2022-02-07  Resolved: 2021-12-27

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Shahriyar Rzayev (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: galera
Environment:

Ubuntu 18.04


Attachments: File MDEV-18894.cnf     File MDEV-18894.test     File mysql-node2.err    
Issue Links:
Relates
relates to MDEV-27761 Galera node crash on rpl_sql_thread_i... Closed
relates to MDEV-22232 Server crashes in rpl_sql_thread_info... Closed

 Description   

Scenarios follows as:

CREATE TABLE t(
   x INT,
   start_trxid BIGINT UNSIGNED GENERATED ALWAYS AS ROW START,
   end_trxid BIGINT UNSIGNED GENERATED ALWAYS AS ROW END,
   PERIOD FOR SYSTEM_TIME(start_trxid, end_trxid)
) WITH SYSTEM VERSIONING;
 
insert into t(x) values(200);
insert into t(x) values(201);
insert into t(x) values(202);

Lose all nodes with

[ERROR] mysqld got signal 11

sql/rpl_rli.cc:2473(rpl_sql_thread_info::cached_charset_compare(char*) const)[0x563499019fc2]
sql/log_event.cc:5531(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int))[0x563499339ba4]
sql/log_event.cc:5374(Query_log_event::do_apply_event(rpl_group_info*))[0x563499339509]
sql/log_event.h:1482(Log_event::apply_event(rpl_group_info*))[0x563498dc5a91]
sql/wsrep_applier.cc:206(wsrep_apply_events(THD*, Relay_log_info*, void const*, unsigned long))[0x563499115cf5]
sql/wsrep_high_priority_service.cc:481(Wsrep_applier_service::apply_write_set(wsrep::ws_meta const&, wsrep::const_buffer const&))[0x5634990f5d94]
src/server_state.cpp:74(apply_fragment(wsrep::high_priority_service&, wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x5634
99a4dea7]
src/server_state.cpp:234(apply_write_set(wsrep::server_state&, wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x563499a4e87
0]
src/server_state.cpp:989(wsrep::server_state::on_apply(wsrep::high_priority_service&, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x563499a51f84]
wsrep/high_priority_service.hpp:47(wsrep::high_priority_service::apply(wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&))[0x563499a68145]
src/wsrep_provider_v26.cpp:489((anonymous namespace)::apply_cb(void*, wsrep_ws_handle const*, unsigned int, wsrep_buf const*, wsrep_trx_meta const*, bool*))[0x563499a6583e]
/home/shako/Galera_Tests/Galera-4.x/libgalera_smm.so(_ZN6galera14TrxHandleSlave5applyEPvPF15wsrep_cb_statusS1_PK15wsrep_ws_handlejPK9wsrep_bufPK14wsrep_trx_metaPbERSA_Rb+0x140)[0x7f044f4244f2]
src/trx_handle.cpp:414(galera::TrxHandleSlave::apply(void*, wsrep_cb_status (*)(void*, wsrep_ws_handle const*, unsigned int, wsrep_buf const*, wsrep_trx_meta const*, bool*), wsrep_trx_meta const&, bool&))[0x7f044f458285]
src/replicator_smm.cpp:489(galera::ReplicatorSMM::apply_trx(void*, galera::TrxHandleSlave&))[0x7f044f45c54e]
src/replicator_smm.cpp:2120(galera::ReplicatorSMM::process_trx(void*, boost::shared_ptr<galera::TrxHandleSlave> const&))[0x7f044f43ec54]
src/gcs_action_source.cpp:63(galera::GcsActionSource::process_writeset(void*, gcs_action const&, bool&))[0x7f044f43ede5]
src/gcs_action_source.cpp:154(galera::GcsActionSource::dispatch(void*, gcs_action const&, bool&))[0x7f044f43f1b9]
src/gcs_action_source.cpp:182(galera::GcsActionSource::process(void*, bool&))[0x7f044f455780]
src/replicator_smm.cpp:383(galera::ReplicatorSMM::async_recv(void*))[0x7f044f47170a]
/home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(_ZN5wsrep18wsrep_provider_v2611run_applierEPNS_21high_priority_serviceE+0x30)[0x563499a66530]
src/wsrep_provider_v26.cpp:690(wsrep::wsrep_provider_v26::run_applier(wsrep::high_priority_service*))[0x563499116969]
sql/wsrep_thd.cc:61(wsrep_replication_process(THD*, void*))[0x563499107eda]
nptl/pthread_create.c:463(start_thread)[0x7f04516da6db]
x86_64/clone.S:97(clone)[0x7f04508c088f]



 Comments   
Comment by Shahriyar Rzayev (Inactive) [ 2019-03-12 ]

Added basic MTR test as well.

Comment by Shahriyar Rzayev (Inactive) [ 2019-05-29 ]

Interesting thing is if you use Bitemporal Tables - i.e application time and system version there is no crash spotted:

CREATE TABLE `t` (
  `x` int(11) DEFAULT NULL,
  `start_trxid` bigint(20) unsigned GENERATED ALWAYS AS ROW START,
  `end_trxid` bigint(20) unsigned GENERATED ALWAYS AS ROW END,
  `date_1` date NOT NULL,
  `date_2` date NOT NULL,
  PERIOD FOR SYSTEM_TIME (`start_trxid`, `end_trxid`),
  PERIOD FOR `application_time` (`date_1`, `date_2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
1 row in set (0.002 sec)
 
MariaDB [test]> INSERT INTO test.t3 (x, date_1, date_2) VALUES (201, '1999-01-01', '2018-12-12');
Query OK, 1 row affected (0.022 sec)
 
MariaDB [test]> INSERT INTO test.t3 (x, date_1, date_2) VALUES (201, '1999-01-01', '2018-12-12');
Query OK, 1 row affected (0.010 sec)

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