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
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
Jenkins build link |
sql/sql_zip_dict.cc
Outdated
default: | ||
DBUG_ASSERT(0); |
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.
Perhaps debug build should continue to assert so that further nonspecific errors are caught and handled?
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.
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: |
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.
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?
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.
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.
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 ... " |
47cb2b2
to
d949a43
Compare
…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.
d949a43
to
0fce4ca
Compare
Updated Jenkins build link |
No need to propagate Launchpad bug title changes to Github PRs |
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, 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'; |
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.
Redundant line?
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.
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).
'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.