Repository navigation
Closed
Labels
Description
- 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
Reacted by SanD, Rafael Green, MillerZh and zsjinit
Reacted by SanD, zsjinit and Dearamaze
Activity
[-]Mongodb fsync wrong in 20H1[/-][+]Mongodb fdatasync wrong in 20H1[/+]onomatopellan commentedon May 13, 2020
Try using as bindIP: "0.0.0.0"
https://docs.microsoft.com/en-us/windows/wsl/compare-versions#connecting-via-remote-ip-addresses
riggzh commentedon May 13, 2020
Same wrong, I doesn't think it's bindIP wrong. When change data path to other volumn without wslfs & drvfs. It's work. So I think its a filesystem wrong
onomatopellan commentedon May 13, 2020
What's the output for
uname -a?riggzh commentedon May 13, 2020
Linux DESKTOP-31KM97S 4.4.0-19041-Microsoft #1-Microsoft Fri Dec 06 14:06:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
Not check same as 19H2, but same download form microsoft store.
onomatopellan commentedon May 13, 2020
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.
riggzh commentedon May 13, 2020
They drop this syscall in 20H1? Not find any log. WSL2 work right
onomatopellan commentedon May 13, 2020
If it worked in build 18363 then it could be a regression.
If you have access to a working build 18363 do this to generate a mogodb.strace file and post here the link to a gist or pastebin.
sudo strace -o mongodb.strace -f sudo service mongodb startAfter that do the same in build 19041 so both files can be compared.
riggzh commentedon May 13, 2020
Here gist
onomatopellan commentedon May 14, 2020
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.
therealkenc commentedon May 19, 2020
Possible but not likely. More likely a different variable moved. In any case, from ono's gist, which has the amiable property of avoiding 9p (
/mnt/c):Repro:
Doing a
fdatasync()on a read-only directory handle: questionable semantically but apparently allowed. WSL2:Did 18363 eat it? Can't tell ya, don't have one handy, didn't look. Someone motivated could (I suspect academically) try the repro and confirm one way or the other.
riggzh commentedon May 19, 2020
therealkenc
In 18363

therealkenc commentedon Jun 3, 2020
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.]
aak1247 commentedon Dec 21, 2021
reproduced in 19041 too
bilaalabdelhassan commentedon Jan 28, 2022
Thanks a lot, I've been stuck with it for days. Switching to WSL 2 worked for me.
KashubaK commentedon May 25, 2022
Switching to WSL 2 is not preferable for all cases. As a web dev, it requires me to use polling for any sort of task that relies on "watching" files (i.e. recompile on file save), and other FS-related tasks become very slow (see relevant StackOverflow post)
Would be nice if this was figured out, but I'll just use Mongo Atlas in the meantime.
MaheshMadushan commentedon Dec 25, 2022
same issue arise when try to run leveldb. is it ideal to use fsync instead of fdatasync ?