-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync_file_range: Function not implemented #645
Comments
I had the same problem as @mathieupost and installed an old version instead. That v2.4.9 also gives me the TCP_KEEPIDLE and TCP_KEEPINTVL errors. And |
This issue also arises when you use PostgreSQL under WSL. |
What is the status on this? I tried to run borg (borgbackup/borg#1961) on WSL but got stuck on this sync_file_range.
|
@dcayme asked in a dupe:
Given this is two years old it would be nice if I'd say different if this were still 2016, and the feature had a snowballs chance of making the Fall 2018 Update. But at this point we aren't learning which surface is missing and in what packages the API is being used. We know. |
borgbackup 1.1.x is not usable on WSL due to sync_file_range failing. |
@mathieupost there's a typo in the issue title. /nitpick |
@ThomasWaldmann fixed ;) |
has there been any progress? is there anything we can do to move this along? happy to contribute my time if somebody is willing to partner up with me |
It is a trivial config tweak posted in July of 2016. It does not require a team effort. It requires a compiler. [that patch is why the function call might as well be stubbed in WSL btw] |
MongoDB is not the only software that calls sync_file_range (e.g. Borg is another one as I've pointed out). |
🙄
And how would you propose he or "someone" do that. [Allowing for the fact that if one doesn't care if the behavior is stubbed and one is willing to entertain the idea of "Cygwin for WSL", you can do a lot of things. Mask it in the glibc function here. Another one-liner that does not require a team.] |
Or for that matter this will probably work:
Build:
Left as an exercise to do |
While the dummy implementation might get some stuff "working" (in the sense of "not crashing immediately", not necessarily "working with good performance"), I'ld appreciate if someone would really fix the root cause, i.e. implement the missing function and emulate it as closely as possible for WSL. It might be really important for performance (like avoiding first caching lots of stuff, eating lots of memory for it and then having a burst of I/O when the cache gets flushed). As it is just about performance, implementing an empty stub seems better than failing with |
Sigh. Your post (a) states the catastrophically obvious, and, (b) just decreased our changes of the syscall being stubbed by some large percent (if some percent ever existed; I had feint hopes). One imagines this is the reason the devs decided to leave this function return
The syscall is for durability not atomicity or isolation. Let me repeat: Anyone using WSL as their MongoDB deployment environment is high, and for anyone using MongoDB in their development environment, it doesn't matter. If you are worried about the state of your data in the event of a hard system falldown, and don't have a UPS and a clean shutdown protocol in place, and are using WSL as your platform of choice, then you have reached a very (let's call it) unusual set of circumstances. Which goes to where implementation of this syscall likely sits in the priority queue (I wouldn't know, but I can make educated guesses). You could, however, open a UserVoice ticket describing your specific scenario and needs. |
No need to jump at me. It seems I confused this syscall with other syscalls borgbackup is doing to make sure stuff ends up on disk in right order before a transaction is committed. I edited my previous comment to remove what was wrong. I do not use mongodb, nor do I use WSL. I am just trying to help |
The shortness was due to the scare quote. The work-around, which is now buried, addresses borgbackup issue for the people you are trying to help full stop. With good performance (or rather, as good as it gets on WSL; which is not great).
A constructive way to do that would be to upstream a patch to borg that makes that call to
Meh. I don't judge. |
sorry, did not mean to cause a storm here... I should have time this weekend to stub it out, how would we go about making a note/warning somewhere that the function is stubbed out? |
That said, such a message conveys no actionable information to the user whatsoever and thus violates some commonly (but by no means universally) accepted UX principles. [ed with bugfix] |
see there: borgbackup#1961 and especially there (not implemented sync_file_range): microsoft/WSL#645
see there: borgbackup#1961 and especially there (not implemented sync_file_range): microsoft/WSL#645
Hello, FYI we'll probably fix this for PostgreSQL by tolerating ENOSYS (we didn't know it was already spewing warnings on WSL because nobody complained; now that we made it into a PANIC, we found out pretty quickly...). Discussion: https://www.postgresql.org/message-id/flat/CA%2BmCpegfOUph2U4ZADtQT16dfbkjjYNJL1bSTWErsazaFjQW9A%40mail.gmail.com |
can confirm this still exists using rails & pg10.4 on an Ubuntu WSL |
Please try a current release (eg 10.11). |
@therealkenc I’m assuming this issue has been closed because it doesn’t exist anymore in WSL2? And that closing it also means that it won’t be fixed ever for WSL1 users? |
When I try to run a MongoDB instance (version 3.2.7) with
mongod --dbpath /path/to/database
I get an error saying:sync_file_range: Funtion not implemented
when using the standard WiredTiger storage engine (when using the old mmapv1, this error doesn't occur).I've tried this with a dbpath that was an empty directory on a ntfs disk and I also tried a exFat filesystem, but it looks like the sync_file_range function is a linux function that is not yet implemented in the linux subsystem (http://man7.org/linux/man-pages/man2/sync_file_range.2.html).
I'm running build 14379.rs1_release.160627-1607
The text was updated successfully, but these errors were encountered: