Description
- Repro
Pretty easy to reproduce:
Example:
in any mongo shell
> use Aux
> show collections
mongod process crashes leaving this log:
Mon Oct 24 20:11:16 [conn1] ERROR: Uncaught std::exception:
boost::filesystem::file_size: The system cannot find the file
specified: "e:\dat
a\mongodb\Aux.ns", terminating
Mon Oct 24 20:11:16 dbexit:
Mon Oct 24 20:11:16 [conn1] shutdown: going to close listening
sockets...
Mon Oct 24 20:11:16 [conn1] closing listening socket: 436
Mon Oct 24 20:11:16 [conn1] closing listening socket: 440
Mon Oct 24 20:11:16 [initandlisten] now exiting
Mon Oct 24 20:11:16 [conn1] shutdown: going to flush diaglog...
Mon Oct 24 20:11:16 dbexit: ; exiting immediately
Mon Oct 24 20:11:16 [conn1] shutdown: going to close sockets...
The problem comes from an old legacy limitation of Windows, there are
some file names/directories which are reserved and cannot be used.
The list can be found here :
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
(quote![]()
"CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8,
COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also
avoid these names followed immediately by an extension; for example,
NUL.txt is not recommended. "
What happens is mongo is trying to create an Aux.ns file, the API used
does not create it, and mongo crashes the first time it tries to
access the underlying file.
I don't know what would be the best fix. Escaping the problematic
names would be necessary, but then it could mess with compatibility
with old backups made on unix systems.