Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-4711: crash on TokuDB PFS-instrumented mutexes deinitialization #2479

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

vlad-lesin
Copy link
Contributor

@vlad-lesin vlad-lesin commented Aug 9, 2018

If we look at mysqld_exit(), we will see that shutdown_performance_schema()
is always invoked before exit(), what means global mutexes like tokudb_map_mutex
are always destroyed after perfomance schema shutdown, what causes SIGFAULT
on some platforms(debian wheeze in particular).

There are two cases:

  1. global mutexes in TokuDB storage engine

The fix is in deinitialization of global mutexes explicitly from storage engine
shutdown function, which is always invoked before PFS shutdown.

  1. global mutexes in PerconaFT

There also must be separate patch for PerconaFT to fix it. The fix is in
invoking ydb-layer deinitialization function explicitly from storage engine
shutdown function.

Testing:
https://jenkins.percona.com/view/5.7/job/mysql-5.7-param/1891/

See also: percona/PerconaFT#414

Copy link
Contributor

@george-lorch george-lorch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Up to you to change the test as noted or not.

--echo # Stop DB server which was created by MTR default
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not --source include/shutdown_mysqld.inc and --source include/start_mysqld.inc ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--source include/restart_mysqld.inc must be used here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--echo # Stop DB server which was created by MTR default
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--source include/restart_mysqld.inc must be used here

If we look at mysqld_exit(), we will see that shutdown_performance_schema()
is always invoked before exit(), what means global mutexes like tokudb_map_mutex
are always destroyed after perfomance schema shutdown, what causes SIGFAULT
on some platforms(debian wheeze in particular).

There are two cases:

1) global mutexes in TokuDB storage engine

The fix is in deinitialization of global mutexes explicitly from storage engine
shutdown function, which is always invoked before PFS shutdown.

2) global mutexes in PerconaFT

There also must be separate patch for PerconaFT to fix it. The fix is in
invoking ydb-layer deinitialization function explicitly from storage engine
shutdown function.
@vlad-lesin vlad-lesin force-pushed the pfs-deinit-toku-5.7 branch from e0d216f to d1c43a7 Compare August 13, 2018 12:19
@vlad-lesin vlad-lesin merged commit 753801b into percona:5.7 Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants