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

sharding/remove2.js has cleanup issues at end of test, fails on Linux but blows up test on Windows

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.2
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Environment:
      Somewhat different behavior on Linux and Windows but has issues on both
    • ALL

      The sharding/remove2.js test works right up until it calls "st.stop()", when the ShardingTest object doesn't handle its many cleanup chores well. It tries to shut down servers by port number but those servers stopped a while ago. It then tries to clean up files from the test but those files are still in use because the servers are still running. On Windows, we get a JavaScript exception that terminates the test and is reported as an error by BuildBot. On Linux, we generate errors during shutdown but these are not reported in the error code to BuildBot, so Buildbot doesn't stop the test run.

      Windows:

      ReplSetTest stopSet *** Shut down repl set - test worked ****
      ReplSetTest n: 0 ports: [ 31200, 31201 ]	31200 number
      ReplSetTest stop *** Shutting down mongod in port 31200 ***
      Wed Jun 13 04:07:17 No db started on port: 31200
      Wed Jun 13 04:07:17 shell: stopped mongo program on port 31200
      ReplSetTest n: 1 ports: [ 31200, 31201 ]	31201 number
      ReplSetTest stop *** Shutting down mongod in port 31201 ***
      Wed Jun 13 04:07:17 No db started on port: 31201
      Wed Jun 13 04:07:17 shell: stopped mongo program on port 31201
      ReplSetTest stopSet deleting all dbpaths
      Wed Jun 13 04:07:17 Error: boost::filesystem::remove: The process cannot access the file because it is being used by another process: "\data\db\remove2-rs1-0\journal\j._0" (anon):1
      failed to load: D:\10gen\buildslaves\mongo\Windows_64bit\mongo\jstests\sharding\remove2.js
      

      Linux:

      ReplSetTest stopSet *** Shut down repl set - test worked ****
      ReplSetTest n: 0 ports: [ 31200, 31201 ]	31200 number
      ReplSetTest stop *** Shutting down mongod in port 31200 ***
      Wed Jun 13 18:54:07 No db started on port: 31200
      Wed Jun 13 18:54:07 shell: stopped mongo program on port 31200
      ReplSetTest n: 1 ports: [ 31200, 31201 ]	31201 number
      ReplSetTest stop *** Shutting down mongod in port 31201 ***
      Wed Jun 13 18:54:07 No db started on port: 31201
      Wed Jun 13 18:54:07 shell: stopped mongo program on port 31201
      ReplSetTest stopSet deleting all dbpaths
      ReplSetTest stopSet *** Shut down repl set - test worked ****
      //...snip...
      m32700| Wed Jun 13 18:54:08 [interruptThread] shutdown: closing all files...
       m32700| Wed Jun 13 18:54:08 [interruptThread] closeAllFiles() finished
       m32700| Wed Jun 13 18:54:08 [interruptThread] journalCleanup...
       m32700| Wed Jun 13 18:54:08 [interruptThread] removeJournalFiles
       m32700| Wed Jun 13 18:54:08 [interruptThread] error removing journal files boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/data/db/remove2-rs1-0/journal"
       m32700| Wed Jun 13 18:54:08 [interruptThread] error couldn't remove journal file during shutdown boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/data/db/remove2-rs1-0/journal"
       m32700| Wed Jun 13 18:54:08 shutdown failed with exception
       m32700| Wed Jun 13 18:54:08 dbexit: really exiting now
      

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: