Stack trace when fail to open WiredTigerSession

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.8.0-rc3
    • Component/s: 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
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Robert Guo (Inactive)
            Reporter:
            Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: