- Your Windows build number:
Microsoft Windows [Version 10.0.19041.264]
- What you’re doing and what’s happening:
When start mongodb service
Mongodb service install from Ubuntu apt both 18.04 and 20.04[hole libc6 old version fix sleep]
- What’s wrong / what should be happening instead:
It's work in 19H2 [18363.778] (both test lxfs and wslfs)
And change data path to /dev/data (I mkdir empty) also work
- Strace of the failing command, if applicable:
2020-05-13T16:02:24.948+0800 I CONTROL [initandlisten] MongoDB starting : pid=765 port=27017 dbpath=/var/lib/mongodb 64-bit host=DESKTOP-31KM97S
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] db version v3.6.3
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] allocator: tcmalloc
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] modules: none
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] build environment:
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] distarch: x86_64
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] target_arch: x86_64
2020-05-13T16:02:24.949+0800 I CONTROL [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongodb.log" } }
2020-05-13T16:02:24.950+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=15824M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2020-05-13T16:02:25.328+0800 E STORAGE [initandlisten] WiredTiger error (22) [1589356945:328952][765:0x7f4dea5410c0], connection: /var/lib/mongodb/: directory-sync: fdatasync: Invalid argument
2020-05-13T16:02:25.329+0800 F - [initandlisten] Fatal Assertion 28561 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 410
2020-05-13T16:02:25.329+0800 F - [initandlisten]
***aborting after fassert() failure
Why the tight repro worked in WSL1 18363 but not 19628 is a pretty legit ask. [If it never worked in WSL1 it’d be different.]
I can reproduce it in latest build 19628 too. Here’s the gist of Ubuntu 20.04 WSL1: https://gist.github.com/onomatopellan/69c67917b25d58bfd12869089de5fa68
Let’s wait for the team to look at it.
Thanks. It looks like you are still using WSL1 and this type of problems “Invalid argument” are pretty common due to lack of syscalls implementation.
Since you are on build 19041 I recommend you using WSL2. I just tried and mongodb service works just fine.
reproduced in 19041 too
@therealkenc
In 18363
Here gist