[MDEV-26932] upgrade wizard never finishes at Phase 9/10 and hit "InnoDB: Upgrade after a crash is not supported" after restart Created: 2021-10-29 Updated: 2022-01-31 Resolved: 2022-01-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.5.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Allen Lee (Inactive) | Assignee: | Allen Lee (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
| Comments |
| Comment by Daniel Black [ 2021-10-29 ] | |
|
The Aria recovery and ibdata1 not writable make it look like an existing mysqld.exe is already running. Try terminating that process first if it exists. | |
| Comment by Marko Mäkelä [ 2021-10-29 ] | |
|
wlad, can you please analyze this? I would suspect that the 10.4 server was forcibly killed for some reason. (Is there some timeout for the shutdown?) The startup message that says that upgrade from a crash is not supported identifies the version of the server with which ib_logfile0 was created (or the log was last resized), if that version was MySQL 5.7.9 or any later 5.7.x release, or anything later than MariaDB 10.2.2. The first 512 bytes of the ib_logfile0 are never modified during normal operation. I do not know whether file locking on Windows would still prevent multiple servers to be started on the same data file, but I assume and hope so. On other systems, | |
| Comment by Vladislav Vaintroub [ 2021-10-29 ] | |
|
The issue with "never finishes" is " The "must be writable" message, would most probably stem from an instance of mysqld.exe which is still up, and could not shutdown. The user would need to kill it , via taskkill /PID:<pid> /F from elevated command prompt) | |
| Comment by Marko Mäkelä [ 2021-11-29 ] | |
|
I believe that the affected version is reported wrong. The problem should not be that we refuse to start up an upgraded server when crash recovery is needed, but that the server before the upgrade was apparently forcibly killed. When it comes to the 10.4 server that was apparently hung during shutdown, wlad should be able to help to produce a crash dump or something that would allow us to determine and fix the cause of that hang. | |
| Comment by Vladislav Vaintroub [ 2021-11-29 ] | |
|
I think I will repeat myself here, in case it was not clear first time, Everyone who installed 10.5.12 was affected by mysql_upgrade_service, and upgrade wizard hang. This does not need to be debugged anymore, it was already debugged, and fixed. mysql_upgrade_service is is only procedure we support on Windows, when it comes to services. If it does not involve Windows service, it can be upgraded like elsewhere - you best do an offline backup, you start new mysqld on the old datadir, and run mysql_upgrade. Deviations and improvisation, like installing 10.5 with service, and then copying 10.4 data to 10.5 datadir while server is still online (this is what the original reported did, from what I've heard), are not appreciated by Innodb and will be punished with "Crash upgrade is not supported". As for guidance - use 10.5.13, where mysql_upgrade_service was fixed. | |
| Comment by Vladislav Vaintroub [ 2021-11-29 ] | |
|
I'm changing assignee to allen.lee@mariadb.com to confirm that this is a duplicate, and to confirm the supported procedure below works, for 10.5.13 or later. It did not work in 10.5.12, and we know that, and I explained that. And then this can be closed as duplicate. Upgrade procedureFrom the elevated command line (cmd started with "Run as Administrator")
That's the whole supported procedure. | |
| Comment by Marko Mäkelä [ 2021-12-31 ] | |
|
Even after the 10.4 server was shut down correctly according to the server error log, the 10.5 server would refuse to start up, claiming that crash recovery is needed. An upgrade succeeded after the parameter innodb_log_file_size was changed in the server configuration, and the 10.4 server was restarted and shut down. (The log file size change forces the log to be rebuilt on server startup.) After the 10.4 log file was rebuilt, the 10.5 server would detect that the log file is logically empty, and allow the upgrade. Unfortunately, I did not get a copy of the problematic 10.4 log file, so this problem was not fixed. |