Fix bug 1617998 (HandlerSocket may access freed memory on startup)#939
Merged
laurynas-biveinis merged 1 commit intopercona:5.6from Aug 29, 2016
Merged
Conversation
There is a race condition between HS worker threads initializing default SE and default temp SE fields and the server main thread initializing the same globally w/o locking. As HS workers do not care about the default (temp) SE, initialise their THD handles without plugin support.
Collaborator
|
LGTM |
satya-bodapati
pushed a commit
to satya-bodapati/percona-server
that referenced
this pull request
Feb 8, 2019
Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lth Differential Revision: D13924478 Pulled By: lth fbshipit-source-id: 003c1b56614
inikep
pushed a commit
to inikep/percona-server
that referenced
this pull request
Apr 23, 2020
Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lth Differential Revision: D13924478 Pulled By: lth fbshipit-source-id: 8f38dbfdedb
inikep
added a commit
to inikep/percona-server
that referenced
this pull request
Feb 24, 2021
Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lth Differential Revision: D13924478 Pulled By: lth
inikep
added a commit
to inikep/percona-server
that referenced
this pull request
Nov 15, 2021
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 (facebook/mysql-5.6@98a250f) Pulled By: lth fbshipit-source-id: 157947a2d38
ldonoso
pushed a commit
to ldonoso/percona-server
that referenced
this pull request
Mar 15, 2022
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
ldonoso
pushed a commit
to ldonoso/percona-server
that referenced
this pull request
Mar 15, 2022
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
ldonoso
pushed a commit
to ldonoso/percona-server
that referenced
this pull request
Mar 18, 2022
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
ldonoso
pushed a commit
to ldonoso/percona-server
that referenced
this pull request
Apr 12, 2022
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
inikep
added a commit
to inikep/percona-server
that referenced
this pull request
Apr 15, 2024
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
inikep
added a commit
to inikep/percona-server
that referenced
this pull request
Apr 16, 2024
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
inikep
added a commit
to inikep/percona-server
that referenced
this pull request
Apr 17, 2024
… (percona#939) Summary: JIRA: https://jira.percona.com/browse/FB8-86 Reference Patch: facebook/mysql-5.6@78fa270 Reference Patch: facebook/mysql-5.6@72c25d615d8 Reference Patch: facebook/mysql-5.6@78b6b8bc826 Reference Patch: facebook/mysql-5.6@00be4805f47 Crash safe index file is created when any change is made to the index file. The index file is first copied over to the crash safe one and then stuff is added/removed from the crash safe index file. Finally, the old index file is deleted and crash safe index file is renamed to the index file. There might be a scenario where mysql crashes after stuff is changed in the crash safe file but before the old index file is deleted. In this case we should delete the crash safe index file at restart. If we don't delete it subsequent changes to the index file can corrupt it because it can be copied to the old crash safe file which already has some data in it. Pull Request resolved: facebook/mysql-5.6#939 Reviewed By: lloyd Differential Revision: D13924478 Pulled By: lth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a race condition between HS worker threads initializing
default SE and default temp SE fields and the server main thread
initializing the same globally w/o locking.
As HS workers do not care about the default (temp) SE, initialise
their THD handles without plugin support.
http://jenkins.percona.com/job/percona-server-5.6-param/1343/