-
Notifications
You must be signed in to change notification settings - Fork 25
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
OSError: [WinError 8] Not enough memory #16
Comments
I cannot reproduce the problem. How much memory has your Docker installation? If you are using Docker Desktop with WSL2, maybe the docker VM hasn't allocated enough memory? |
@TobiX facing the same issue recently with pyinstaller. Fresh docker install. How could I check what memory is it allocated? This is the output of
|
@TobiX just had an observation: This error only emerges when the distpath is set to a mounted volume. In my case a windows directory is mounted to |
I have exactly the same problem. Pulled the image, updated everything to latest and wasn't able to build. I added my code to the docker instance via a volume, from my Windows machine. Copied it somewhere else ( |
This seems to have something to do with the Windows mapping of data into WSL. |
@lsangild I'm not very well-versed with docker's internal architecture, but that does seem to be the issue. The read/write permissions are also not a problem because I can copy the .exe file from /tmp/pyinstaller-temp to my mounted folder after the pyinstaller command without any problems. For now, I've simply updated my command to do:
|
Do I understand that correctly:
While passing through a Windows directory all the way?
I'm surprised this only breaks in such a corner case. I'd suggest reporting this problem to Microsoft, since it seems like DrvFs isn't POSIX compliant enough to satisfy Wine's requirements for a filesystem... |
Yes, that is correctly understood. I am not sure if WSL2 is actually a VM or how it should be described. The use case is that I need to build a Windows executable for customers. Normally this is done on our Linux build server, skipping the WSL step, but for consistency I tried to build it on my Windows PC through WSL with Docker and encountered the issue. |
Yes, WSL2 is a Linux VM running in Hyper-V and all Windows directories are mounted into the VM using the 9p protocol, which isn't very performant and apparently this whole layercake of filesystems (docker/podman puts an overlayfs over all this stuff) is slightly broken in the end. I see nothing I would be able to fix here, sorry. |
I understand that you can't do anything as they issue is not in your code, but could you try to capture it somehow and print a different error? When I got the "out of memory" error I spent quite a lot of time trying to figure out how that was even possible. It wasn't until I found this issue that I tried to copy the project to a different path and it worked. Also, if that matters, I didn't run my docker from WSL, but from Windows, with the project path passed to the docker container as a volume. Why running docker when I could have compiled in Windows in the first place? I did this because I wanted to test the docker image before converting it to a pipeline in my CICD system. |
I cannot, that's some strange error code generated by Wine(?), which Python just reports. I could probably put a fat WARNING into the default entrypoint of my images if any 9p mount is detected... Thinking about it...
Yeah, that uses WSL2 behind the scenes, so it's the same problem, but a different way to get to it. |
For reference: This does not happen with other 9p servers, so the culprit is pretty much Microsoft's implementation of the protocol. |
Understood, thanks for the explanation!
…On Fri, 26 May 2023, 23:57 Tobias Gruetzmacher, ***@***.***> wrote:
For reference: This does not happen with other 9p servers, so the culprit
is pretty much Microsoft's implementation of the protocol.
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACADOE3T24YUCD6QBMBC2EDXIEYONANCNFSM5T6QJBTA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here is the smoking gun (this is from tracing wine with strace): For (my) reference:
|
I've prepared a warning message in #43 - If anyone wants to test it before I merge it, please report back here. Otherwise I will merge it the near future 😄 |
Show a warning when 9p drvfs mounts are detected (see #16)
Hi, I get this odd error
How to to reproduce
test_mem
test_mem
thetest_mem.py
docker run --rm -ti -v C:\temp\test_nem:/src tobix/pywine:3.10 bash
This generates the following fault
complete trace is below
When I run exactly the same command on my computer (without docker image), it runs perfectly.
Thank you.
Complete trace
The text was updated successfully, but these errors were encountered: