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

Assertion in log_write fires after write failure

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.2, 3.2.13, 3.4.3, 3.5.4
    • Affects Version/s: WT2.9.1
    • Component/s: None
    • None
    • Storage 2017-02-13

      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.

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: