[SERVER-6094] sharding/remove2.js has cleanup issues at end of test, fails on Linux but blows up test on Windows Created: 14/Jun/12  Updated: 11/Jul/16  Resolved: 14/Jun/12

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 2.1.2

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: buildbot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Somewhat different behavior on Linux and Windows but has issues on both


Issue Links:
Related
related to SERVER-6082 "process cannot access the file" in r... Closed
Operating System: ALL
Participants:

 Description   

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



 Comments   
Comment by Spencer Brody (Inactive) [ 14/Jun/12 ]

Fix pushed: https://github.com/mongodb/mongo/commit/767c0103205728993d735bcbf9e77332ecf05ef1

Generated at Thu Feb 08 03:10:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.