[MDEV-27912] --source include/restart_mysqld.inc fails in Spider test suite Created: 2022-02-22 Updated: 2023-04-19 Resolved: 2023-03-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider, Tests |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0 |
| Fix Version/s: | 11.1.0, 10.11.3, 11.0.2, 10.4.29, 10.5.20, 10.6.13, 10.7.8, 10.8.8, 10.9.6, 10.10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Nayuta Yanagisawa (Inactive) | Assignee: | Yuchen Pei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
--source include/restart_mysqld.inc results in a test failure in Spider suites, with no output from mysqltest. Putting the following MTR test case to storage/spider/mysql-test/spider/bugfix/t reproduces the bug.
This doesn't happen at least in the main suite and the include file is used elsewhere. So, I expect that the problem is Spider-specific. The Spider hangs on the server startup on 10.4+ ( |
| Comments |
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-02-22 ] | |||||||||||||||||||
|
I will start working on the issue once | |||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-17 ] | |||||||||||||||||||
|
Deleting storage/spider/mysql-test/spider/bugfix/my.cnf fixes the problem. Deleting my_1_1.cnf from the file result in a hang:
| |||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-17 ] | |||||||||||||||||||
|
Putting the empty file storage/spider/mysql-test/spider/bugfix/my.cnf still cause a hang. | |||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-17 ] | |||||||||||||||||||
|
As elenst said (in a private communication), this is due to the non-conventional server numbering of the Spider test suite. restart_mysqld.inc writes an *.expect file so that MTR wouldn't panic when the server is down. The file has a server number in it. In Spider case, it's written as mysqld.1.expect, while the servers have double-numbering, e.g. 1.1. A workaround proposed by elenst is manually doing some part of what restart_mysqld.inc does like the following:
| |||||||||||||||||||
| Comment by Yuchen Pei [ 2023-01-18 ] | |||||||||||||||||||
|
The workaround became storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc. However the filename is misleading and should better be something like restart_mysqld_spider.inc. Also, it misses some features from restart_mysqld.inc, including parameters like $restart_parameters or $shutdown_timeout. To fix that, we can have some options: 1. Update the spider version of restart_mysqld.inc. This will result in more code duplication
| |||||||||||||||||||
| Comment by Yuchen Pei [ 2023-01-20 ] | |||||||||||||||||||
|
Hi serg, elenst suggested that I send this to you for review, and you may suggest someone else to review it. Here's the (tiny) patch: | |||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-01-20 ] | |||||||||||||||||||
|
The real problem is that shutdown_mysqld.inc (and, likely, other .inc files too) use @@server_id while mtr uses group suffix. If .inc files would be using the correct file name, spider tests wouldn't need to specify the expect file manually. I suggest the following fix instead
that seems to work correctly for your spider test case and for other test cases too. Perhaps this should be done in all other include files that use $_expect_file_name ? Note, after this change innodb/t/temporary_table.test will fail, because it changes tmpdir to /dev/null/nonexistent. Can be fixed with
(and also add_suppression() at the top of the file needs to be adjusted) | |||||||||||||||||||
| Comment by Yuchen Pei [ 2023-01-30 ] | |||||||||||||||||||
|
Thanks for the review serg, PTAL thanks: https://github.com/MariaDB/server/commit/0548a185a1e | |||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-01-31 ] | |||||||||||||||||||
|
0548a185a1e looks good, thanks. Ok to push | |||||||||||||||||||
| Comment by Yuchen Pei [ 2023-03-22 ] | |||||||||||||||||||
|
I got back to this task today and tested the patch for 10.3-11.1 (hopefully for the last time). I tried to push to 10.3 but got rejected:
The CI displays a green checkmark[1]. I wonder whether this means the branch is locked. serg Shall I try pushing to 10.4 instead? | |||||||||||||||||||
| Comment by Yuchen Pei [ 2023-03-22 ] | |||||||||||||||||||
|
Pushed to 10.4, and in time it will be merged to newer versions. 10.5, 10.6 have merge conflicts, and reference commits were pushed to bb-10. {5,6}-mdev-27912. |