-
Notifications
You must be signed in to change notification settings - Fork 823
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
WSL: ftruncate does not truncate mmap'd files #902
Comments
Thanks for reporting the issue. This is discussed in #658 so closing it out as a duplicate. Please give us feedback on the user voice page so we can prioritize improving mmap support. |
De-duping. The
WSL:
Real Linux:
|
@stehufntdev @benhillis (Apologies for the ping) If this could be looked at on your end it will help put some indeterminate |
I added a full repro. ʀᴘᴍ issues might not be linked to current case… |
any news on this issue? |
I too would very much like to see this issue resolved. It blocks building Android/LineageOS on WSL:
It is also problematic with bup. |
@drujd check my xda thread to bypass the ijar issue: https://forum.xda-developers.com/android/software-hacking/guide-how-to-build-lineageos-15-1-t3750175 |
this issue on 16 Aug 2016 , why not fix ? |
Noting we have hit this issue in WLinux Enterprise on RHEL and Scientific Linux, specifically to some wonky rpm behavior here and there. See WhitewaterFoundry/Pengwin-Enterprise#20. |
I encounter following error when build android with wsl on win10 18890, i also checked on google everywhere, on many page lead me to here, but i can't find any solution here, and also it seem this issue also solved in 18890, is there anyone can help me to solve this> |
If you haven’t seen it: https://www.howtogeek.com/413564/windows-10-is-getting-a-built-in-linux-kernel/ [deleted bits about WSL1 no longer being developed alongside wsl2 - I jumped the gun there] I’m curious how the BerkeleyDB stuff is going to work since the Windows kernel doesn’t allow the kind of file system shenanigans that Linux does, and WSL files are available from both Windows and Linux. Maybe they’ll be kept in a lightweight VM now and just accessed from Windows. My understanding is this kernel is the same or a very similar approach to what Azure does, so here’s to a fully compatible Linux experience on Windows without needing to spin up a full fat VM. |
@yorickdowne : I still think this issue needs to be fixed. We’re not talking about a feature but the fact the implementation isn’t implementing something correctly. There’s 3 points which are unclear with the new plan : will it remain possible to access Windows files like currently or cygwin ? Will it be required to manage a disk image it’s own file system with different sizes than the host drive (currently there’s no need for large images which mean free space of wsl or cygwin can be efficiently shared without having too much free space on image leaving no space on the host and vice versa). Will it be possible to still see each Linux process from Windows like with pico process currently ? As currently phrased, this really sounds like leaving all those possibilities and switching to something with the same limitations as https://en.wikipedia.org/wiki/Cooperative_Linux (something far heavier than a Linux Docker). In that sense the plan to keep wsl1 really sounds to be a red flag for me indicating that huge benefits of the current implementation will be lost meaning Cygwin will remains superior in functionality over both implementations. Which in turns means this bug should be fixed (not being even able to run rpm as a single command but seriously). |
@yorickdowne Nooooo! :( So is it as I feared - WSL1 will stop being supported/developed?! WSL2 is a glorified Linux VM. :( And, unless I'm wrong, it will require Hyper-V, therefore blocking (due to Microsoft's Hyper-V implementation) other virtualization providers, along with other problems stemming from running 'host' in a VM (albeit in a root partition). |
@ytrezq Agreed, judging from the information available, WSL2 is a cop out compared to WSL1. |
The announcement goes out of its way to say: "Individual Linux distros can be run either as a WSL 1 distro, or as a WSL 2 distro, can be upgraded or downgraded at any time, and you can run WSL 1 and WSL 2 distros side by side." Saying WSL1 will stop being supported, immediately anyway, is pretty overstated. For example:
Actually it isn't clear whether BDB is still broken, since #3939 was squashed. Squashed just a little over a month ago. See 'cause the devs are still fixing issues in WSL1. Fixing issues at the same time the devs were frantically getting WSL2 in a state a screencap animated gif could be taken for Build 2019. [BDB might still be broken in some subtle unreported way, mind. Dunno. Haven't looked. No well formed issue submission to look at, even for the curiosity value.] Meanwhile this issue (#902) is still unresolved, of course. Says so at the top of the screen and everything.
There are lots of points about the new plan, both of the mostly clear and of the somewhat unclear variety. None of which have to do with this open issue specifically. The notable question we're faced with today is whether the WSL2 announcement implodes every favorite open issue into full chat mode for the next couple of months. |
This issue was solved on wsl2, i can build android successfully now.
|
@drujd Yikes ! It requires a file based ᴠʜᴅ Like any Windows Virtual Machine (the huge slow because of fileystem on hard drives because of the double layer of fragmentation and likely to make file system access slower than ᴡꜱʟ1). I would also add that I’ve more than 256Gb of code in my ᴡꜱʟ1 home directory simply barring access to ᴡꜱʟ2. I also have many apps through otvdm which uses the Intel Haxm ᴀᴘɪ which is very unlikely to support Hyper-V. Unless the ability to boot real Linux main rootfs from ᴡꜱʟ2 is given (boot from ʙᴛʀꜰꜱ or Linux ʟᴠᴍ or regular partition), this issue should definitely be fixed. |
I got the same issue while compiling webrtc on WSL 1, I fix this issue with a workaround solution: munmap the mmap'd file before ftruncate and it's works fine for me. |
@therealkenc will this issue ever be fixed? I think a lot of users have specific + legitimate requirements to use WSL1 instead of WSL2; this issue has a lot of impact on various sofwares (re: the many tickets closed as duplicates to this one). Is this issue particularly hard to fix or won't MS give it priority? It makes WSL1 borderline unusable imho.. hoping hard for a fix. |
The link now shows a post that has been updated to only include WSL2 steps. But Waybackmachine is here to help: https://web.archive.org/web/20180617170133/https://forum.xda-developers.com/android/software-hacking/guide-how-to-build-lineageos-15-1-t3750175 however there's still some digging required. Basically you need to apply this change to the synced |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
1 similar comment
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
So I guess that's it, the final confirmation (not that we needed one), WSL1 really is dead in the water, replaced by a glorified VM... :( |
Please use the following bug reporting template to help produce actionable and reproducible issues:
ftruncate does not truncate mmap'd files while they are mmap'd.
file gets truncated to desired size in bytes, even when mmap'd; SIGBUS occurs if memory outside new file bounds is accessed. (This is the behavior on Ubuntu.)
file does not get truncated
14393
apt-get -y install build-essential
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: