debug=1 is broken in galera2/3

Bug #1285208 reported by Raghavendra D Prabhu on 2014-02-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
High
Alex Yurchenko
Percona XtraDB Cluster
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
Undecided
Unassigned

Bug Description

Starting mysqld with --wsrep-provider-options='debug=1' fails with

2014-02-26 20:38:37 55728 [ERROR] WSREP: Unrecognized parameter 'debug'

It is a possible regression from fix of lp:1260193

summary: - debug=1 is broken in galera3
+ debug=1 is broken in galera2/3

(gdb) bt
#0 gu::Config::parse (params_vector=..., param_list=...) at galerautils/src/gu_config.cpp:27
#1 0x00007fffd7faf57b in gu::Config::parse (this=this@entry=0x1679220, param_list=...) at galerautils/src/gu_config.cpp:77
#2 0x00007fffd80b7299 in galera::ReplicatorSMM::ParseOptions::ParseOptions (this=<optimized out>, conf=..., opts=<optimized out>) at galera/src/replicator_smm_params.cpp:98
#3 0x00007fffd80dc5b7 in galera::ReplicatorSMM::ReplicatorSMM (this=0x1679210, args=0x7fffffffbe00) at galera/src/replicator_smm.cpp:196
#4 0x00007fffd80e8429 in galera_init (gh=0x164db80, args=0x7fffffffbe00) at galera/src/wsrep_provider.cpp:32
#5 0x00000000006393ac in wsrep_init () at /media/Tintin/Work/code/percona-xtradb-cluster/pxc56/Percona-Server/sql/wsrep_mysqld.cc:634
#6 0x0000000000639fb0 in wsrep_init_startup (first=first@entry=true) at /media/Tintin/Work/code/percona-xtradb-cluster/pxc56/Percona-Server/sql/wsrep_mysqld.cc:651
#7 0x000000000062fdaf in init_server_components () at /media/Tintin/Work/code/percona-xtradb-cluster/pxc56/Percona-Server/sql/mysqld.cc:4999
#8 0x0000000000632331 in mysqld_main (argc=33, argv=0x156fe28) at /media/Tintin/Work/code/percona-xtradb-cluster/pxc56/Percona-Server/sql/mysqld.cc:6224
#9 0x00007ffff5f4ab05 in __libc_start_main () from /usr/lib/libc.so.6
#10 0x0000000000622a50 in _start ()

is where it fails to parse it.

Tested with:

=== modified file 'galerautils/src/gu_config.cpp'
--- galerautils/src/gu_config.cpp 2014-02-06 19:27:50 +0000
+++ galerautils/src/gu_config.cpp 2014-02-26 19:17:06 +0000
@@ -89,6 +89,8 @@
         }
         catch (NotFound& e)
         {
+ if (key == "debug")
+ continue;
             log_error << "Unrecognized parameter '" << key << '\'';
             /* Throw later so that all invalid parameters get logged.*/
             not_found = true;

This is since the debug parameter is already handled in latter wsrep_set_params:

From galera_init:

        gh->ctx = new REPL_CLASS (args);
        wsrep_set_params(*reinterpret_cast<REPL_CLASS*>(gh->ctx),
                         args->options);

=== modified file 'galera/src/replicator_smm_params.cpp'
--- galera/src/replicator_smm_params.cpp 2014-02-06 19:27:50 +0000
+++ galera/src/replicator_smm_params.cpp 2014-02-26 19:36:11 +0000
@@ -29,6 +29,7 @@
     map_.insert(Default(Param::base_port, BASE_PORT_DEFAULT));
     map_.insert(Default(Param::proto_max, gu::to_string(MAX_PROTO_VER)));
     map_.insert(Default(Param::key_format, "FLAT8"));
+ map_.insert(Default("debug", "0"));
 }

 const galera::ReplicatorSMM::Defaults galera::ReplicatorSMM::defaults;

works fine (with earlier fix it didn't show up in wsrep_provider_options variable in show variables).

Alex Yurchenko (ayurchen) wrote :
Changed in galera:
assignee: nobody → Alex Yurchenko (ayurchen)
importance: Undecided → High
status: New → Fix Committed
Changed in galera:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers