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

fsyncLock() makes mongod unusable if no databases have been opened yet

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Any
    • ALL

      Running db.fsyncLock() causes mongod to become permanently locked and unusable if no databases have been opened. User can't unlock it or re-connect to the mongod. SIG-TERM also is non-functional.

      It seemed to quit with SIG-QUIT.

      It seems as though when you run `show dbs` it works as expected (databases are opened), but when you don't it breaks.

      • Not Working
        MongoDB shell version: 2.2.1
        connecting to: test
        > db.fsyncLock()
        {
        	"info" : "now locked against writes, use db.fsyncUnlock() to unlock",
        	"seeAlso" : "http://dochub.mongodb.org/core/fsynccommand",
        	"ok" : 1
        }
        > db.foo.find()
        # You've just made mongod very unhappy
        
      • Working
        MongoDB shell version: 2.2.1
        connecting to: test
        > show dbs
        10gen-hc-2012-8-14	0.203125GB
        10gen-hc-2012-9-14	0.203125GB
        admin	0.203125GB
        foo	0.203125GB
        hub	0.203125GB
        local	(empty)
        mongo-dev	0.203125GB
        mongo_hadoop	0.453125GB
        ruby-test-db	0.203125GB
        ruby487_development	0.203125GB
        somedb	0.203125GB
        test	0.203125GB
        training	0.203125GB
        > db.fsyncLock()
        {
        	"info" : "now locked against writes, use db.fsyncUnlock() to unlock",
        	"seeAlso" : "http://dochub.mongodb.org/core/fsynccommand",
        	"ok" : 1
        }
        > db.foo.find()
        { "_id" : ObjectId("508e9b8b08d6faac46000000"), "foo" : 2 }
        > 
        

            Assignee:
            Unassigned Unassigned
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: