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

mongod/mongos fatally asserts when rotating logs and log isn't in original location

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 2.4.6
    • Fix Version/s: Backlog
    • Component/s: Admin, Logging, Security, Stability
    • Environment:
    • Operating System:
      Linux
    • Steps To Reproduce:
      Hide

      1) start a mongo process
      2) Find the log the process is appending to (/var/log/mongo)
      3) move the log file to a new location
      4) Send the SIGUSER signal to mongo (example `killall -USR1 mongos`)

      Show
      1) start a mongo process 2) Find the log the process is appending to (/var/log/mongo) 3) move the log file to a new location 4) Send the SIGUSER signal to mongo (example `killall -USR1 mongos`)

      Description

      While implementing a log rotate script we found that if the script would move the mongo*.log file to a new location BEFORE sending the SIGUSER signal to the daemon triggering the daemon's own rotate functionality, a fatal assertion is thrown

      Stack Trace:
      Tue Oct  8 07:00:56.966 [Balancer] distributed lock 'balancer/ip-10-0-0-91:27017:1381230304:1804289383' unlocked.
      Tue Oct  8 07:01:01.357 ERROR: failed to rename '/var/log/mongo/mongos.log' to '/var/log/mongo/mongos.log.2013-10-08T14-01-01': errno:2 N
      o such file or directory
      Tue Oct  8 07:01:01.371   Fatal Assertion 16780
      0xa897d1 0xa4daf3 0x65ace5 0xad14c9 0x2aaaaacce617 0x2aaaab951c2d
      /usr/bin/mongos(_ZN5mongo15printStackTraceERSo+0x21) [0xa897d1]
      /usr/bin/mongos(_ZN5mongo13fassertFailedEi+0xa3) [0xa4daf3]
      /usr/bin/mongos(_ZN5mongo22signalProcessingThreadEv+0x55) [0x65ace5]
      /usr/bin/mongos [0xad14c9]
      /lib64/libpthread.so.0 [0x2aaaaacce617]
      /lib64/libc.so.6(clone+0x6d) [0x2aaaab951c2d]
      Tue Oct  8 07:01:01.373

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated: