[MDEV-33397] Innodb include OS error information when failing to write to iblogfile0 Created: 2024-02-07  Updated: 2024-02-07  Resolved: 2024-02-07

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5, 10.11
Fix Version/s: 10.5.25, 10.6.18, 10.11.8, 11.0.6, 11.1.5, 11.2.4, 11.3.3

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None


 Description   

From SO post:

2024-01-29 12:23:06 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
2024-01-29 12:23:06 0 [ERROR] [FATAL] InnoDB: write("ib_logfile0") returned I/O error

Without knowing what error happened it is a little hard to take action.



 Comments   
Comment by Daniel Black [ 2024-02-07 ]

10.11 will have slight merge conflicts due to a single iblogfile0 present:

10.11:

--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -175,7 +175,9 @@ void log_file_t::write(os_offset_t offset, span<const byte> buf) noexcept
   ut_ad(is_opened());
   if (dberr_t err= os_file_write_func(IORequestWrite, "ib_logfile0", m_file,
                                       buf.data(), offset, buf.size()))
-    ib::fatal() << "write(\"ib_logfile0\") returned " << err;
+    ib::fatal() << "write(\"ib_logfile0\") returned " << err
+                << ". Operating system error number "
+                << IF_WIN(GetLastError(), errno) << ".";
 }
 
 #ifdef HAVE_PMEM{

Generated at Thu Feb 08 10:38:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.