-
Notifications
You must be signed in to change notification settings - Fork 481
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
e0d216f
to
d1c43a7
Compare
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:
The fix is in deinitialization of global mutexes explicitly from storage engine
shutdown function, which is always invoked before PFS shutdown.
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