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

Cache used tracking going negative

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.5.1
    • Labels:

      Description

      There is a MongoDB test case that hangs sometimes. It appears to me as though our tracking of memory in the cache is going negative. I catch the issue in a debugger and I see:

      (gdb) p $2->cache_size
      $3 = 7516192768
      (gdb) p $2->cache
      $4 = (WT_CACHE *) 0x61400000bc40
      (gdb) p *$4
      $5 = {bytes_inmem = 46116860861975164, pages_inmem = 1912, bytes_evict = 677193486, pages_evict = 1891, 
        bytes_dirty = 46116860184559548, pages_dirty = 10, evict_max_page_size = 10486339, read_gen = 19252, 
        evict_cond = 0x60b00001a0e0, evict_lock = {lock = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, 
              __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
            __size = '\000' <repeats 39 times>, __align = 0}, counter = 0, name = 0x3a10e60 <.str12> "cache eviction", 
          id = 0 '\000', initialized = 1 '\001'}, evict_walk_lock = {lock = {__data = {__lock = 1, __count = 0, 
              __owner = 2536, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, 
            __size = "\001\000\000\000\000\000\000\000\350\t\000\000\001", '\000' <repeats 26 times>, __align = 1}, 
          counter = 0, name = 0x3a10ea0 <.str13> "cache walk", id = 0 '\000', initialized = 1 '\001'}, 
        evict_waiter_cond = 0x60b00001a030, eviction_trigger = 95, eviction_target = 80, eviction_dirty_target = 80, 
        evict = 0x62300000e100, evict_current = 0x0, evict_candidates = 0, evict_entries = 0, evict_max = 171, 
        evict_slots = 400, evict_file_next = 0x0, sync_request = 0, sync_complete = 0, cp_saved_evict = 0, 
        cp_current_evict = 0, cp_skip_count = 0, cp_reserved = 0, cp_session = 0x0, cp_tid = 0, flags = 20}
      

      It's fairly difficult to reproduce this, but I'll try with WiredTiger assertions enabled to see if any fire.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                alexander.gorrod Alexander Gorrod
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: