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

mongod crashes with assert when trying to copy to filename with >= 260 characters on windows

    • Storage Execution
    • Windows
    • Hide

      (Haven't verified, don't have a windows machine)
      This should do it:
      $ mkdir \data\db\long_name_here_____________________
      $ python buildscripts\smoke.py --smoke-db-prefix \data\db\long_name_here_____________________ jstests/disk/repair2.js

      Show
      (Haven't verified, don't have a windows machine) This should do it: $ mkdir \data\db\long_name_here_____________________ $ python buildscripts\smoke.py --smoke-db-prefix \data\db\long_name_here_____________________ jstests/disk/repair2.js

      Fails with an assertion during the repair2.js jstest, when MongoRunner.dataDir is set to something longer that \data\db (in this case, it's \data\db\job0\mongorunner).

      Here's the relevant portion of the logs:

      2015-04-29T10:35:17.491+0000 I -        shell: started program (sh3360):  mongod.exe --directoryperdb --port 31000 --dbpath \data\db\job0\mongorunner\jstests_disk_repair2/ --repairpath \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ --nohttpinterface --bind_ip 127.0.0.1 --setParameter enableTestCommands=1
       m31000| 2015-04-29T10:35:17.546+0000 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
       m31000| 2015-04-29T10:35:17.560+0000 I JOURNAL  [initandlisten] journal dir=\data\db\job0\mongorunner\jstests_disk_repair2\journal
       m31000| 2015-04-29T10:35:17.561+0000 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
       m31000| 2015-04-29T10:35:17.637+0000 I JOURNAL  [durability] Durability thread started
       m31000| 2015-04-29T10:35:17.638+0000 I JOURNAL  [journal writer] Journal writer thread started
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] MongoDB starting : pid=3360 port=31000 dbpath=\data\db\job0\mongorunner\jstests_disk_repair2 64-bit host=WIN-A43JTIJB2K5
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] DEBUG build (which is slower)
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten]
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.1.2-pre-) of MongoDB.
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] **       Not recommended for production.
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten]
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] db version v3.1.2-pre-
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] git version: a488316e8e18388426e6d35564c0dc64c82e32a8
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_56
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] allocator: system
       m31000| 2015-04-29T10:35:17.640+0000 I CONTROL  [initandlisten] options: { net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 31000 }, setParameter: { enableTestCommands: "1" }, storage: { dbPath: "\data\db\job0\mongorunner\jstests_disk_repair2/", directoryPerDB: true, repairPath: "\data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/" } }
       m31000| 2015-04-29T10:35:17.661+0000 I NETWORK  [initandlisten] waiting for connections on port 31000
       m31000| 2015-04-29T10:35:18.001+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:63188 #1 (1 connection now open)
       m31000| 2015-04-29T10:35:18.002+0000 I COMMAND  [conn1] repairDatabase aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
       m31000| 2015-04-29T10:35:18.002+0000 I STORAGE  [conn1] repairDatabase aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
       m31000| 2015-04-29T10:35:18.014+0000 I JOURNAL  [conn1] journalCleanup...
       m31000| 2015-04-29T10:35:18.015+0000 I JOURNAL  [conn1] removeJournalFiles
       m31000| 2015-04-29T10:35:18.018+0000 I INDEX    [conn1] allocating new ns file \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns, filling with zeroes...
       m31000| 2015-04-29T10:35:18.237+0000 I STORAGE  [FileAllocator] allocating new datafile \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.0, filling with zeroes...
       m31000| 2015-04-29T10:35:18.238+0000 I STORAGE  [FileAllocator] creating directory \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\_tmp
       m31000| 2015-04-29T10:35:18.952+0000 I STORAGE  [FileAllocator] done allocating datafile \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.0, size: 64MB,  took 0.714 secs
       m31000| 2015-04-29T10:35:18.953+0000 I STORAGE  [conn1] datafileheader::init initializing \data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.0 n:0
       m31000| 2015-04-29T10:35:19.062+0000 I INDEX    [conn1] build index on: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.jstests_disk_repair2 properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.jstests_disk_repair2" }
       m31000| 2015-04-29T10:35:19.062+0000 I INDEX    [conn1]   building index using bulk method
       m31000| 2015-04-29T10:35:19.308+0000 I JOURNAL  [conn1] journalCleanup...
       m31000| 2015-04-29T10:35:19.313+0000 I JOURNAL  [conn1] removeJournalFiles
       m31000| 2015-04-29T10:35:19.340+0000 I JOURNAL  [conn1] journalCleanup...
       m31000| 2015-04-29T10:35:19.340+0000 I JOURNAL  [conn1] removeJournalFiles
       m31000| 2015-04-29T10:35:19.348+0000 I JOURNAL  [conn1] journalCleanup...
       m31000| 2015-04-29T10:35:19.348+0000 I JOURNAL  [conn1] removeJournalFiles
       m31000| 2015-04-29T10:35:19.352+0000 I -        [conn1] Assertion: 13294:caught exception: boost::filesystem::copy_file: The system cannot find the path specified: "\data\db\job0\mongorunner\jstests_disk_repair2\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns", "\data\db\job0\mongorunner\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns.bak" src\mongo\db\storage\mmap_v1\repair_database.cpp 209
      2015-04-29T10:35:19.363+0000 I STORAGE  [FileAllocator] allocating new datafile \data\db\job0\resmoke\DiskFullTestDB.0, filling with zeroes...
      2015-04-29T10:35:19.363+0000 I STORAGE  [FileAllocator] error: failed to allocate new file: \data\db\job0\resmoke\DiskFullTestDB.0 size: 67108864 File allocation failed due to failpoint..  will try again in 10 seconds
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\util\stacktrace_windows.cpp(175)                          mongo::printStackTrace+0x43
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\util\log.cpp(135)                                         mongo::logContext+0xec
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\util\assert_util.cpp(220)                                 mongo::msgasserted+0x137
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\util\assert_util.cpp(212)                                 mongo::msgasserted+0x1a
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\storage\mmap_v1\repair_database.cpp(209)               `mongo::_applyOpToDataFiles'::`1'::catch$2+0x137
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    f:\dd\vctools\crt\crtw32\eh\amd64\handlers.asm(51)                      _CallSettingFrame+0x20
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    f:\dd\vctools\crt\crtw32\eh\frame.cpp(1281)                             __CxxCallCatchBlock+0x162
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] ntdll.dll                                                                             RtlRestoreContext+0x2e2
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\storage\mmap_v1\repair_database.cpp(209)               mongo::_applyOpToDataFiles+0x38d
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\storage\mmap_v1\repair_database.cpp(132)               mongo::_renameForBackup+0xad
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\storage\mmap_v1\repair_database.cpp(458)               mongo::MMAPV1Engine::repairDatabase+0x17fc
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\repair_database.cpp(196)                               mongo::repairDatabase+0x1dd
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(287)                                    mongo::CmdRepairDatabase::run+0x2de
       m31000| 2015-04-29T10:35:19.937+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1118)                                   mongo::_execCommand+0x5c
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1338)                                   mongo::Command::execCommand+0x1018
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1417)                                   mongo::_runCommands+0x470
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\dbcommands.cpp(1444)                                   mongo::runCommands+0x37
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\instance.cpp(250)                                      mongo::receivedCommand+0x41a
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\instance.cpp(489)                                      mongo::assembleResponse+0x601
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\db\db.cpp(171)                                            mongo::MyMessageHandler::process+0xc3
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\mongo\util\net\message_server_port.cpp(232)                     mongo::PortMessageServer::handleIncomingMsg+0x6b0
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    ...\src\third_party\boost-1.56.0\libs\thread\src\win32\thread.cpp(215)  boost::`anonymous namespace'::thread_start_function+0x21
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    f:\dd\vctools\crt\crtw32\startup\threadex.c(376)                        _callthreadstartex+0x25
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] mongod.exe    f:\dd\vctools\crt\crtw32\startup\threadex.c(359)                        _threadstartex+0xe7
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1] kernel32.dll                                                                          BaseThreadInitThunk+0xd
       m31000| 2015-04-29T10:35:19.938+0000 I CONTROL  [conn1]
       m31000| 2015-04-29T10:35:19.938+0000 I COMMAND  [conn1] command aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.$cmd command: repairDatabase { repairDatabase: 1.0, backupOriginalFiles: true } ntoskip:0 keyUpdates:0 writeConflicts:0 numYields:0 reslen:641 locks:{ Global: { acquireCount: { W: 1 } }, MMAPV1Journal: { acquireCount: { w: 15 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 96 } }, Metadata: { acquireCount: { W: 4 } } } 1936ms
      assert: command failed: {
        "errmsg" : "caught exception: boost::filesystem::copy_file: The system cannot find the path specified: \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns\", \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns.bak\" src\\mongo\\db\\storage\\mmap_v1\\repair_database.cpp 209",
        "code" : 13294,
        "ok" : 0
      } : undefined
      Error: command failed: {
        "errmsg" : "caught exception: boost::filesystem::copy_file: The system cannot find the path specified: \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns\", \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns.bak\" src\\mongo\\db\\storage\\mmap_v1\\repair_database.cpp 209",
        "code" : 13294,
        "ok" : 0
      } : undefined
          at Error (<anonymous>)
          at doassert (src/mongo/shell/assert.js:11:14)
          at Function.assert.commandWorked (src/mongo/shell/assert.js:254:5)
          at jstests\disk\repair2.js:65:8
      2015-04-29T10:35:19.945+0000 E QUERY    Error: command failed: {
        "errmsg" : "caught exception: boost::filesystem::copy_file: The system cannot find the path specified: \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns\", \"\\data\\db\\job0\\mongorunner\\jstests_disk_repair2/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/backup_repairDatabase_0\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.ns.bak\" src\\mongo\\db\\storage\\mmap_v1\\repair_database.cpp 209",
        "code" : 13294,
        "ok" : 0
      } : undefined
          at Error (<anonymous>)
          at doassert (src/mongo/shell/assert.js:11:14)
          at Function.assert.commandWorked (src/mongo/shell/assert.js:254:5)
          at jstests\disk\repair2.js:65:8 at src/mongo/shell/assert.js:13
      failed to load: jstests\disk\repair2.js
      

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: