Bug #99609 | Resource_group_mgr heap-use-after-free | ||
---|---|---|---|
Submitted: | 18 May 2020 4:17 | Modified: | 9 Jun 2020 15:42 |
Reporter: | xiaoyu wang (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S1 (Critical) |
Version: | MySQL Server 8.0.3 Community | OS: | Any |
Assigned to: | Thayumanavar Sachithanantham | CPU Architecture: | Any |
[18 May 2020 4:17]
xiaoyu wang
[18 May 2020 4:18]
xiaoyu wang
asan stack (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: asan.txt (text/plain), 6.23 KiB.
[18 May 2020 4:18]
xiaoyu wang
a minor change for repeating (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: repeat.patch (application/octet-stream, text), 451 bytes.
[18 May 2020 4:19]
xiaoyu wang
fix (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: fix.patch (application/octet-stream, text), 4.41 KiB.
[18 May 2020 12:42]
MySQL Verification Team
Hi Mr. wang, Thank you for your bug report. However, we can not verify this bug. You quote that you were testing it on the MySQL 8.0.3 release of the server, while the current release is 8.0.20. Please, check whether your report is valid for 8.0.20 as well.
[19 May 2020 13:41]
xiaoyu wang
Hi Sinisa, Thanks for replying. I just repeated it on 8.0.20 and attachments for 8.0.20 are uploaded. The key to repeat this problem is to find an appropriate sleeping time. Applying repeat-8.0.20.patch directly most likely won't reproduce it in your environment. `usleep(10000)` in repeat-8.0.20.patch only means it can reproduce the problem in my virtual machine. You might need to make some experiments, sleeping for 500ms, 1sec, 2sec and so on, to determine the value that could reproduce the problem. Environment(A virtual machine): CPU: Intel(R) Xeon(R) Gold 61xx CPU @ 2.50GHz x 8 Cores Mem: 16G Kernel: 3.10.107 OS: CentOS 7.2 MySQL Version : Ver 8.0.20-debug-asan for Linux on x86_64 (Source distribution)
[19 May 2020 13:41]
xiaoyu wang
asan stack on 8.0.20 (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: asan-8.0.20.txt (text/plain), 13.07 KiB.
[19 May 2020 13:42]
xiaoyu wang
a minor change for repeating on 8.0.20 (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: repeat-8.0.20.patch (application/octet-stream, text), 479 bytes.
[19 May 2020 13:42]
xiaoyu wang
fix on 8.0.20 (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: fix-8.0.20.patch (application/octet-stream, text), 5.24 KiB.
[20 May 2020 12:11]
MySQL Verification Team
Hi Mr. wang, Thank you for your feedback and your patch. However, we need a test case that we can reproduce, without changing our code in any way. We can run test case as many times as necessary, but it should be reproduced on the original code. Thank you in advance.
[30 May 2020 8:34]
xiaoyu wang
Hi Sinisa, Thanks for your replying. I understand reproducing on the original source code would be the perfection. But as said, this is about thread concurrency and it may never happen on a well-performed machine. So, I'm gonna talk about this problem in four aspects: a) The problematic source code. b) Why mtr on original code works well. c) Why repeat-8.0.20 is reasonable. d) Why fix-8.0.20.patch works An description with figures would be better, so please see the attachment description.pdf. :)
[30 May 2020 8:35]
xiaoyu wang
description with figures (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: description.pdf (application/pdf, text), 1.02 MiB.
[1 Jun 2020 12:19]
MySQL Verification Team
Hi Mr. wang, Your PDF is quite convincing. This bug is now verified and assigned.
[8 Jun 2020 13:15]
Paul DuBois
Posted by developer: Fixed in 8.0.22. mysql-test-run.pl tests under no-threads connection handling failed with ASAN builds due to improper resource group initialization. This has been fixed. Thanks to Xiaoyu Wang, Tencent Technology for the contribution.
[9 Jun 2020 12:09]
MySQL Verification Team
Thank you, Paul.
[9 Jun 2020 15:42]
xiaoyu wang
Thanks :)
[20 Oct 2020 6:56]
Frederic Descamps
Thank you for your contribution that has been added to 8.0.22: https://lefred.be/content/mysql-8-0-22-thank-you-for-the-contributions/
[20 Oct 2020 12:36]
MySQL Verification Team
Thank you, Frederic.