mysql_install_db Error in my_thread_global_end(): 1 threads didn't exit

Bug #1402074 reported by Giuseppe Maxia on 2014-12-12
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MySQL Sandbox
Confirmed
Critical
Unassigned
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
Undecided
Unassigned
5.5
Fix Released
High
Sergei Glushchenko
5.6
Invalid
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Committed
High
Unassigned

Bug Description

I have tried installing from a .tar.gz using Percona Server 5.5.36 and later. The installation using mysql_install_db always fails with the following message

$HOME/downloads/5.5.36/scripts/mysql_install_db --no-defaults --user=$USER --basedir=$HOME/downloads/5.5.36 --datadir=$HOME/sandboxes/msb_5_5_36/data
error while creating grant tables
Installing MySQL system tables...
Error in my_thread_global_end(): 1 threads didn't exit
OK
Filling help tables...
Error in my_thread_global_end(): 1 threads didn't exit
OK

Notice that:
1) versions prior to 5.5.36 install just fine
2) all versions after 5.5.36 fail with the same error
3) Version 5.6 is not affected

This may be related to Bug+1190774

@Giuseppe,

Moving this to PS component as per the title.

affects: percona-xtradb-cluster → percona-server
Giuseppe Maxia (giuseppe-maxia) wrote :

Note: the issue is independent from the operating system. Compiling the source on OSX ( using CMake defaults) results in the same problem.

mysql_install_db still completed successfully and database installed. Lets keep this report to investigate and fix the reason for this message:

Error in my_thread_global_end(): 1 threads didn't exit

I see this error message in Percona Server 5.5, but not in Percona Server 5.6. However I see it in Percona Xtradb Cluster:

http://jenkins.percona.com/view/PXB%202.2/job/percona-xtrabackup-2.2-param/BUILD_TYPE=release,Host=centos5-64,xtrabackuptarget=galera56/267/testReport/junit/(root)/t_xb_galera_sst/sh/

summary: - installation with tar.gz fails with PS-5.5.36+
+ mysql_install_db Error in my_thread_global_end(): 1 threads didn't exit
Changed in percona-server:
status: New → Confirmed
Changed in percona-xtradb-cluster:
status: New → Confirmed
Giuseppe Maxia (giuseppe-maxia) wrote :

Please notice:
* The corresponding packages MySQL 5.5.40 and MariaDB 5.5.40 both install without problem.
* Even if the installation completes, the error message makes the operation fail, and thus this bug affects anyone using scripts to install from a tarball
* Specifically, this bugs blocks MySQL Sandbox from operating correctly with Percona Server 5.5.

Changed in mysql-sandbox:
status: New → Confirmed
importance: Undecided → Critical
Jervin R (revin) wrote :

A workaround is to start the sandbox and execute load_grants for now. This is a showstopper for automated tests.

tags: added: i51967

Yet another regression introduced by backporting for bug 1319904.
This patch fixes the issue.

diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6729bfc..c89fc6d 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4857,6 +4857,11 @@ int mysqld_main(int argc, char **argv)
   if (opt_bootstrap)
   {
     select_thread_in_use= 0; // Allow 'kill' to work
+ /* Signal threads waiting for server to be started */
+ mysql_mutex_lock(&LOCK_server_started);
+ mysqld_server_started= 1;
+ mysql_cond_broadcast(&COND_server_started);
+ mysql_mutex_unlock(&LOCK_server_started);
     bootstrap(mysql_stdin);
     unireg_abort(bootstrap_error ? 1 : 0);
   }

Changed in percona-xtradb-cluster:
status: Confirmed → Fix Committed
importance: Undecided → High

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

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

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

Duplicates of this bug

Other bug subscribers