Bug #118814 | I/O error while writing to file: .\#ib_16384_0.dblwr | ||
---|---|---|---|
Submitted: | 12 Aug 3:47 | Modified: | 11 Oct 3:22 |
Reporter: | Marci Assassin | Email Updates: | |
Status: | Open | Impact on me: | |
Category: | MySQL Server: Windows | Severity: | S2 (Serious) |
Version: | 8.0.39 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[12 Aug 3:47]
Marci Assassin
[12 Aug 17:43]
MySQL Verification Team
Did you check the Event Viewer system logs to see for any Ntfs or disk device errors? Disable antivirus scanners on the datadir too. -- Shane Bester, MySQL Senior Principal Technical Support Engineer Oracle Corporation http://dev.mysql.com/
[10 Sep 1:39]
Marci Assassin
Approximately two weeks after the initial occurrence, we observed the same phenomenon again. During the first occurrence, no disk failures were recorded in the Windows event logs. However, during the second occurrence, we observed messages related to disk write failures. We have now replaced the hard drive and are monitoring whether the issue reoccurs.
[11 Sep 13:08]
MySQL Verification Team
Let us know if status changes but this looks like hardware issue.
[24 Sep 4:02]
Marci Assassin
After replacing the hard drive, we encountered the same issue again. In the production environment, the customer insists that antivirus software must be installed. Therefore, we were unable to test whether the issue would be resolved if the antivirus software was disabled. We were able to successfully recover the database using the following method. Can the possible cause be inferred based on this recovery approach? Recovery steps: 1.Add the following configurations to my.ini: innodb_force_recovery=4 skip_innodb_doublewrite 2. Run the following command: mysqld --initialize-insecure --user=mysql 3. Remove the configurations added in Step 1.
[25 Sep 17:08]
MySQL Verification Team
Hi, 2025-09-12T12:09:20.385603Z 0 [Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed. 2025-09-12T12:09:20.392129Z 0 [ERROR] [MY-012639] [InnoDB] Write to file .\#ib_16384_0.dblwr failed at offset 0, 65536 bytes should have been written, only 0 were written. Operating system error number 0. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded. 2025-09-12T12:09:20.392786Z 0 [ERROR] [MY-012640] [InnoDB] Error number 0 means 'No error' 2025-09-12T12:09:20.392973Z 0 [ERROR] [MY-013676] [InnoDB] I/O error while writing to file: .\#ib_16384_0.dblwr. Retrying ... ... This is what your OS returned to MySQL. We cannot work around your OS. Why is your OS making this problem is not something we can guess. This is especially problematic as "Operating system error number 0" is "no error" so we have windows returning a no error while failing to allow file to be written. In case of antivirus issue normally we'd see ERROR_ACCESS_DENIED (5) or ERROR_SHARING_VIOLATION (32) not error 0. What is possible is that we have a bug in our code that's incorrectly reading the error Windows returned, so that actual error is not 0 but something else (5 for e.g.) but it is def. something outside of our hands that is preventing this write to happen.
[26 Sep 9:56]
MySQL Verification Team
Hi, I discussed with my colleagues and the error message here is not useful as the error happens earlier in code. I'll verify the bug as this code needs to be re-checked, but with regards to your problem it is most probably a windows issue and not innodb issue. Code inspection shows that WriteFile or GetOverlappedResult has failed, but we don't really know how it failed. It can very well be due to antivirus but we cannot be sure. In any way please share some info about your setup, please upload full config file, we especially want to see innodb-page-size innodb-doublewrite innodb_doublewrite_pages innodb_write_io_threads