wsrep_dump_rbr_buf in wsrep_apply_cb should be avoided for (ignored) TOI errors

Bug #1280828 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
New
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
New
Undecided
Unassigned

Bug Description

Testing with fk grammar

perl runall-new.pl --basedir=/pxc56 --vardir=/tmp/node1 --galera=ms --grammar=conf/galera/galera_stress-fk.yy --gendata=conf/galera/galera_stress-56.zz --mysqld=--innodb_buffer_pool_size=500M --mysqld=--query_cache_type=0 --mysqld=--wsrep_slave_threads=8 --mysqld=--query_cache_size=0 --mysqld=--innodb_flush_log_at_trx_commit=0 --reporter=Shutdown,Backtrace,ErrorLog,ErrorLogAlarm,Deadlock --threads=16 --queries=30000 --mysqld=--wsrep-provider=/pxc56/lib/libgalera_smm.so --seed=time --mysqld=--innodb_flush_method=O_DIRECT

overwhelmed the filesystem with hundreds of GRA files containing DDLs.

They were on applier end and from ignored TOI errors.

wsrep_apply_cb:

  if (WSREP_CB_SUCCESS != rcode)
  {
    wsrep_dump_rbr_buf(thd, buf, buf_len);
  }

It would be best to not dump in case of ignored errors or use wsrep-debug with them. (or both)

summary: - wsrep_dump_rbr_buf in wsrep_apply_cb should be ignored for TOI errors
+ wsrep_dump_rbr_buf in wsrep_apply_cb should be avoided for (ignored)
+ TOI errors
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

This is severe for TOI errors since they are passed first without evaluation on the master node and then error is returned.

This makes it easy to DOS other nodes by creating spurious DDLs on one
node and filling the filesystem on other nodes with GRA* files. Note,
that even a user without DDL credentials can do this.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Actually, credentials checking is done before, so that shouldn't be a problem here. (test database is an exception).

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1622

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.