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

Server crashes if logRotate is issued and the file cannot be rotated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • 2.2.0
    • None
    • Stability
    • None
    • mongodb v2.2 2008+ build on Windows 7 x64
    • ALL

    Description

      Start db with logpath.
      mongod.exe --dbpath c:\data\db --logpath c:\data\mongod.log -vvvvv

      From a command prompt do more c:\data\mongod.log

      Now connect using the mongo shell and do db.adminCommand("logRotate"). This causes the server to die with the following in the logs

      Wed Aug 29 20:38:26 [conn1] runQuery called admin.$cmd { logRotate: 1.0 }
      Wed Aug 29 20:38:26 [conn1] run command admin.$cmd { logRotate: 1.0 }
      Wed Aug 29 20:38:26 [conn1] command: { logRotate: 1.0 }
      Wed Aug 29 20:38:26 [conn1] ERROR: Failed to rename c:\data\mongod.log to c:\data\mongod.log.2012-08-30T03-38-26  Fatal Assertion 16175
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\util\stacktrace.cpp(161)                           mongo::printStackTrace+0x3e
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\util\assert_util.cpp(126)                          mongo::fassertFailed+0x43
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\dbcommands_generic.cpp(347)                     mongo::LogRotateCmd::run+0x17
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1859)                            mongo::_execCommand+0x69
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1986)                            mongo::execCommand+0x983
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(2079)                            mongo::_runCommands+0x3d7
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\ops\query.cpp(43)                               mongo::runCommands+0x46
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\ops\query.cpp(919)                              mongo::runQuery+0x414
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\instance.cpp(244)                               mongo::receivedQuery+0x16d
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\instance.cpp(390)                               mongo::assembleResponse+0x2ed
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\db\db.cpp(192)                                     mongo::MyMessageHandler::process+0xf5
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\mongo\util\net\message_server_port.cpp(86)               mongo::pms::threadRun+0x59a
      Wed Aug 29 20:38:26 [conn1] mongod.exe    ...\src\third_party\boost\libs\thread\src\win32\thread.cpp(180)  boost::`anonymous namespace'::thread_start_function+0x21
      Wed Aug 29 20:38:26 [conn1] mongod.exe    f:\dd\vctools\crt_bld\self_64_amd64\crt\src\threadex.c(314)      _callthreadstartex+0x17
      Wed Aug 29 20:38:26 [conn1] mongod.exe    f:\dd\vctools\crt_bld\self_64_amd64\crt\src\threadex.c(292)      _threadstartex+0x7f
      Wed Aug 29 20:38:26 [conn1] kernel32.dll                                                                   BaseThreadInitThunk+0xd
      Wed Aug 29 20:38:26 [conn1] 
       
      ***aborting after fassert() failure

      Attachments

        Issue Links

          Activity

            People

              tad Tad Marshall
              sridhar Sridhar Nanjundeswaran
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: