Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33397

Innodb include OS error information when failing to write to iblogfile0

Details

    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.

      Attachments

        Activity

          danblack Daniel Black added a comment -

          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{
          

          danblack Daniel Black added a comment - 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{

          People

            danblack Daniel Black
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.