Segfault in find_wsrep_new_cluster() when loading plugin.

Bug #1238331 reported by Alex Yurchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Released
High
Alex Yurchenko
5.6
Fix Released
High
Alex Yurchenko
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

It appears that some options in the argv list passed to find_wsrep_new_cluster() can be NULL. This is because:
1. find_wsrep_new_cluster() clears up all occurrences of --wsrep-new-cluster from the argv vector padding it with NULLs and reducing option count.
2. mysql_install_plugin() restores option count to orig_argc before calling my_load_defaults()

So we end up with modified argv vector but original argc count.

Related branches

description: updated
Revision history for this message
Alex Yurchenko (ayurchen) wrote :

The solution seems to be: move find_wsrep_new_cluster() out of my_load_defaults() and into main(), before setting orig_argc, since --wsrep-new-cluster is an option that should be seen only by mysqld and only once..

Revision history for this message
Alex Yurchenko (ayurchen) wrote :
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-1470

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.