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

Fix lp:1663452 "Resource allocation failures in 'CREATE/DROP COMPRESSION_DICTIONARY' result in server crashes (debug mode) | handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) #1412

Conversation

percona-ysorokin
Copy link
Collaborator

@percona-ysorokin percona-ysorokin commented Feb 13, 2017

'innobase_create_zip_dict()' / 'mysql_create_zip_dict()' and
'innobase_drop_zip_dict()' / 'mysql_drop_zip_dict()' extended with additional
error return codes ('Out of memory', 'Out of disk space' and
'Too many concurrent transactions') so that proper diagnostic messages are
printed when 'CREATE/DROP COMPRESSION_DICTIONARY' statements encounter
resource shortage problem.

'innodb.xtradb_compressed_columns_debug' extended with corresponding checks
for those three types of resource allocation problems.

@percona-ysorokin
Copy link
Collaborator Author

@percona-ysorokin percona-ysorokin changed the title Fix lp:1663452 "handle_fatal_signal (sig=6) in innobase_create_zip_dict" Fix lp:1663452 "handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) Feb 13, 2017
default:
DBUG_ASSERT(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps debug build should continue to assert so that further nonspecific errors are caught and handled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reverted

@@ -94,8 +98,19 @@ int mysql_create_zip_dict(THD* thd, const char* name, ulong name_len,
error= ER_READ_ONLY_MODE;
my_error(error, MYF(0));
break;
case HA_CREATE_ZIP_DICT_OUT_OF_MEMORY:
Copy link
Contributor

Choose a reason for hiding this comment

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

The testcase handles HA_CREATE_ZIP_DICT_TOO_MANY_CONCURRENT_TRXS, how did you come up with the other two - by code review? Is it worth to add debug injection tests for them too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, just by reviewing the most typical resource allocation problems.
Test case extended with checks for ER_RECORD_FILE_FULL as well as for ER_OUT_OF_RESOURCES.

@laurynas-biveinis
Copy link
Contributor

Please edit the bug title to something docs/users could use, but leaving the assert there too, e.g. "Failure to blah results in blah | handle_fatal_signal ... "

@percona-ysorokin percona-ysorokin changed the title Fix lp:1663452 "handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) Fix lp:1663452 "Resource allocation failures in 'CREATE/DROP COMPRESSION_DICTIONARY' result in server crashes (debud mode) | handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) Feb 15, 2017
@percona-ysorokin percona-ysorokin changed the title Fix lp:1663452 "Resource allocation failures in 'CREATE/DROP COMPRESSION_DICTIONARY' result in server crashes (debud mode) | handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) Fix lp:1663452 "Resource allocation failures in 'CREATE/DROP COMPRESSION_DICTIONARY' result in server crashes (debug mode) | handle_fatal_signal (sig=6) in innobase_create_zip_dict" (5.6) Feb 15, 2017
@percona-ysorokin percona-ysorokin force-pushed the ps-5.6-bug1663452-cc_ib_create_table_fail_too_many_trx branch from 47cb2b2 to d949a43 Compare February 15, 2017 20:52
…SSION_DICTIONARY' result in server crashes (debug mode) | handle_fatal_signal (sig=6) in innobase_create_zip_dict"

'innobase_create_zip_dict()' / 'mysql_create_zip_dict()' and
'innobase_drop_zip_dict()' / 'mysql_drop_zip_dict()' extended with additional
error return codes ('Out of memory', 'Out of disk space' and
'Too many concurrent transactions') so that proper diagnostic messages are
printed when 'CREATE/DROP COMPRESSION_DICTIONARY' statements encounter
resource shortage problem.

'innodb.xtradb_compressed_columns_debug' extended with corresponding checks
for those three types of resource allocation problems.
@percona-ysorokin percona-ysorokin force-pushed the ps-5.6-bug1663452-cc_ib_create_table_fail_too_many_trx branch from d949a43 to 0fce4ca Compare February 16, 2017 10:23
@percona-ysorokin
Copy link
Collaborator Author

Updated Jenkins build link
http://jenkins.percona.com/job/percona-server-5.6-param/1705/

@laurynas-biveinis
Copy link
Contributor

No need to propagate Launchpad bug title changes to Github PRs

Copy link
Contributor

@laurynas-biveinis laurynas-biveinis left a comment

Choose a reason for hiding this comment

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

LGTM, or, if that line is redundant, OK to push with only local testing

SET debug = '+d,simulate_out_of_memory';
--error ER_OUT_OF_RESOURCES
DROP COMPRESSION_DICTIONARY d1;
SET debug = '+d,simulate_out_of_memory';
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this line was added deliberately. 'simulate_out_of_memory' automatically switches itself off upon reaching this DBUG sync point (to make 'out of memory' error a one time occasion).

@percona-ysorokin percona-ysorokin merged commit 10c74ef into percona:5.6 Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants