Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3156

Assertion in log_write fires after write failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: WT2.9.1
    • Fix Version/s: WT2.9.2, 3.2.13, 3.4.3, 3.5.4
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage 2017-02-13

      Description

      I am working on a testing tool that injects write error, and happen to have a diagnostic build. When __log_write_internal gets a write error, it will assert:

      frame #5: 0x00000001000e6a24 test_wt2909_checkpoint_integrity`__log_write_internal(session=0x0000000100806480, record=0x0000000102001890, lsnp=0x0000000000000000, flags=8) + 1780 at log.c:2206
         2203		 */
         2204		WT_ASSERT(session, !LF_ISSET(WT_LOG_FLUSH) ||
         2205		    __wt_log_cmp(&log->write_lsn, &lsn) >= 0);
      -> 2206		WT_ASSERT(session,
         2207		    !LF_ISSET(WT_LOG_FSYNC) || __wt_log_cmp(&log->sync_lsn, &lsn) >= 0);
         2208		return (ret);
         2209	}
      (lldb) p log->sync_lsn
      (WT_LSN) $1 = {
        l = (offset = 2621184, file = 1)
        file_offset = 4297588480
      }
      (lldb) p lsn
      (WT_LSN) $2 = {
        l = (offset = 2634240, file = 1)
        file_offset = 4297601536
      }
      (lldb) p ret
      (int) $3 = 5
      

      The assertions shouldn't really apply if ret is non-zero, right? Seems like the error return should simply be returned.

        Attachments

          Activity

            People

            • Assignee:
              sue.loverso Sue LoVerso
              Reporter:
              donald.anderson Donald Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: