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

replSetInitiate hangs when running in queryableBackupMode mode instead of returning an error

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.5
    • Component/s: Replication
    • Labels:
      None
    • ALL

      yaml file:

      storage:
          queryableBackupMode: true
      

      mongod parameters:

      mongod -f config.yml --replSet s0
      

      shell command:

      rs.initiate()
      

      full logs:

      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] MongoDB starting : pid=4818 port=27017 dbpath=/data/db 64-bit host=ren-desktop
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] db version v3.3.5-29-g821c605
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] git version: 821c605f9aff83958e1c584a82d691b725e9adb6
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] allocator: tcmalloc
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] modules: none
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] build environment:
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten]     distarch: x86_64
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten]     target_arch: x86_64
      2016-04-26T16:47:22.939-0400 I CONTROL  [initandlisten] options: { config: "config.yml", replication: { replSet: "s0" }, storage: { queryableBackupMode: true } }
      2016-04-26T16:47:22.957-0400 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
      2016-04-26T16:47:22.957-0400 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=15538M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),readonly=true,
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] 
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.3.5-29-g821c605) of MongoDB.
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] **       Not recommended for production.
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] 
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] 
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2016-04-26T16:47:23.009-0400 I CONTROL  [initandlisten] 
      2016-04-26T16:47:23.015-0400 I NETWORK  [initandlisten] waiting for connections on port 27017
      2016-04-26T16:47:23.015-0400 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
      2016-04-26T16:47:32.008-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:49855 #1 (1 connection now open)
      2016-04-26T16:47:37.655-0400 I COMMAND  [conn1] initiate : no configuration specified. Using a default configuration for the set
      2016-04-26T16:47:37.655-0400 I COMMAND  [conn1] created this configuration for initiation : { _id: "s0", version: 1, members: [ { _id: 0, host: "ren-desktop:27017" } ] }
      2016-04-26T16:47:37.655-0400 I REPL     [conn1] replSetInitiate admin command received from client
      

      Based on the gdb stacktrace, it looks like it is waiting here:
      https://github.com/mongodb/mongo/blob/r3.3.5/src/mongo/db/repl/replication_coordinator_impl.cpp#l2325

      And there appears to be no other thread doing any work that will signal the condition variable.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: