-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: Legacy C++ Implementation
-
Component/s: mongosniff
-
None
-
Environment:64-bit Ubuntu 11.04
3.0.0-17 kernel
SMP
git version: e819261720e48699679c511c69f2f82c2c6a94ab
Steps:
1. Startup mongod with --nojournal --diaglog 3
2. Perform some inserts and query.
3. Shutdown mongod (used ctrl+c)
4. Read diaglog contents using mongosniff
db level locking enabled: 1 60 admin.$cmd query: { whatsmyuri: 1 } ntoreturn: 1 ntoskip: 0 88 admin.$cmd query: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn: -1 ntoskip: 0 63 test.user insert: { _id: ObjectId('4f86f5ffff6967e8b6be025d'), x: 3.0 } 76 test.$cmd query: { getlasterror: 1.0, w: 1.0 } ntoreturn: -1 ntoskip: 0 88 admin.$cmd query: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn: -1 ntoskip: 0 88 admin.$cmd query: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn: -1 ntoskip: 0 65 test.user query: { x: { $gte: 2.0 } } ntoreturn: 0 ntoskip: 0 88 admin.$cmd query: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn: -1 ntoskip: 0 Thu Apr 12 11:35:22 Assertion failure _state.get() < 0 src/mongo/util/concurrency/rwlock.h 167 0x8d72c6 0xb17254 0xb1b734 0x90e621 0x90e8ef 0x9120f0 0x8583dd 0x858a96 0x7f0359ed730d 0x856989 ./mongosniff(_ZN5mongo15printStackTraceERSo+0x27) [0x8d72c6] ./mongosniff(_ZN5mongo12sayDbContextEPKc+0x5e) [0xb17254] ./mongosniff(_ZN5mongo8assertedEPKcS1_j+0x124) [0xb1b734] ./mongosniff(_ZN5mongo15RWLockRecursive23assertExclusivelyLockedEv+0x41) [0x90e621] ./mongosniff(_ZN5mongo20LockMongoFilesShared23assertExclusivelyLockedEv+0x13) [0x90e8ef] ./mongosniff(_ZN5mongo16MemoryMappedFile5closeEv+0x12) [0x9120f0] ./mongosniff(_Z14processDiagLogPKc+0x228) [0x8583dd] ./mongosniff(main+0x62b) [0x858a96] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f0359ed730d] ./mongosniff() [0x856989] terminate called after throwing an instance of 'mongo::AssertionException' what(): assertion src/mongo/util/concurrency/rwlock.h:167 Aborted
addr2line output for stacktrace:
mongo::printStackTrace(std::ostream&) /home/ren/mongo/src/mongo/util/goodies.h:61 mongo::sayDbContext(char const*) /home/ren/mongo/src/mongo/util/util.cpp:194 mongo::asserted(char const*, char const*, unsigned int) /home/ren/mongo/src/mongo/util/assert_util.cpp:109 mongo::RWLockRecursive::assertExclusivelyLocked() /home/ren/mongo/src/mongo/util/concurrency/rwlock.h:168 mongo::LockMongoFilesShared::assertExclusivelyLocked() /home/ren/mongo/src/mongo/util/mmap.h:49 mongo::MemoryMappedFile::close() /home/ren/mongo/src/mongo/util/mmap_posix.cpp:42 processDiagLog(char const*) /home/ren/mongo/src/mongo/tools/sniffer.cpp:402 main /home/ren/mongo/src/mongo/tools/sniffer.cpp:510 ?? ??:0 _start ??:0
Remarks: diaglog was able to output all the operations done in the shell; it just doesn't exit cleanly.