[MDEV-25414] Server crashed and impossible start it Created: 2021-04-14 Updated: 2021-04-16 Resolved: 2021-04-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Upgrades |
| Affects Version/s: | 10.5.9 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | stanley h | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | crash, innodb, need_feedback, pdo | ||
| Environment: |
CentOS 7 |
||
| Attachments: |
|
| Description |
|
I have very very simple identical query with one WRERE which will return only one row result. After random time from 1 minute to few hours with same query will return nothing, but that row is in table. My PHP 7.4.xx PDO client will not throw any exception, no error, no warning, nothing. Just return 0 rowCount. options: queries after connections: By me query is not soo important as the fact. I made all possible debugs which I can do but nothing found. My test with Win10 machine is everything OK. |
| Comments |
| Comment by Marko Mäkelä [ 2021-04-14 ] | ||||||||||||
|
What happened between the following lines in mysql_error.log
It looks like the 10.4.13 server was killed in action and then a 10.5.9 server was started up on the data files. The InnoDB redo log format was changed in
The last line that I quoted is somewhat curious. Was it really displayed by the 10.5.9 server, after the startup already failed? In any case, that message would be removed in Maybe you could check the system and kernel logs for what happened during that day. I would think that upgrades should be planned and executed carefully, with a clean shutdown of the old server, possibly backing up all data, and then starting the new server. | ||||||||||||
| Comment by Marko Mäkelä [ 2021-04-14 ] | ||||||||||||
|
The contents of mysql_error.log I believe that anyone should achieve the same effect (in the worst case, loss of all InnoDB data) by the following:
The redo and undo logs are the glue that make InnoDB crash-safe and ACID. I have been thinking to remove the dangerous InnoDB practice of automatically creating a new log file if it is missing on startup. For this to work, we would have to provide means for creating an empty log with a specified log sequence number (LSN) for those (rare) use cases where it is needed. That could be done in a later major release as part of | ||||||||||||
| Comment by Vladislav Vaintroub [ 2021-04-14 ] | ||||||||||||
|
MariaDB's own installation, on Windows, never upgrades in place. It does make use of the fact that different versions install into different directories XAMPP might have its own idea on how to upgrade, which is not really compatible with what we are doing. You should not have been able to upgrade without an orderly shutdown, and there is no single orderly shutdown in the server error log. To reiterate, whenever you see "Upgrade after a crash is not supported" , it means that there was no shutdown. A shutdown leaves some shutdown messages in the log, as you can see, if you issue a "SHUTDOWN" command e.g in mysql.exe, or if you shut down the Windows service, or if you use mysqladmin to do shutdown, etc | ||||||||||||
| Comment by stanley h [ 2021-04-14 ] | ||||||||||||
|
OK, soo why my select query not return row which exists in database? Why its connection alive and connector not reporting any errors? Why its happen only sometimes and not everytimes? And how to resolve it or how get more info about db server at that moment to analyze it because it looks like everything is OK? | ||||||||||||
| Comment by stanley h [ 2021-04-14 ] | ||||||||||||
|
Looks like similar problem is reported here. | ||||||||||||
| Comment by Marko Mäkelä [ 2021-04-15 ] | ||||||||||||
|
standus, I am closing this as "not a bug", because I do not think that this is a bug in MariaDB Server or the upgrade that has been implemented in MariaDB. We are not responsible for packaging that has been created by others. It is not a bug that if you delete the InnoDB write-ahead log (ib_logfile*) or cause recovery to be skipped (by setting innodb_force_recovery=6), various bad things can happen. InnoDB is just one of the many storage engines that MariaDB Server supports. It is a design decision that the failure to start up one storage engine will not prevent the entire server from starting up. Oracle made a different design decision in MySQL 5.7, making InnoDB a mandatory storage engine, that is, refusing to start up the entire server if InnoDB cannot be started. In MariaDB Server 10.2, I made an effort to make the InnoDB startup more fault-tolerant, so that on any failure, the subsystem will be closed properly and the rest of the server can start up. It appears that you are using XAMPP and that the upgrade procedure that you followed did not perform an orderly shutdown of the old server. It appears to me that the proper place to report this would be https://community.apachefriends.org or an XAMPP bug reporting system, if there is one. | ||||||||||||
| Comment by stanley h [ 2021-04-15 ] | ||||||||||||
|
OK, I understand that crash could be my fault but another problem which I described exists on CentOS. | ||||||||||||
| Comment by stanley h [ 2021-04-16 ] | ||||||||||||
|
I found another important information. Every day 1 hour after midnight server has no queries active. Why? |