[SERVER-16627] Stack trace when fail to open WiredTigerSession Created: 22/Dec/14  Updated: 16/Apr/15  Resolved: 16/Apr/15

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.8.0-rc3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Robert Guo (Inactive) Assignee: Robert Guo (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File WiredTigerSession-stacktrace.txt    
Operating System: ALL
Steps To Reproduce:

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

Participants:

 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.



 Comments   
Comment by Eitan Klein [ 16/Apr/15 ]

Issue has been found using fault injection, This is a low priority issue related to fit and finish, I'm closing this issue.

Comment by Robert Guo (Inactive) [ 22/Dec/14 ]

stack trace

Generated at Thu Feb 08 03:41:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.