[SERVER-23939] replSetInitiate hangs when running in queryableBackupMode mode instead of returning an error Created: 26/Apr/16  Updated: 27/Apr/16  Resolved: 27/Apr/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.3.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Eric Milkie
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-23941 queryableBackupMode and --replSet sho... Closed
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Eric Milkie [ 27/Apr/16 ]

You can but you have to be in config server mode for that to work, which I believe also precludes queryableBackupMode.

Comment by Randolph Tan [ 27/Apr/16 ]

scotthernandez told me that it's possible to call rs.initiate even without --replSet. So, it looks like it is still possible to run into this

Comment by Eric Milkie [ 27/Apr/16 ]

This issue will go away once the linked ticket is fixed. You're not supposed to be able to start a replset server in queryableBackupMode.

Comment by Eric Milkie [ 26/Apr/16 ]

I'll check with the integration team about what the expectations are regarding the combination of parameters.

Comment by Eric Milkie [ 26/Apr/16 ]

Yes, it should be an error. I think the problem is that it is not.

Comment by Scott Hernandez (Inactive) [ 26/Apr/16 ]

Shouldn't this be an error, or not be allowed to mix these options at all (in that you can't run a replica set member with the queryableBackupMode)?

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