[SERVER-22869] large $sample size causes seg fault on wiredtiger Created: 26/Feb/16  Updated: 19/Nov/16  Resolved: 31/Mar/16

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.2.3
Fix Version/s: 3.2.5, 3.3.4

Type: Bug Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: Geert Bosch
Resolution: Done Votes: 0
Labels: code-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod.log    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

Mac OS X 10.11.3, SSD, mongodb 3.2.3, node.js driver 2.1.7

node.js script to cause the seg fault is attached (requires mongodb driver).

I was unable to reproduce it in the shell (possibly due to much smaller batch sizes?)

Sprint: Integration 12 (04/04/16)
Participants:

 Description   

I'm executing a $sample aggregation through the node.js driver with a large sample size (e.g. 10000 on a collection of size 1M), which reproducibly causes a seg fault and crashes the server. In several attempts with smaller sample sizes (100, 1000) the crash did not occur.

I was only able to reproduce on WiredTiger, not MMAP.

Every time it crashes, I can see "duplicate document" messages in the log file in the getMore command, followed by an "Invalid access at address: 0x90."

Relevant log lines and stack trace:

2016-02-26T18:00:56.537+1100 I COMMAND  [conn8] command mongodb.fanclub2 command: aggregate { aggregate: "fanclub2", pipeline: [ { $sample: { size: 5000 } } ], allowDiskUse: true, cursor: { batchSize: 1000 } } cursorid:46731770331 keyUpdates:0 writeConflicts:0 numYields:25 reslen:401111 locks:{ Global: { acquireCount: { r: 56 } }, Database: { acquireCount: { r: 28 } }, Collection: { acquireCount: { r: 28 } } } protocol:op_query 234ms
2016-02-26T18:00:56.569+1100 D COMMAND  [conn8] run command mongodb.$cmd { getMore: 46731770331, collection: "fanclub2", batchSize: 1000 }
2016-02-26T18:00:56.570+1100 D QUERY    [conn8] $sample encountered duplicate document: {_id: 543fb212fe4dce3730b58fe1, membership_status: "PENDING", name: "David W Wood", phone_no: "+1441773104", last_login: 2012-07-29T22:42:23, address: {city: "Fresno, California", street: "12 Fir St", postal_code: "58844", country: "USA"}, last_position: {type: "Point", coordinates: [-178.813, 51.7581]}, email: "cutesy49@comcast.net"}
2016-02-26T18:00:56.572+1100 D QUERY    [conn8] $sample encountered duplicate document: {_id: 53182d2cfe4dce37c22212e7, favorite_feature: "Replication", membership_status: "PENDING", name: "Ella P Allen", gender: "male", phone_no: "+452001029501", last_login: 2011-05-30T17:12:21, address: {city: "Orlando, Florida", street: "96 East Interlaken St", postal_code: "58824", country: "USA"}, last_position: {type: "Point", coordinates: [-175.925, -9.12909]}, email: "dimples84@icloud.com"}
2016-02-26T18:00:56.573+1100 F -        [conn8] Invalid access at address: 0x90
2016-02-26T18:00:56.581+1100 F -        [conn8] Got signal: 11 (Segmentation fault: 11).
 
 0x10fec2119 0x10fec1c28 0x7fff92f83eaa 0x1 0x10f82f7c9 0x10fa48622 0x10f8374c7 0x10fa48622 0x10f7780e8 0x10f7f1b62 0x10f7f0b97 0x10f749d7a 0x10f8e6a22 0x10f8e336a 0x10f5ea64f 0x10fe8489e 0x10fe84041 0x7fff89192c13 0x7fff89192b90 0x7fff89190375
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"10F5E0000","o":"8E2119","s":"_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE"},{"b":"10F5E0000","o":"8E1C28","s":"_ZN5mongo12_GLOBAL__N_124abruptQuitWithAddrSignalEiP9__siginfoPv"},{"b":"7FFF92F7F000","o":"4EAA","s":"_sigtramp"},{"b":"0","o":"1"},{"b":"10F5E0000","o":"24F7C9","s":"_ZN5mongo18MultiIteratorStage28doDetachFromOperationContextEv"},{"b":"10F5E0000","o":"468622","s":"_ZN5mongo12PlanExecutor26detachFromOperationContextEv"},{"b":"10F5E0000","o":"2574C7","s":"_ZN5mongo18PipelineProxyStage28doDetachFromOperationContextEv"},{"b":"10F5E0000","o":"468622","s":"_ZN5mongo12PlanExecutor26detachFromOperationContextEv"},{"b":"10F5E0000","o":"1980E8","s":"_ZN5mongo10GetMoreCmd3runEPNS_16OperationContextERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7BSONObjEiRS9_RNS_14BSONObjBuilderE"},{"b":"10F5E0000","o":"211B62","s":"_ZN5mongo7Command3runEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS3_21ReplyBuilderInterfaceE"},{"b":"10F5E0000","o":"210B97","s":"_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_RKNS_3rpc16RequestInterfaceEPNS4_21ReplyBuilderInterfaceE"},{"b":"10F5E0000","o":"169D7A","s":"_ZN5mongo11runCommandsEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS2_21ReplyBuilderInterfaceE"},{"b":"10F5E0000","o":"306A22","s":"_ZN5mongoL15receivedCommandEPNS_16OperationContextERKNS_15NamespaceStringERNS_6ClientERNS_10DbResponseERNS_7MessageE"},{"b":"10F5E0000","o":"30336A","s":"_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE"},{"b":"10F5E0000","o":"A64F","s":"_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE"},{"b":"10F5E0000","o":"8A489E","s":"_ZN5mongo17PortMessageServer17handleIncomingMsgEPv"},{"b":"10F5E0000","o":"8A4041","s":"_ZNSt3__114__thread_proxyINS_5tupleIJNS_6__bindIPFPvS3_EJPN5mongo12_GLOBAL__N_124MessagingPortWithHandlerEEEEEEEEES3_S3_"},{"b":"7FFF8918F000","o":"3C13","s":"_pthread_body"},{"b":"7FFF8918F000","o":"3B90","s":"_pthread_body"},{"b":"7FFF8918F000","o":"1375","s":"thread_start"}],"processInfo":{ "mongodbVersion" : "3.2.3", "gitVersion" : "b326ba837cf6f49d65c2f85e1b70f6f31ece7937", "compiledModules" : [], "uname" : { "sysname" : "Darwin", "release" : "15.3.0", "version" : "Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/Users/tr/.mongodb/versions/mongodb-current/bin/mongod", "machType" : 2, "b" : "10F5E0000", "vmaddr" : "100000000", "buildId" : "8A20E1DCBF543EE3AE6F68D820D4C1B6" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFF8CDF8000", "vmaddr" : "7FFF89215000", "buildId" : "5A4257EF31453BB387A40D2404A9462D" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFF84CF5000", "vmaddr" : "7FFF81112000", "buildId" : "8FC3D139805534989AC56467CB7F4D14" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF89234000", "vmaddr" : "7FFF85651000", "buildId" : "6B245C0AF3EA383BA5425B0D0456A41B" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF8E4FA000", "vmaddr" : "7FFF8A917000", "buildId" : "766BC3F541F33315BABC72718A98EA92" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF8B0EF000", "vmaddr" : "7FFF8750C000", "buildId" : "D3C4AB4023B43BC68C385B8758D14E80" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF92F93000", "vmaddr" : "7FFF8F3B0000", "buildId" : "F51332690B22388CA57C079667B6291E" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF97082000", "vmaddr" : "7FFF9349F000", "buildId" : "C6BD205F4ECE37EEBCABA76F39CDCFFA" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF8E58A000", "vmaddr" : "7FFF8A9A7000", "buildId" : "324C91892AF33356847F6F4CE1C6E901" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF8FBBA000", "vmaddr" : "7FFF8BFD7000", "buildId" : "AA629043C6F632FE8007E3478E99ACA7" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF8FBB9000", "vmaddr" : "7FFF8BFD6000", "buildId" : "09397E0160663179A50C2CE666FDA929" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF8A810000", "vmaddr" : "7FFF86C2D000", "buildId" : "EDF719D6D2BB38DD8C944272BEFDA2CD" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF8E606000", "vmaddr" : "7FFF8AA23000", "buildId" : "CB745E1F48853F96B38B2093DF488FD5" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF909AF000", "vmaddr" : "7FFF8CDCC000", "buildId" : "163CF63A74553D1FAE578C4475A9204C" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF918BF000", "vmaddr" : "7FFF8DCDC000", "buildId" : "B8D1A5FCCFD53AAB8A1014DDC129710A" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF8E5BB000", "vmaddr" : "7FFF8A9D8000", "buildId" : "9B500E4EE462321E828E5524DC984C1B" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF93725000", "vmaddr" : "7FFF8FB42000", "buildId" : "49D423297DE9341392C3A473A7E9CF35" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF85141000", "vmaddr" : "7FFF8155E000", "buildId" : "EAB38A6C86713B13B50090EC1B912063" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFF84B6B000", "vmaddr" : "7FFF80F88000", "buildId" : "5FD7907036CC3D02BEA7BB5D2AE97D5D" }, { "path" : "/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" : "7FFF8E682000", "vmaddr" : "7FFF8AA9F000", "buildId" : "1B3F5AFCFFCD3ECB8B9A5538366FB20D" }, { "path" : "/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" : "7FFF907B0000", "vmaddr" : "7FFF8CBCD000", "buildId" : "75C97D880A633093AE83DE33EB7405CE" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF92ED0000", "vmaddr" : "7FFF8F2ED000", "buildId" : "945B5FB1DA913D45A961A8FAD53C1E7E" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF8EED0000", "vmaddr" : "7FFF8B2ED000", "buildId" : "6513635B4ADE3B45BF63ED7AC565B0C9" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF8EB62000", "vmaddr" : "7FFF8AF7F000", "buildId" : "9CEB6C3B1CAF3C32A9FD93BC72CBCEA1" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF8844F000", "vmaddr" : "7FFF8486C000", "buildId" : "26655445CA97321EB221801CB378D1AA" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF8A990000", "vmaddr" : "7FFF86DAD000", "buildId" : "9EECAB18F02534C48E327EFFA6720EFC" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFF8A8FA000", "vmaddr" : "7FFF86D17000", "buildId" : "865FE79AA22D3733A14FFC7B37F3AECD" }, { "path" : "/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" : "7FFF87FDA000", "vmaddr" : "7FFF843F7000", "buildId" : "DC8A102ABF0231A4891465C34DF6B592" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF90B15000", "vmaddr" : "7FFF8CF32000", "buildId" : "243FADE1255A3B788033F336CD64B817" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFF92F7F000", "vmaddr" : "7FFF8F39C000", "buildId" : "D3A27E107F083603ACC87A92B2C04BAB" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFF8918F000", "vmaddr" : "7FFF855AC000", "buildId" : "327CECD0B88131538FCC4FD4818B7F16" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFF91B5A000", "vmaddr" : "7FFF8DF77000", "buildId" : "3E0036AFFC6433528DA46B550C2C2562" }, { "path" : "/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" : "7FFF88D19000", "vmaddr" : "7FFF85136000", "buildId" : "FD6ECF2C148932CA981B9045B5EB1FAA" }, { "path" : "/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFF8A9B6000", "vmaddr" : "7FFF86DD3000", "buildId" : "B485369FE3A1319E998C89AAF606079E" }, { "path" : "/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF8CDA4000", "vmaddr" : "7FFF891C1000", "buildId" : "1D0F8265F0263CBD93D3F8DF14FFCE68" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF9086B000", "vmaddr" : "7FFF8CC88000", "buildId" : "124E0F0523503774A32C7F5BF38EDE73" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF8CFDF000", "vmaddr" : "7FFF893FC000", "buildId" : "61AB46109304354C9E9BD57198AE9866" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFF884AB000", "vmaddr" : "7FFF848C8000", "buildId" : "9F45830DF1D53CDF94611A5477ED7D1E" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFF90A2E000", "vmaddr" : "7FFF8CE4B000", "buildId" : "999E610F41FC32A3ADCA5EC049B65DFB" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFF88C0D000", "vmaddr" : "7FFF8502A000", "buildId" : "DCCC81773D0935BC97842A04FEC4C71B" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFF98B94000", "vmaddr" : "7FFF94FB1000", "buildId" : "4243B6B421E9355B9C5A95A216233B96" } ] }}
 mongod(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE+0x39) [0x10fec2119]
 mongod(_ZN5mongo12_GLOBAL__N_124abruptQuitWithAddrSignalEiP9__siginfoPv+0xF8) [0x10fec1c28]
 libsystem_platform.dylib(_sigtramp+0x1A) [0x7fff92f83eaa]
 ??? [0x1]
 mongod(_ZN5mongo18MultiIteratorStage28doDetachFromOperationContextEv+0x29) [0x10f82f7c9]
 mongod(_ZN5mongo12PlanExecutor26detachFromOperationContextEv+0x22) [0x10fa48622]
 mongod(_ZN5mongo18PipelineProxyStage28doDetachFromOperationContextEv+0x47) [0x10f8374c7]
 mongod(_ZN5mongo12PlanExecutor26detachFromOperationContextEv+0x22) [0x10fa48622]
 mongod(_ZN5mongo10GetMoreCmd3runEPNS_16OperationContextERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7BSONObjEiRS9_RNS_14BSONObjBuilderE+0x1288) [0x10f7780e8]
 mongod(_ZN5mongo7Command3runEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS3_21ReplyBuilderInterfaceE+0x8D2) [0x10f7f1b62]
 mongod(_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_RKNS_3rpc16RequestInterfaceEPNS4_21ReplyBuilderInterfaceE+0x987) [0x10f7f0b97]
 mongod(_ZN5mongo11runCommandsEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS2_21ReplyBuilderInterfaceE+0x2CA) [0x10f749d7a]
 mongod(_ZN5mongoL15receivedCommandEPNS_16OperationContextERKNS_15NamespaceStringERNS_6ClientERNS_10DbResponseERNS_7MessageE+0x112) [0x10f8e6a22]
 mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x7EA) [0x10f8e336a]
 mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0xFF) [0x10f5ea64f]
 mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x27E) [0x10fe8489e]
 mongod(_ZNSt3__114__thread_proxyINS_5tupleIJNS_6__bindIPFPvS3_EJPN5mongo12_GLOBAL__N_124MessagingPortWithHandlerEEEEEEEEES3_S3_+0x61) [0x10fe84041]
 libsystem_pthread.dylib(_pthread_body+0x83) [0x7fff89192c13]
 libsystem_pthread.dylib(_pthread_body+0x0) [0x7fff89192b90]
 libsystem_pthread.dylib(thread_start+0xD) [0x7fff89190375]
-----  END BACKTRACE  -----

Full log file (verbosity 2) attached.



 Comments   
Comment by Githook User [ 04/Apr/16 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-22869 Guard against an already saved cursor in WT RandomCursor
Branch: master
https://github.com/mongodb/mongo/commit/4d24b36e82e5b2ddba32b30c5bc2499d635d1397

Comment by Githook User [ 01/Apr/16 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-22869 Guard against an already saved cursor in WT RandomCursor

(cherry picked from commit 4d24b36e82e5b2ddba32b30c5bc2499d635d1397)
Branch: v3.2
https://github.com/mongodb/mongo/commit/34c950be679717296ab8224c1a4dbc50d4d92a6f

Comment by Max Hirschhorn [ 26/Feb/16 ]

Running the script on a debug build gives the useful information that we are segfaulting when trying to close the _cursor member of the RandomCursor. By instrumenting the build with some logging statements in the RandomCursor methods, it appears we are calling

  1. RandomCursor::save()
  2. RandomCursor::detachToOperationContext()
  3. RandomCursor::reattachToOperationContext()
  4. RandomCursor::detachToOperationContext()

without calling RandomCursor::restore() between steps #3 and #4. According to the doc comments for the RecordCursor class, this is sequence of operations it legitimate because reattachToOperationContext() puts the cursor back in a "saved" state. The WiredTiger integration layer should probably handle this by guarding the _cursor->close(_cursor) call with if (_cursor) {...}. Additionally, it seems desirable to check the return value of the WiredTiger API call by doing invariantWTOK().

ASAN:SIGSEGV
=================================================================
==29816==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000090 (pc 0x00000638fe7f bp 0x7f5b81bd41f0 sp 0x7f5b81bd40e0 T18)
    #0 0x638fe7e in mongo::WiredTigerRecordStore::RandomCursor::detachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp:711:9
    #1 0x33025f0 in mongo::MultiIteratorStage::doDetachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/exec/multi_iterator.cpp:124:9
    #2 0x3397dc0 in mongo::PlanStage::detachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/exec/plan_stage.cpp:72:5
    #3 0x4ab013c in mongo::PlanExecutor::detachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/query/plan_executor.cpp:297:5
    #4 0x338d44a in mongo::PipelineProxyStage::doDetachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/exec/pipeline_proxy.cpp:107:9
    #5 0x3397dc0 in mongo::PlanStage::detachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/exec/plan_stage.cpp:72:5
    #6 0x4ab013c in mongo::PlanExecutor::detachFromOperationContext() /home/maxh/debugging/mongo-v3.2/src/mongo/db/query/plan_executor.cpp:297:5
    #7 0x2acedc9 in mongo::GetMoreCmd::run(mongo::OperationContext*, std::string const&, mongo::BSONObj&, int, std::string&, mongo::BSONObjBuilder&) /home/maxh/debugging/mongo-v3.2/src/mongo/db/commands/getmore_cmd.cpp:370:13
    #8 0x2fb4fec in mongo::Command::run(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/maxh/debugging/mongo-v3.2/src/mongo/db/dbcommands.cpp:1446:19
    #9 0x2fb03e2 in mongo::Command::execCommand(mongo::OperationContext*, mongo::Command*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/maxh/debugging/mongo-v3.2/src/mongo/db/dbcommands.cpp:1321:18
    #10 0x29393e2 in mongo::runCommands(mongo::OperationContext*, mongo::rpc::RequestInterface const&, mongo::rpc::ReplyBuilderInterface*) /home/maxh/debugging/mongo-v3.2/src/mongo/db/commands.cpp:498:9
    #11 0x3c05786 in mongo::(anonymous namespace)::receivedRpc(mongo::OperationContext*, mongo::Client&, mongo::DbResponse&, mongo::Message&) /home/maxh/debugging/mongo-v3.2/src/mongo/db/instance.cpp:304:9
    #12 0x3bf9ef0 in mongo::assembleResponse(mongo::OperationContext*, mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&) /home/maxh/debugging/mongo-v3.2/src/mongo/db/instance.cpp:525:9
    #13 0x1a25224 in mongo::MyMessageHandler::process(mongo::Message&, mongo::AbstractMessagingPort*) /home/maxh/debugging/mongo-v3.2/src/mongo/db/db.cpp:171:17
    #14 0x79e6f68 in mongo::PortMessageServer::handleIncomingMsg(void*) /home/maxh/debugging/mongo-v3.2/src/mongo/util/net/message_server_port.cpp:229:17
    #15 0x7f5b903ed181 in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
    #16 0x7f5b8ff0447c in clone /build/buildd/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111

CC geert.bosch

Comment by Thomas Rueckstiess [ 26/Feb/16 ]

collection stats of this collection:

MongoDB shell version: 3.2.3
connecting to: test
> use mongodb
switched to db mongodb
> db.fanclub2.stats()
{
	"ns" : "mongodb.fanclub2",
	"count" : 1000000,
	"size" : 395896766,
	"avgObjSize" : 395,
	"storageSize" : 204226560,
	"capped" : false,
	"wiredTiger" : {
		"metadata" : {
			"formatVersion" : 1
		},
		"creationString" : "allocation_size=4KB,app_metadata=(formatVersion=1),block_allocation=best,block_compressor=snappy,cache_resident=0,checksum=on,colgroups=,collator=,columns=,dictionary=0,encryption=(keyid=,name=),exclusive=0,extractor=,format=btree,huffman_key=,huffman_value=,immutable=0,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=64MB,log=(enabled=),lsm=(auto_throttle=,bloom=,bloom_bit_count=16,bloom_config=,bloom_hash_count=8,bloom_oldest=0,chunk_count_limit=0,chunk_max=5GB,chunk_size=10MB,merge_max=15,merge_min=0),memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,source=,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,type=file,value_format=u",
		"type" : "file",
		"uri" : "statistics:table:collection-2-3157750954705234093",
		"LSM" : {
			"bloom filters in the LSM tree" : 0,
			"bloom filter false positives" : 0,
			"bloom filter hits" : 0,
			"bloom filter misses" : 0,
			"bloom filter pages evicted from cache" : 0,
			"bloom filter pages read into cache" : 0,
			"total size of bloom filters" : 0,
			"sleep for LSM checkpoint throttle" : 0,
			"chunks in the LSM tree" : 0,
			"highest merge generation in the LSM tree" : 0,
			"queries that could have benefited from a Bloom filter that did not exist" : 0,
			"sleep for LSM merge throttle" : 0
		},
		"block-manager" : {
			"file allocation unit size" : 4096,
			"blocks allocated" : 0,
			"checkpoint size" : 203993088,
			"allocations requiring file extension" : 0,
			"blocks freed" : 0,
			"file magic number" : 120897,
			"file major version number" : 1,
			"minor version number" : 0,
			"file bytes available for reuse" : 229376,
			"file size in bytes" : 204226560
		},
		"btree" : {
			"btree checkpoint generation" : 0,
			"column-store variable-size deleted values" : 0,
			"column-store fixed-size leaf pages" : 0,
			"column-store internal pages" : 0,
			"column-store variable-size RLE encoded values" : 0,
			"column-store variable-size leaf pages" : 0,
			"pages rewritten by compaction" : 0,
			"number of key/value pairs" : 0,
			"fixed-record size" : 0,
			"maximum tree depth" : 0,
			"maximum internal page key size" : 368,
			"maximum internal page size" : 4096,
			"maximum leaf page key size" : 3276,
			"maximum leaf page size" : 32768,
			"maximum leaf page value size" : 67108864,
			"overflow pages" : 0,
			"row-store internal pages" : 0,
			"row-store leaf pages" : 0
		},
		"cache" : {
			"bytes read into cache" : 16570,
			"bytes written from cache" : 0,
			"checkpoint blocked page eviction" : 0,
			"unmodified pages evicted" : 0,
			"page split during eviction deepened the tree" : 0,
			"modified pages evicted" : 0,
			"data source pages selected for eviction unable to be evicted" : 0,
			"hazard pointer blocked page eviction" : 0,
			"internal pages evicted" : 0,
			"internal pages split during eviction" : 0,
			"leaf pages split during eviction" : 0,
			"in-memory page splits" : 0,
			"in-memory page passed criteria to be split" : 0,
			"overflow values cached in memory" : 0,
			"pages read into cache" : 3,
			"pages read into cache requiring lookaside entries" : 0,
			"overflow pages read into cache" : 0,
			"pages written from cache" : 0,
			"page written requiring lookaside records" : 0,
			"pages written requiring in-memory restoration" : 0
		},
		"compression" : {
			"raw compression call failed, no additional data available" : 0,
			"raw compression call failed, additional data available" : 0,
			"raw compression call succeeded" : 0,
			"compressed pages read" : 1,
			"compressed pages written" : 0,
			"page written failed to compress" : 0,
			"page written was too small to compress" : 0
		},
		"cursor" : {
			"create calls" : 1,
			"insert calls" : 0,
			"bulk-loaded cursor-insert calls" : 0,
			"cursor-insert key and value bytes inserted" : 0,
			"next calls" : 0,
			"prev calls" : 1,
			"remove calls" : 0,
			"cursor-remove key bytes removed" : 0,
			"reset calls" : 1,
			"restarted searches" : 0,
			"search calls" : 0,
			"search near calls" : 0,
			"truncate calls" : 0,
			"update calls" : 0,
			"cursor-update value bytes updated" : 0
		},
		"reconciliation" : {
			"dictionary matches" : 0,
			"internal page multi-block writes" : 0,
			"leaf page multi-block writes" : 0,
			"maximum blocks required for a page" : 0,
			"internal-page overflow keys" : 0,
			"leaf-page overflow keys" : 0,
			"overflow values written" : 0,
			"pages deleted" : 0,
			"fast-path pages deleted" : 0,
			"page checksum matches" : 0,
			"page reconciliation calls" : 0,
			"page reconciliation calls for eviction" : 0,
			"leaf page key bytes discarded using prefix compression" : 0,
			"internal page key bytes discarded using suffix compression" : 0
		},
		"session" : {
			"object compaction" : 0,
			"open cursor count" : 1
		},
		"transaction" : {
			"update conflicts" : 0
		}
	},
	"nindexes" : 1,
	"totalIndexSize" : 17842176,
	"indexSizes" : {
		"_id_" : 17842176
	},
	"ok" : 1
}

Generated at Thu Feb 08 04:01:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.