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

Segmentation fault when disabling monitoring

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 4.0.0
    • Fix Version/s: None
    • Component/s: Admin
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      I install MongoDB using:

      apt-get install --yes --force-yes mongodb-org=4.0.0 mongodb-org-server=4.0.0 mongodb-org-shell=4.0.0 mongodb-org-mongos=4.0.0 mongodb-org-tools=4.0.0
      

      I use the following config file:

      storage:
        dbPath: /var/lib/mongodb
         journal:
           enabled: true
      replication:
         replSetName: test
        oplogSizeMB: 512
      cloud:
         monitoring:
           free:
             state: off
      

      I run:

      /usr/bin/mongod --config /etc/mongod.conf --bind_ip 127.0.0.1
      

      And then in another terminal:

      echo 'rs.initiate(\{_id: "test", members: [{_id: 0, host: "127.0.0.1:27017"}]})' | mongo
      

      And after few seconds mongod process segfaults:

      2018-08-10T13:17:12.697+0000 I NETWORK [listener] connection accepted from 127.0.0.1:38836 #1 (1 connection now open)
      2018-08-10T13:17:12.715+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:38836 conn1: \{ application: { name: "MongoDB Shell" }, driver: \{ name: "MongoDB Internal Client", version: "4.0.0" }, os: \{ type: "Linux", name: "Ubuntu", architecture: "x86_64", version: "17.10" } }
      2018-08-10T13:17:12.720+0000 I REPL [conn1] replSetInitiate admin command received from client
      2018-08-10T13:17:12.720+0000 I REPL [conn1] replSetInitiate config object with 1 members parses ok
      2018-08-10T13:17:12.720+0000 I REPL [conn1] ******
      2018-08-10T13:17:12.720+0000 I REPL [conn1] creating replication oplog of size: 512MB...
      2018-08-10T13:17:12.720+0000 I STORAGE [conn1] createCollection: local.oplog.rs with generated UUID: e7bf3898-f072-477a-9819-0529e2288485
      2018-08-10T13:17:12.739+0000 I STORAGE [conn1] Starting WiredTigerRecordStoreThread local.oplog.rs
      2018-08-10T13:17:12.740+0000 I STORAGE [conn1] The size storer reports that the oplog contains 0 records totaling to 0 bytes
      2018-08-10T13:17:12.740+0000 I STORAGE [conn1] Scanning the oplog to determine where to place markers for truncation
      2018-08-10T13:17:12.787+0000 I REPL [conn1] ******
      2018-08-10T13:17:12.787+0000 I STORAGE [conn1] createCollection: local.system.replset with generated UUID: 94b8d372-4b4f-4d15-8308-bfbac6003876
      2018-08-10T13:17:12.917+0000 I STORAGE [conn1] createCollection: admin.system.version with provided UUID: 347368b4-bca5-4ac1-81c3-0495e9c9c589
      2018-08-10T13:17:12.961+0000 I COMMAND [conn1] setting featureCompatibilityVersion to 4.0
      2018-08-10T13:17:12.961+0000 I NETWORK [conn1] Skip closing connection for connection # 1
      2018-08-10T13:17:12.962+0000 I REPL [conn1] New replica set config in use: \{ _id: "test", version: 1, protocolVersion: 1, writeConcernMajorityJournalDefault: true, members: [ { _id: 0, host: "127.0.0.1:27017", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, tags: {}, slaveDelay: 0, votes: 1 } ], settings: \{ chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorModes: {}, getLastErrorDefaults: \{ w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5b6d905838a0f2fbe6d561a4') } }
      2018-08-10T13:17:12.962+0000 I REPL [conn1] This node is 127.0.0.1:27017 in the config
      2018-08-10T13:17:12.962+0000 I REPL [conn1] transition to STARTUP2 from STARTUP
      2018-08-10T13:17:12.962+0000 I REPL [conn1] Starting replication storage threads
      2018-08-10T13:17:12.963+0000 I REPL [conn1] transition to RECOVERING from STARTUP2
      2018-08-10T13:17:12.963+0000 I REPL [conn1] Starting replication fetcher thread
      2018-08-10T13:17:12.963+0000 I REPL [conn1] Starting replication applier thread
      2018-08-10T13:17:12.963+0000 I REPL [rsSync-0] Starting oplog application
      2018-08-10T13:17:12.964+0000 I REPL [rsSync-0] transition to SECONDARY from RECOVERING
      2018-08-10T13:17:12.964+0000 I REPL [rsSync-0] conducting a dry run election to see if we could be elected. current term: 0
      2018-08-10T13:17:12.964+0000 I REPL [conn1] Starting replication reporter thread
      2018-08-10T13:17:12.964+0000 I REPL [replexec-0] dry election run succeeded, running for election in term 1
      2018-08-10T13:17:12.964+0000 I COMMAND [conn1] command local.system.replset appName: "MongoDB Shell" command: replSetInitiate \{ replSetInitiate: { _id: "test", members: [ { _id: 0.0, host: "127.0.0.1:27017" } ] }, $clusterTime: \{ clusterTime: Timestamp(0, 0), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } }, $db: "admin" } numYields:0 reslen:163 locks:\{ Global: { acquireCount: { r: 15, w: 6, W: 2 }, acquireWaitCount: \{ W: 1 }, timeAcquiringMicros: \{ W: 99 } }, Database: \{ acquireCount: { r: 3, w: 3, W: 3 }, acquireWaitCount: \{ W: 1 }, timeAcquiringMicros: \{ W: 169 } }, Collection: \{ acquireCount: { r: 1, w: 2 } }, oplog: \{ acquireCount: { r: 2, w: 3 } } } protocol:op_msg 244ms
      2018-08-10T13:17:12.965+0000 I STORAGE [replexec-0] createCollection: local.replset.election with generated UUID: dd5b3a8d-5179-41c7-afa3-685a9dfe80fb
      2018-08-10T13:17:12.967+0000 I NETWORK [conn1] end connection 127.0.0.1:38836 (0 connections now open)
      2018-08-10T13:17:12.998+0000 I REPL [replexec-0] election succeeded, assuming primary role in term 1
      2018-08-10T13:17:12.998+0000 I REPL [replexec-0] transition to PRIMARY from SECONDARY
      2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Entering primary catch-up mode.
      2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Exited primary catch-up mode.
      2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Stopping replication producer
      2018-08-10T13:17:14.973+0000 I STORAGE [rsSync-0] createCollection: config.transactions with generated UUID: 7455137d-6dff-4bdd-a3ee-e5acd71902f4
      2018-08-10T13:17:15.016+0000 F - [rsSync-0] Invalid access at address: 0x18
      2018-08-10T13:17:15.040+0000 F - [rsSync-0] Got signal: 11 (Segmentation fault).
       0x5645cb1d7141 0x5645cb1d6359 0x5645cb1d69c6 0x7f08f65ed150 0x7f08f65e4120 0x5645c9cc21c0 0x5645c9cc249a 0x5645c9b10676 0x5645c9b13645 0x5645c9b55da9 0x5645c9bfd988 0x5645c9bfe459 0x5645c9beea76 0x5645caa5b513 0x5645caa5bbfb 0x5645ca9cdccc 0x5645ca9ce1cc 0x5645ca9cebb6 0x5645cb2e66f0 0x7f08f65e17fc 0x7f08f630eb5f
      ----- BEGIN BACKTRACE -----
      {"backtrace":[\{"b":"5645C8E5F000","o":"2378141","s":"_ZN5mongo15printStackTraceERSo"},\{"b":"5645C8E5F000","o":"2377359"},\{"b":"5645C8E5F000","o":"23779C6"},\{"b":"7F08F65DA000","o":"13150"},\{"b":"7F08F65DA000","o":"A120","s":"pthread_mutex_lock"},\{"b":"5645C8E5F000","o":"E631C0","s":"_ZN5mongo17FreeMonController8_enqueueESt10shared_ptrINS_14FreeMonMessageEE"},\{"b":"5645C8E5F000","o":"E6349A","s":"_ZN5mongo17FreeMonController27notifyOnTransitionToPrimaryEv"},\{"b":"5645C8E5F000","o":"CB1676","s":"_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl34_shardingOnTransitionToPrimaryHookEPNS_16OperationContextE"},\{"b":"5645C8E5F000","o":"CB4645","s":"_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl21onTransitionToPrimaryEPNS_16OperationContextEb"},\{"b":"5645C8E5F000","o":"CF6DA9","s":"_ZN5mongo4repl26ReplicationCoordinatorImpl19signalDrainCompleteEPNS_16OperationContextEx"},\{"b":"5645C8E5F000","o":"D9E988","s":"_ZN5mongo4repl8SyncTail17_oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorEPNS1_14OpQueueBatcherE"},\{"b":"5645C8E5F000","o":"D9F459","s":"_ZN5mongo4repl8SyncTail16oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorE"},\{"b":"5645C8E5F000","o":"D8FA76"},\{"b":"5645C8E5F000","o":"1BFC513","s":"_ZN5mongo8executor22ThreadPoolTaskExecutor11runCallbackESt10shared_ptrINS1_13CallbackStateEE"},\{"b":"5645C8E5F000","o":"1BFCBFB"},\{"b":"5645C8E5F000","o":"1B6ECCC","s":"_ZN5mongo10ThreadPool10_doOneTaskEPSt11unique_lockISt5mutexE"},\{"b":"5645C8E5F000","o":"1B6F1CC","s":"_ZN5mongo10ThreadPool13_consumeTasksEv"},\{"b":"5645C8E5F000","o":"1B6FBB6","s":"_ZN5mongo10ThreadPool17_workerThreadBodyEPS0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},\{"b":"5645C8E5F000","o":"24876F0"},\{"b":"7F08F65DA000","o":"77FC"},\{"b":"7F08F61FA000","o":"114B5F","s":"clone"}],"processInfo":\{ "mongodbVersion" : "4.0.0", "gitVersion" : "3b07af3d4f471ae89e8186d33bbb1d5259597d51", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "4.13.0-46-generic", "version" : "#51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018", "machine" : "x86_64" }, "somap" : [ \{ "b" : "5645C8E5F000", "elfType" : 3, "buildId" : "365C0577E1D4FD5CD19A9455CB05F9122B9CF331" }, \{ "b" : "7FFE38B41000", "elfType" : 3, "buildId" : "85112742819233E8773A49C1A8B1E0B59F0D55ED" }, \{ "b" : "7F08F7A35000", "path" : "/usr/lib/x86_64-linux-gnu/libcurl.so.4", "elfType" : 3, "buildId" : "FF8668EB80EAC8C37F356B09A1A52E275B818741" }, \{ "b" : "7F08F781B000", "path" : "/lib/x86_64-linux-gnu/libresolv.so.2", "elfType" : 3, "buildId" : "793D80D2FB831260D2C060EE9FE010F1F54B2FA7" }, \{ "b" : "7F08F73DA000", "path" : "/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "FE3FE495817AB21A090C30422B67DF0D1545FEF5" }, \{ "b" : "7F08F7172000", "path" : "/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "4969D34EA4F2834BF11A5F392F0CACE7404ACE3B" }, \{ "b" : "7F08F6F6E000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "253D1504E3754DBEEAD73C9A228AE32A94295346" }, \{ "b" : "7F08F6D66000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "50D462FD65BCDA64362042629DDDB5797D62CD8C" }, \{ "b" : "7F08F6A10000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "1DDA3E9065743CB595C0631D3B2904C3BDBA61BE" }, \{ "b" : "7F08F67F9000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "69C6E15D63392AC94EED3AF9166A3E66384C52A7" }, \{ "b" : "7F08F65DA000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "B95ECB6ECE407081730183E686FF6CF2E0BCE4F6" }, \{ "b" : "7F08F61FA000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "DDCC13122DDBFE5E5EF77D4EBE66D124AE5762C2" }, \{ "b" : "7F08F7CA9000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "062A501C2424933DB1423223D1316D90E92F8FBB" }, \{ "b" : "7F08F5FAD000", "path" : "/usr/lib/x86_64-linux-gnu/libidn2.so.0", "elfType" : 3, "buildId" : "DEAB2CED753CF2D990E0F554494FCE76A686332E" }, \{ "b" : "7F08F5D91000", "path" : "/usr/lib/x86_64-linux-gnu/librtmp.so.1", "elfType" : 3, "buildId" : "69465D8AA6B19086ABF2455A703F9168BF82A69F" }, \{ "b" : "7F08F5B83000", "path" : "/usr/lib/x86_64-linux-gnu/libpsl.so.5", "elfType" : 3, "buildId" : "DA15144F16049658AA6C90F145528B4645A632B6" }, \{ "b" : "7F08F5939000", "path" : "/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "6CB14DA7DD55C172C735A2061EDD2EA40F0EA6D5" }, \{ "b" : "7F08F56E7000", "path" : "/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2", "elfType" : 3, "buildId" : "0CDDF9D1F87FE7FF07D73DBE1D7CB57EE5BA802C" }, \{ "b" : "7F08F54D9000", "path" : "/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2", "elfType" : 3, "buildId" : "DD2893FC0AA3C58798F805D4C88EE086564D2EEB" }, \{ "b" : "7F08F52BC000", "path" : "/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" : "EF3E006DFE3132A41D4D4DC0E407D6EA658E11C4" }, \{ "b" : "7F08F4FA6000", "path" : "/usr/lib/x86_64-linux-gnu/libunistring.so.0", "elfType" : 3, "buildId" : "7873D8CE19D76E2F9C788EF5804909B01EEB990E" }, \{ "b" : "7F08F4C14000", "path" : "/usr/lib/x86_64-linux-gnu/libgnutls.so.30", "elfType" : 3, "buildId" : "35FFF21DA6A3A6FF7453EA3C11777E3963087E02" }, \{ "b" : "7F08F49E1000", "path" : "/usr/lib/x86_64-linux-gnu/libhogweed.so.4", "elfType" : 3, "buildId" : "B703B11D407FE3C27F9AC1778D08A0FC93ACBDB2" }, \{ "b" : "7F08F47AC000", "path" : "/usr/lib/x86_64-linux-gnu/libnettle.so.6", "elfType" : 3, "buildId" : "05786A87201E978D4CEC57CA86AFDCBC7542C52C" }, \{ "b" : "7F08F452C000", "path" : "/usr/lib/x86_64-linux-gnu/libgmp.so.10", "elfType" : 3, "buildId" : "D741CA2B0259B812E7D2B7B3E09CAC4E8F3A66F5" }, \{ "b" : "7F08F4259000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5.so.3", "elfType" : 3, "buildId" : "9AC03ABAFBAE8A545DB92741256A10CF7F3BA9D5" }, \{ "b" : "7F08F4027000", "path" : "/usr/lib/x86_64-linux-gnu/libk5crypto.so.3", "elfType" : 3, "buildId" : "D784197504B255E39FA3C80830B27678C4C8340D" }, \{ "b" : "7F08F3E23000", "path" : "/lib/x86_64-linux-gnu/libcom_err.so.2", "elfType" : 3, "buildId" : "02C82134CECECEA4CEE3975F8F4727E49EC768D2" }, \{ "b" : "7F08F3C18000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5support.so.0", "elfType" : 3, "buildId" : "32CD6A0262A8FB7ED578A2CCA8C580BC527A478E" }, \{ "b" : "7F08F39FD000", "path" : "/usr/lib/x86_64-linux-gnu/libsasl2.so.2", "elfType" : 3, "buildId" : "ADFFDB475645009FD490ADA25D423572E700B65F" }, \{ "b" : "7F08F37BC000", "path" : "/usr/lib/x86_64-linux-gnu/libgssapi.so.3", "elfType" : 3, "buildId" : "55B83B63860451B29C508159527306DA8C0B34E6" }, \{ "b" : "7F08F348C000", "path" : "/usr/lib/x86_64-linux-gnu/libp11-kit.so.0", "elfType" : 3, "buildId" : "E3FCD84D21EE3A50921F5B2DDDB452F1A3668757" }, \{ "b" : "7F08F3259000", "path" : "/lib/x86_64-linux-gnu/libidn.so.11", "elfType" : 3, "buildId" : "046C25C9FC4E8CB4BC0D6569FBA5414A0326347D" }, \{ "b" : "7F08F3046000", "path" : "/usr/lib/x86_64-linux-gnu/libtasn1.so.6", "elfType" : 3, "buildId" : "CC00AB0C2F567CECCB49A9D849E1AF58663EEF19" }, \{ "b" : "7F08F2E42000", "path" : "/lib/x86_64-linux-gnu/libkeyutils.so.1", "elfType" : 3, "buildId" : "1968B15C1C4622D0CAA9C3C57474FF6DED061448" }, \{ "b" : "7F08F2C39000", "path" : "/usr/lib/x86_64-linux-gnu/libheimntlm.so.0", "elfType" : 3, "buildId" : "2374FD3D7204E1D12D70B18623D351BD9948ED20" }, \{ "b" : "7F08F29AD000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5.so.26", "elfType" : 3, "buildId" : "A8C3AE6494FEF5DB5F94E9337BCB1C2A5838334C" }, \{ "b" : "7F08F270B000", "path" : "/usr/lib/x86_64-linux-gnu/libasn1.so.8", "elfType" : 3, "buildId" : "6F40ED09E97408B09C07D887309A38244D44C198" }, \{ "b" : "7F08F24D5000", "path" : "/usr/lib/x86_64-linux-gnu/libhcrypto.so.4", "elfType" : 3, "buildId" : "D8AD2BB37C00294CD609BA5D3987C19884B60E5B" }, \{ "b" : "7F08F22BF000", "path" : "/usr/lib/x86_64-linux-gnu/libroken.so.18", "elfType" : 3, "buildId" : "7BF8533C15F9DA006FCAB139EA5B1830A68E134D" }, \{ "b" : "7F08F20B7000", "path" : "/usr/lib/x86_64-linux-gnu/libffi.so.6", "elfType" : 3, "buildId" : "630AE09C6C5A0B17A5AB5CC36165BEA4C36D03F4" }, \{ "b" : "7F08F1E8E000", "path" : "/usr/lib/x86_64-linux-gnu/libwind.so.0", "elfType" : 3, "buildId" : "6DAA2BB2B0349161340ADBC437AA9B1392EA3237" }, \{ "b" : "7F08F1C7F000", "path" : "/usr/lib/x86_64-linux-gnu/libheimbase.so.1", "elfType" : 3, "buildId" : "16F6CA328B030C6DA81DDC90F265B3B86B98B01B" }, \{ "b" : "7F08F1A35000", "path" : "/usr/lib/x86_64-linux-gnu/libhx509.so.5", "elfType" : 3, "buildId" : "8EBE88454CF8E433E91D6AD8F0EBF619AC9656EC" }, \{ "b" : "7F08F172D000", "path" : "/usr/lib/x86_64-linux-gnu/libsqlite3.so.0", "elfType" : 3, "buildId" : "5007782EEE5265D28F88D6FBF5ABE4A866E5912C" }, \{ "b" : "7F08F14F5000", "path" : "/lib/x86_64-linux-gnu/libcrypt.so.1", "elfType" : 3, "buildId" : "718C9EC7C3640AFBC7340DD3A4AB3A706358B4BD" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x5645cb1d7141]
       mongod(+0x2377359) [0x5645cb1d6359]
       mongod(+0x23779C6) [0x5645cb1d69c6]
       libpthread.so.0(+0x13150) [0x7f08f65ed150]
       libpthread.so.0(pthread_mutex_lock+0x0) [0x7f08f65e4120]
       mongod(_ZN5mongo17FreeMonController8_enqueueESt10shared_ptrINS_14FreeMonMessageEE+0x40) [0x5645c9cc21c0]
       mongod(_ZN5mongo17FreeMonController27notifyOnTransitionToPrimaryEv+0x8A) [0x5645c9cc249a]
       mongod(_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl34_shardingOnTransitionToPrimaryHookEPNS_16OperationContextE+0x2C6) [0x5645c9b10676]
       mongod(_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl21onTransitionToPrimaryEPNS_16OperationContextEb+0xF5) [0x5645c9b13645]
       mongod(_ZN5mongo4repl26ReplicationCoordinatorImpl19signalDrainCompleteEPNS_16OperationContextEx+0x1D9) [0x5645c9b55da9]
       mongod(_ZN5mongo4repl8SyncTail17_oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorEPNS1_14OpQueueBatcherE+0xC48) [0x5645c9bfd988]
       mongod(_ZN5mongo4repl8SyncTail16oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorE+0x189) [0x5645c9bfe459]
       mongod(+0xD8FA76) [0x5645c9beea76]
       mongod(_ZN5mongo8executor22ThreadPoolTaskExecutor11runCallbackESt10shared_ptrINS1_13CallbackStateEE+0x1B3) [0x5645caa5b513]
       mongod(+0x1BFCBFB) [0x5645caa5bbfb]
       mongod(_ZN5mongo10ThreadPool10_doOneTaskEPSt11unique_lockISt5mutexE+0x14C) [0x5645ca9cdccc]
       mongod(_ZN5mongo10ThreadPool13_consumeTasksEv+0xBC) [0x5645ca9ce1cc]
       mongod(_ZN5mongo10ThreadPool17_workerThreadBodyEPS0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x96) [0x5645ca9cebb6]
       mongod(+0x24876F0) [0x5645cb2e66f0]
       libpthread.so.0(+0x77FC) [0x7f08f65e17fc]
       libc.so.6(clone+0x3F) [0x7f08f630eb5f]
      ----- END BACKTRACE -----
      Segmentation fault (core dumped)
      

       

      Show
      I install MongoDB using: apt-get install --yes --force-yes mongodb-org=4.0.0 mongodb-org-server=4.0.0 mongodb-org-shell=4.0.0 mongodb-org-mongos=4.0.0 mongodb-org-tools=4.0.0 I use the following config file: storage:   dbPath: /var/lib/mongodb    journal:      enabled: true replication:    replSetName: test   oplogSizeMB: 512 cloud:    monitoring:      free:        state: off I run: /usr/bin/mongod --config /etc/mongod.conf --bind_ip 127.0.0.1 And then in another terminal: echo 'rs.initiate(\{_id: "test", members: [{_id: 0, host: "127.0.0.1:27017"}]})' | mongo And after few seconds mongod process segfaults: 2018-08-10T13:17:12.697+0000 I NETWORK [listener] connection accepted from 127.0.0.1:38836 #1 (1 connection now open) 2018-08-10T13:17:12.715+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:38836 conn1: \{ application: { name: "MongoDB Shell" }, driver: \{ name: "MongoDB Internal Client", version: "4.0.0" }, os: \{ type: "Linux", name: "Ubuntu", architecture: "x86_64", version: "17.10" } } 2018-08-10T13:17:12.720+0000 I REPL [conn1] replSetInitiate admin command received from client 2018-08-10T13:17:12.720+0000 I REPL [conn1] replSetInitiate config object with 1 members parses ok 2018-08-10T13:17:12.720+0000 I REPL [conn1] ****** 2018-08-10T13:17:12.720+0000 I REPL [conn1] creating replication oplog of size: 512MB... 2018-08-10T13:17:12.720+0000 I STORAGE [conn1] createCollection: local.oplog.rs with generated UUID: e7bf3898-f072-477a-9819-0529e2288485 2018-08-10T13:17:12.739+0000 I STORAGE [conn1] Starting WiredTigerRecordStoreThread local.oplog.rs 2018-08-10T13:17:12.740+0000 I STORAGE [conn1] The size storer reports that the oplog contains 0 records totaling to 0 bytes 2018-08-10T13:17:12.740+0000 I STORAGE [conn1] Scanning the oplog to determine where to place markers for truncation 2018-08-10T13:17:12.787+0000 I REPL [conn1] ****** 2018-08-10T13:17:12.787+0000 I STORAGE [conn1] createCollection: local.system.replset with generated UUID: 94b8d372-4b4f-4d15-8308-bfbac6003876 2018-08-10T13:17:12.917+0000 I STORAGE [conn1] createCollection: admin.system.version with provided UUID: 347368b4-bca5-4ac1-81c3-0495e9c9c589 2018-08-10T13:17:12.961+0000 I COMMAND [conn1] setting featureCompatibilityVersion to 4.0 2018-08-10T13:17:12.961+0000 I NETWORK [conn1] Skip closing connection for connection # 1 2018-08-10T13:17:12.962+0000 I REPL [conn1] New replica set config in use: \{ _id: "test", version: 1, protocolVersion: 1, writeConcernMajorityJournalDefault: true, members: [ { _id: 0, host: "127.0.0.1:27017", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, tags: {}, slaveDelay: 0, votes: 1 } ], settings: \{ chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorModes: {}, getLastErrorDefaults: \{ w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5b6d905838a0f2fbe6d561a4') } } 2018-08-10T13:17:12.962+0000 I REPL [conn1] This node is 127.0.0.1:27017 in the config 2018-08-10T13:17:12.962+0000 I REPL [conn1] transition to STARTUP2 from STARTUP 2018-08-10T13:17:12.962+0000 I REPL [conn1] Starting replication storage threads 2018-08-10T13:17:12.963+0000 I REPL [conn1] transition to RECOVERING from STARTUP2 2018-08-10T13:17:12.963+0000 I REPL [conn1] Starting replication fetcher thread 2018-08-10T13:17:12.963+0000 I REPL [conn1] Starting replication applier thread 2018-08-10T13:17:12.963+0000 I REPL [rsSync-0] Starting oplog application 2018-08-10T13:17:12.964+0000 I REPL [rsSync-0] transition to SECONDARY from RECOVERING 2018-08-10T13:17:12.964+0000 I REPL [rsSync-0] conducting a dry run election to see if we could be elected. current term: 0 2018-08-10T13:17:12.964+0000 I REPL [conn1] Starting replication reporter thread 2018-08-10T13:17:12.964+0000 I REPL [replexec-0] dry election run succeeded, running for election in term 1 2018-08-10T13:17:12.964+0000 I COMMAND [conn1] command local.system.replset appName: "MongoDB Shell" command: replSetInitiate \{ replSetInitiate: { _id: "test", members: [ { _id: 0.0, host: "127.0.0.1:27017" } ] }, $clusterTime: \{ clusterTime: Timestamp(0, 0), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } }, $db: "admin" } numYields:0 reslen:163 locks:\{ Global: { acquireCount: { r: 15, w: 6, W: 2 }, acquireWaitCount: \{ W: 1 }, timeAcquiringMicros: \{ W: 99 } }, Database: \{ acquireCount: { r: 3, w: 3, W: 3 }, acquireWaitCount: \{ W: 1 }, timeAcquiringMicros: \{ W: 169 } }, Collection: \{ acquireCount: { r: 1, w: 2 } }, oplog: \{ acquireCount: { r: 2, w: 3 } } } protocol:op_msg 244ms 2018-08-10T13:17:12.965+0000 I STORAGE [replexec-0] createCollection: local.replset.election with generated UUID: dd5b3a8d-5179-41c7-afa3-685a9dfe80fb 2018-08-10T13:17:12.967+0000 I NETWORK [conn1] end connection 127.0.0.1:38836 (0 connections now open) 2018-08-10T13:17:12.998+0000 I REPL [replexec-0] election succeeded, assuming primary role in term 1 2018-08-10T13:17:12.998+0000 I REPL [replexec-0] transition to PRIMARY from SECONDARY 2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Entering primary catch-up mode. 2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Exited primary catch-up mode. 2018-08-10T13:17:12.998+0000 I REPL [replexec-0] Stopping replication producer 2018-08-10T13:17:14.973+0000 I STORAGE [rsSync-0] createCollection: config.transactions with generated UUID: 7455137d-6dff-4bdd-a3ee-e5acd71902f4 2018-08-10T13:17:15.016+0000 F - [rsSync-0] Invalid access at address: 0x18 2018-08-10T13:17:15.040+0000 F - [rsSync-0] Got signal: 11 (Segmentation fault). 0x5645cb1d7141 0x5645cb1d6359 0x5645cb1d69c6 0x7f08f65ed150 0x7f08f65e4120 0x5645c9cc21c0 0x5645c9cc249a 0x5645c9b10676 0x5645c9b13645 0x5645c9b55da9 0x5645c9bfd988 0x5645c9bfe459 0x5645c9beea76 0x5645caa5b513 0x5645caa5bbfb 0x5645ca9cdccc 0x5645ca9ce1cc 0x5645ca9cebb6 0x5645cb2e66f0 0x7f08f65e17fc 0x7f08f630eb5f ----- BEGIN BACKTRACE ----- {"backtrace":[\{"b":"5645C8E5F000","o":"2378141","s":"_ZN5mongo15printStackTraceERSo"},\{"b":"5645C8E5F000","o":"2377359"},\{"b":"5645C8E5F000","o":"23779C6"},\{"b":"7F08F65DA000","o":"13150"},\{"b":"7F08F65DA000","o":"A120","s":"pthread_mutex_lock"},\{"b":"5645C8E5F000","o":"E631C0","s":"_ZN5mongo17FreeMonController8_enqueueESt10shared_ptrINS_14FreeMonMessageEE"},\{"b":"5645C8E5F000","o":"E6349A","s":"_ZN5mongo17FreeMonController27notifyOnTransitionToPrimaryEv"},\{"b":"5645C8E5F000","o":"CB1676","s":"_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl34_shardingOnTransitionToPrimaryHookEPNS_16OperationContextE"},\{"b":"5645C8E5F000","o":"CB4645","s":"_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl21onTransitionToPrimaryEPNS_16OperationContextEb"},\{"b":"5645C8E5F000","o":"CF6DA9","s":"_ZN5mongo4repl26ReplicationCoordinatorImpl19signalDrainCompleteEPNS_16OperationContextEx"},\{"b":"5645C8E5F000","o":"D9E988","s":"_ZN5mongo4repl8SyncTail17_oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorEPNS1_14OpQueueBatcherE"},\{"b":"5645C8E5F000","o":"D9F459","s":"_ZN5mongo4repl8SyncTail16oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorE"},\{"b":"5645C8E5F000","o":"D8FA76"},\{"b":"5645C8E5F000","o":"1BFC513","s":"_ZN5mongo8executor22ThreadPoolTaskExecutor11runCallbackESt10shared_ptrINS1_13CallbackStateEE"},\{"b":"5645C8E5F000","o":"1BFCBFB"},\{"b":"5645C8E5F000","o":"1B6ECCC","s":"_ZN5mongo10ThreadPool10_doOneTaskEPSt11unique_lockISt5mutexE"},\{"b":"5645C8E5F000","o":"1B6F1CC","s":"_ZN5mongo10ThreadPool13_consumeTasksEv"},\{"b":"5645C8E5F000","o":"1B6FBB6","s":"_ZN5mongo10ThreadPool17_workerThreadBodyEPS0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},\{"b":"5645C8E5F000","o":"24876F0"},\{"b":"7F08F65DA000","o":"77FC"},\{"b":"7F08F61FA000","o":"114B5F","s":"clone"}],"processInfo":\{ "mongodbVersion" : "4.0.0", "gitVersion" : "3b07af3d4f471ae89e8186d33bbb1d5259597d51", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "4.13.0-46-generic", "version" : "#51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018", "machine" : "x86_64" }, "somap" : [ \{ "b" : "5645C8E5F000", "elfType" : 3, "buildId" : "365C0577E1D4FD5CD19A9455CB05F9122B9CF331" }, \{ "b" : "7FFE38B41000", "elfType" : 3, "buildId" : "85112742819233E8773A49C1A8B1E0B59F0D55ED" }, \{ "b" : "7F08F7A35000", "path" : "/usr/lib/x86_64-linux-gnu/libcurl.so.4", "elfType" : 3, "buildId" : "FF8668EB80EAC8C37F356B09A1A52E275B818741" }, \{ "b" : "7F08F781B000", "path" : "/lib/x86_64-linux-gnu/libresolv.so.2", "elfType" : 3, "buildId" : "793D80D2FB831260D2C060EE9FE010F1F54B2FA7" }, \{ "b" : "7F08F73DA000", "path" : "/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "FE3FE495817AB21A090C30422B67DF0D1545FEF5" }, \{ "b" : "7F08F7172000", "path" : "/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "4969D34EA4F2834BF11A5F392F0CACE7404ACE3B" }, \{ "b" : "7F08F6F6E000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "253D1504E3754DBEEAD73C9A228AE32A94295346" }, \{ "b" : "7F08F6D66000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "50D462FD65BCDA64362042629DDDB5797D62CD8C" }, \{ "b" : "7F08F6A10000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "1DDA3E9065743CB595C0631D3B2904C3BDBA61BE" }, \{ "b" : "7F08F67F9000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "69C6E15D63392AC94EED3AF9166A3E66384C52A7" }, \{ "b" : "7F08F65DA000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "B95ECB6ECE407081730183E686FF6CF2E0BCE4F6" }, \{ "b" : "7F08F61FA000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "DDCC13122DDBFE5E5EF77D4EBE66D124AE5762C2" }, \{ "b" : "7F08F7CA9000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "062A501C2424933DB1423223D1316D90E92F8FBB" }, \{ "b" : "7F08F5FAD000", "path" : "/usr/lib/x86_64-linux-gnu/libidn2.so.0", "elfType" : 3, "buildId" : "DEAB2CED753CF2D990E0F554494FCE76A686332E" }, \{ "b" : "7F08F5D91000", "path" : "/usr/lib/x86_64-linux-gnu/librtmp.so.1", "elfType" : 3, "buildId" : "69465D8AA6B19086ABF2455A703F9168BF82A69F" }, \{ "b" : "7F08F5B83000", "path" : "/usr/lib/x86_64-linux-gnu/libpsl.so.5", "elfType" : 3, "buildId" : "DA15144F16049658AA6C90F145528B4645A632B6" }, \{ "b" : "7F08F5939000", "path" : "/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "6CB14DA7DD55C172C735A2061EDD2EA40F0EA6D5" }, \{ "b" : "7F08F56E7000", "path" : "/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2", "elfType" : 3, "buildId" : "0CDDF9D1F87FE7FF07D73DBE1D7CB57EE5BA802C" }, \{ "b" : "7F08F54D9000", "path" : "/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2", "elfType" : 3, "buildId" : "DD2893FC0AA3C58798F805D4C88EE086564D2EEB" }, \{ "b" : "7F08F52BC000", "path" : "/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" : "EF3E006DFE3132A41D4D4DC0E407D6EA658E11C4" }, \{ "b" : "7F08F4FA6000", "path" : "/usr/lib/x86_64-linux-gnu/libunistring.so.0", "elfType" : 3, "buildId" : "7873D8CE19D76E2F9C788EF5804909B01EEB990E" }, \{ "b" : "7F08F4C14000", "path" : "/usr/lib/x86_64-linux-gnu/libgnutls.so.30", "elfType" : 3, "buildId" : "35FFF21DA6A3A6FF7453EA3C11777E3963087E02" }, \{ "b" : "7F08F49E1000", "path" : "/usr/lib/x86_64-linux-gnu/libhogweed.so.4", "elfType" : 3, "buildId" : "B703B11D407FE3C27F9AC1778D08A0FC93ACBDB2" }, \{ "b" : "7F08F47AC000", "path" : "/usr/lib/x86_64-linux-gnu/libnettle.so.6", "elfType" : 3, "buildId" : "05786A87201E978D4CEC57CA86AFDCBC7542C52C" }, \{ "b" : "7F08F452C000", "path" : "/usr/lib/x86_64-linux-gnu/libgmp.so.10", "elfType" : 3, "buildId" : "D741CA2B0259B812E7D2B7B3E09CAC4E8F3A66F5" }, \{ "b" : "7F08F4259000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5.so.3", "elfType" : 3, "buildId" : "9AC03ABAFBAE8A545DB92741256A10CF7F3BA9D5" }, \{ "b" : "7F08F4027000", "path" : "/usr/lib/x86_64-linux-gnu/libk5crypto.so.3", "elfType" : 3, "buildId" : "D784197504B255E39FA3C80830B27678C4C8340D" }, \{ "b" : "7F08F3E23000", "path" : "/lib/x86_64-linux-gnu/libcom_err.so.2", "elfType" : 3, "buildId" : "02C82134CECECEA4CEE3975F8F4727E49EC768D2" }, \{ "b" : "7F08F3C18000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5support.so.0", "elfType" : 3, "buildId" : "32CD6A0262A8FB7ED578A2CCA8C580BC527A478E" }, \{ "b" : "7F08F39FD000", "path" : "/usr/lib/x86_64-linux-gnu/libsasl2.so.2", "elfType" : 3, "buildId" : "ADFFDB475645009FD490ADA25D423572E700B65F" }, \{ "b" : "7F08F37BC000", "path" : "/usr/lib/x86_64-linux-gnu/libgssapi.so.3", "elfType" : 3, "buildId" : "55B83B63860451B29C508159527306DA8C0B34E6" }, \{ "b" : "7F08F348C000", "path" : "/usr/lib/x86_64-linux-gnu/libp11-kit.so.0", "elfType" : 3, "buildId" : "E3FCD84D21EE3A50921F5B2DDDB452F1A3668757" }, \{ "b" : "7F08F3259000", "path" : "/lib/x86_64-linux-gnu/libidn.so.11", "elfType" : 3, "buildId" : "046C25C9FC4E8CB4BC0D6569FBA5414A0326347D" }, \{ "b" : "7F08F3046000", "path" : "/usr/lib/x86_64-linux-gnu/libtasn1.so.6", "elfType" : 3, "buildId" : "CC00AB0C2F567CECCB49A9D849E1AF58663EEF19" }, \{ "b" : "7F08F2E42000", "path" : "/lib/x86_64-linux-gnu/libkeyutils.so.1", "elfType" : 3, "buildId" : "1968B15C1C4622D0CAA9C3C57474FF6DED061448" }, \{ "b" : "7F08F2C39000", "path" : "/usr/lib/x86_64-linux-gnu/libheimntlm.so.0", "elfType" : 3, "buildId" : "2374FD3D7204E1D12D70B18623D351BD9948ED20" }, \{ "b" : "7F08F29AD000", "path" : "/usr/lib/x86_64-linux-gnu/libkrb5.so.26", "elfType" : 3, "buildId" : "A8C3AE6494FEF5DB5F94E9337BCB1C2A5838334C" }, \{ "b" : "7F08F270B000", "path" : "/usr/lib/x86_64-linux-gnu/libasn1.so.8", "elfType" : 3, "buildId" : "6F40ED09E97408B09C07D887309A38244D44C198" }, \{ "b" : "7F08F24D5000", "path" : "/usr/lib/x86_64-linux-gnu/libhcrypto.so.4", "elfType" : 3, "buildId" : "D8AD2BB37C00294CD609BA5D3987C19884B60E5B" }, \{ "b" : "7F08F22BF000", "path" : "/usr/lib/x86_64-linux-gnu/libroken.so.18", "elfType" : 3, "buildId" : "7BF8533C15F9DA006FCAB139EA5B1830A68E134D" }, \{ "b" : "7F08F20B7000", "path" : "/usr/lib/x86_64-linux-gnu/libffi.so.6", "elfType" : 3, "buildId" : "630AE09C6C5A0B17A5AB5CC36165BEA4C36D03F4" }, \{ "b" : "7F08F1E8E000", "path" : "/usr/lib/x86_64-linux-gnu/libwind.so.0", "elfType" : 3, "buildId" : "6DAA2BB2B0349161340ADBC437AA9B1392EA3237" }, \{ "b" : "7F08F1C7F000", "path" : "/usr/lib/x86_64-linux-gnu/libheimbase.so.1", "elfType" : 3, "buildId" : "16F6CA328B030C6DA81DDC90F265B3B86B98B01B" }, \{ "b" : "7F08F1A35000", "path" : "/usr/lib/x86_64-linux-gnu/libhx509.so.5", "elfType" : 3, "buildId" : "8EBE88454CF8E433E91D6AD8F0EBF619AC9656EC" }, \{ "b" : "7F08F172D000", "path" : "/usr/lib/x86_64-linux-gnu/libsqlite3.so.0", "elfType" : 3, "buildId" : "5007782EEE5265D28F88D6FBF5ABE4A866E5912C" }, \{ "b" : "7F08F14F5000", "path" : "/lib/x86_64-linux-gnu/libcrypt.so.1", "elfType" : 3, "buildId" : "718C9EC7C3640AFBC7340DD3A4AB3A706358B4BD" } ] }} mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x5645cb1d7141] mongod(+0x2377359) [0x5645cb1d6359] mongod(+0x23779C6) [0x5645cb1d69c6] libpthread.so.0(+0x13150) [0x7f08f65ed150] libpthread.so.0(pthread_mutex_lock+0x0) [0x7f08f65e4120] mongod(_ZN5mongo17FreeMonController8_enqueueESt10shared_ptrINS_14FreeMonMessageEE+0x40) [0x5645c9cc21c0] mongod(_ZN5mongo17FreeMonController27notifyOnTransitionToPrimaryEv+0x8A) [0x5645c9cc249a] mongod(_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl34_shardingOnTransitionToPrimaryHookEPNS_16OperationContextE+0x2C6) [0x5645c9b10676] mongod(_ZN5mongo4repl39ReplicationCoordinatorExternalStateImpl21onTransitionToPrimaryEPNS_16OperationContextEb+0xF5) [0x5645c9b13645] mongod(_ZN5mongo4repl26ReplicationCoordinatorImpl19signalDrainCompleteEPNS_16OperationContextEx+0x1D9) [0x5645c9b55da9] mongod(_ZN5mongo4repl8SyncTail17_oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorEPNS1_14OpQueueBatcherE+0xC48) [0x5645c9bfd988] mongod(_ZN5mongo4repl8SyncTail16oplogApplicationEPNS0_11OplogBufferEPNS0_22ReplicationCoordinatorE+0x189) [0x5645c9bfe459] mongod(+0xD8FA76) [0x5645c9beea76] mongod(_ZN5mongo8executor22ThreadPoolTaskExecutor11runCallbackESt10shared_ptrINS1_13CallbackStateEE+0x1B3) [0x5645caa5b513] mongod(+0x1BFCBFB) [0x5645caa5bbfb] mongod(_ZN5mongo10ThreadPool10_doOneTaskEPSt11unique_lockISt5mutexE+0x14C) [0x5645ca9cdccc] mongod(_ZN5mongo10ThreadPool13_consumeTasksEv+0xBC) [0x5645ca9ce1cc] mongod(_ZN5mongo10ThreadPool17_workerThreadBodyEPS0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x96) [0x5645ca9cebb6] mongod(+0x24876F0) [0x5645cb2e66f0] libpthread.so.0(+0x77FC) [0x7f08f65e17fc] libc.so.6(clone+0x3F) [0x7f08f630eb5f] ----- END BACKTRACE ----- Segmentation fault (core dumped)  

      Description

      It seems I cannot disable free monitoring without getting mongod to segfault.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: