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

Errors during create lead to invalid shutdown order

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.5.1
    • Affects Version/s: None
    • Component/s: None
    • None

      An example of such a failure is:
      http://mjc.homeunix.org:8180/job/wiredtiger-pull-request-tester/190/

      To reproduce the issue add in code that returns an error from __btree_page_sizes. For example:

      --- a/src/btree/bt_handle.c
      +++ b/src/btree/bt_handle.c
      @@ -576,6 +576,7 @@ __btree_page_sizes(WT_SESSION_IMPL *session, const char *config)
              WT_RET(__wt_config_getones(session, config, "memory_page_max", &cval));
              btree->maxmempage = (uint64_t)cval.val;
       
      +       return (EINVAL);
              /* Allocation sizes must be a power-of-two, nothing else makes sense. */
              if (!__wt_ispo2(btree->allocsize))
                      WT_RET_MSG(session,
      

      Then run test_config03. The failure should look something like:

      Program received signal EXC_BAD_ACCESS, Could not access memory.
      Reason: KERN_INVALID_ADDRESS at address: 0x00000024b236cac9
      [Switching to process 35982 thread 0x317]
      0x00000001010803aa in __wt_free_int (session=0x102f80000, p_arg=0x104a29878) at os_alloc.c:215
      215			WT_CSTAT_INCR(session, memory_free);
      (gdb) where
      #0  0x00000001010803aa in __wt_free_int (session=0x102f80000, p_arg=0x104a29878) at os_alloc.c:215
      WT-1  0x000000010101c8a8 in __wt_cache_evict_server (arg=0x102f80000) at bt_evict.c:312
      WT-2  0x00007fff95834742 in _pthread_start ()
      WT-3  0x00007fff95821181 in thread_start ()
      

      We see the failure because the session handle is no longer valid - it has been free'd by the main thread before the eviction server has exited.

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: