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

[BUG] free(): double free detected in tcache 2 on restore #725

Closed
flanger001 opened this issue Jun 14, 2022 · 5 comments · Fixed by #726 or #664
Closed

[BUG] free(): double free detected in tcache 2 on restore #725

flanger001 opened this issue Jun 14, 2022 · 5 comments · Fixed by #726 or #664
Labels

Comments

@flanger001
Copy link

Describe the bug
When I run myloader on a backup directory, it restores all data successfully but then segfaults when restoring constraints. It emits the error in the title. The attached log file will indicate where this is happening.

To Reproduce
Command executed:

myloader \
--host="$address" \
--user="$username" \
--password="$password" \
--database="$database_name" \
--directory="$directory_name" \
--no-data \
--innodb-optimize-keys=AFTER_IMPORT_ALL_TABLES \
--threads="$(nproc)" \
--max-threads-per-table="$(nproc)" \
--verbose=3

Note the --no-data option was so that I could reproduce this successfully and not have it take 6 hours.

Myloader version:
myloader 0.12.3-3, built against MySQL 8.0.28-19

Expected behavior
I expected the restore to complete successfully with no errors.

Log
restore.log

Backup
Not applicable

How to repeat
Running the above command on a backup directory will result in a segfault every time.

Files for reproduction steps are tough because the schema is from a production database. 🙁 I can email you the structure files privately if that would be possible?

Environment (please complete the following information):

  • OS version: Debian GNU/Linux 11
  • MyDumper version: mydumper 0.12.3-3, built against MySQL 8.0.28-19

Additional context
This is being run from a script in a Kubernetes pod, and the database backup directory is on a mounted block volume. The database being restored to is not on the same machine, but it is in the same Kubernetes cluster.

I believe this error is similar to these:

Thank you!

@flanger001 flanger001 added the bug label Jun 14, 2022
@davidducos davidducos added this to the Release 0.12.5-1 milestone Jun 14, 2022
@flanger001
Copy link
Author

I just tried this again with mydumper 0.12.3-1, built against MySQL 8.0.27-18 and it completed successfully, so I am guessing whatever I am seeing here showed up in 0.12.3-2 or 0.12.3-3.

@flanger001
Copy link
Author

And @davidducos if you want the structure files to reproduce this with, let me know and I can get them to you.

@davidducos
Copy link
Member

I created a test for master and it didn't fail. Can you test with master? you will need to compile it locally...

@davidducos davidducos linked a pull request Jun 14, 2022 that will close this issue
@davidducos
Copy link
Member

@flanger001 It has been fixed on v0.12.5-1

@davidducos davidducos linked a pull request Jun 14, 2022 that will close this issue
@davidducos davidducos reopened this Jun 14, 2022
@flanger001
Copy link
Author

@davidducos I can attempt this later today for sure. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants