[MDEV-18606] innodb crashes on large update and it gets corrupted Created: 2019-02-17 Updated: 2022-10-02 Resolved: 2022-10-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip orleans | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | innodb, upstream-wontfix | ||
| Environment: |
Ubuntu |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
I was executing:
|
| Comments |
| Comment by Philip orleans [ 2019-02-17 ] |
|
This is the issue. |
| Comment by Elena Stepanova [ 2019-02-19 ] |
|
I'll leave it to marko to decide what can be done about it. |
| Comment by Marko Mäkelä [ 2019-02-19 ] |
|
If InnoDB runs out of space or encounters an error when writing redo log, then I think that the only option would be to switch to read-only mode instantly. Alternatively, InnoDB should commit suicide immediately, and not ignore any errors when writing the redo log. Also in that way, crash recovery should succeed (at least after enough space has been made available in the file system). The upstream bug suggests that the problem occurred when extending the InnoDB system tablespace. In MariaDB, the file system extension was improved in philip_38, can you please include the error log from before the failed restart. What exactly caused the crash? If you still have the dataset, I would like to diagnose what caused this message:
Would it be possible to start a debug version of MariaDB on the files, and add --debug=d,ib_log to the startup options? That would give some hints where the redo log read went bad. Alternatively, if you started mysqld under strace, we could try to figure it out from that output. |
| Comment by Philip orleans [ 2019-02-19 ] |
|
I have since erased the whole directory and are still inserting the data into RocksDB. It is only at 30% as of this point. |
| Comment by Philip orleans [ 2019-02-24 ] |
|
The issue with btrfs is this you can run out of space but it's not your fault or a miscalculation. This evil file system will run of space on its own. |
| Comment by Marko Mäkelä [ 2022-05-16 ] |
|
This ticket is linked to But, in the included log, I do not see anything that could be addressed by those fixes, or possibly in InnoDB at all. When it comes to allocating redo log or data pages (be it undo log, BLOB, or index pages), InnoDB should always extend the file upfront. If extending the file or internally allocating a page in an already extended file fails, InnoDB should crash or error out at that point. (This part would be improved in Based on the included log, the InnoDB redo log was apparently corrupted, likely due to an error in btrfs. There is philip_38, have you experienced this problem with any other file system than btrfs? |
| Comment by Marko Mäkelä [ 2022-09-01 ] |
|
philip_38, I might interpret your comments as "I moved away from btrfs and never looked back." Did you ever encounter this problem while not using btrfs? |
| Comment by Philip orleans [ 2022-09-01 ] |
|
I stopped using Btrfs long ago. Not suitable for production. |