Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16627

Stack trace when fail to open WiredTigerSession

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.8.0-rc3
    • Storage
    • None
    • ALL
    • Hide

      To reproduce the error, start a mongod with wiredTiger, insert some documents using the shell, turn on the fail point in WiredTigerSession::WiredTigerSession, this should cause the server to crash.

      The stack trace of the crash is attached in a text file

      More detailed steps:

      Add a fail point:

      // in src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
      #include "mongo/util/fail_point_service.h"
       
      // declare fail point in global namespace with: MONGO_FP_DECLARE(wtSessionInit);
       
      // add the following at the end of WiredTigerSession::WiredTigerSession
      if ( MONGO_FAIL_POINT(wtSessionInit) ) {
        invariantWTOK(ENOENT);
      }

      Invoke it from the shell:

      // start mongod
      // insert some documents
      use admin
      db.runCommand({ configureFailPoint: 'wtSessionInit', mode: 'alwaysOn'})
      // crash

      Show
      To reproduce the error, start a mongod with wiredTiger, insert some documents using the shell, turn on the fail point in WiredTigerSession::WiredTigerSession, this should cause the server to crash. The stack trace of the crash is attached in a text file More detailed steps: Add a fail point: // in src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp #include "mongo/util/fail_point_service.h"   // declare fail point in global namespace with: MONGO_FP_DECLARE(wtSessionInit);   // add the following at the end of WiredTigerSession::WiredTigerSession if ( MONGO_FAIL_POINT(wtSessionInit) ) { invariantWTOK(ENOENT); } Invoke it from the shell: // start mongod // insert some documents use admin db.runCommand({ configureFailPoint: 'wtSessionInit' , mode: 'alwaysOn' }) // crash

    Description

      A failed call to a WT_CONNECTION's open_session after mongod has started causes it to crash.

      The wiredTiger open_session failure error condition is simulated by setting the conn->open_session call's return code in WiredTigerSession::WiredTigerSession to ENOENT using a fail point.

      Attachments

        Activity

          People

            robert.guo@mongodb.com Robert Guo (Inactive)
            robert.guo@mongodb.com Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: