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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Any
    • Operating System:
      ALL

      Description

      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 }
        > 

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: