Skip to content
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

invalid format for MountPoint in WSL2 #65

Closed
rue-nsilverman opened this issue Apr 12, 2023 · 3 comments
Closed

invalid format for MountPoint in WSL2 #65

rue-nsilverman opened this issue Apr 12, 2023 · 3 comments

Comments

@rue-nsilverman
Copy link

The most recent version of goreleaser includes this module and I have encountered an error running goreleaser in wsl. I use Docker Desktop using the WSL engine which creates local mounts inside linux to windows paths. The exact error is:

invalid format for MountPoint: "2619 80 0:302 / /Docker/host rw,noatime - 9p drvfs rw,dirsync,aname=drvfs;path=C:\\Program Files\\Docker\\Docker\\resources;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio"

I assume given the a quick scan over the code, that the way the mount line is split is breaking because of the weird spaces and double backspaces in the path option. The version I am using is 1.5.2 of this module.

@hhromic
Copy link

hhromic commented Apr 17, 2023

I just encountered this exact same issue while using the latest version of goreleaser as well :(

caarlos0 added a commit to goreleaser/goreleaser that referenced this issue Apr 18, 2023
This might fail on windows/wsl (see
uber-go/automaxprocs#65), and its not too bad
if it fails, actually, so, let's just warn the error instead of exiting
1

closes #3945



Signed-off-by: Carlos Alexandro Becker
<caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@hhromic
Copy link

hhromic commented Apr 18, 2023

I went to investigate a bit more and the root of the problem is Docker Desktop for Windows creating an invalid mountpoint in /proc/X/mountinfo. Reference: docker/for-win#13318

Automaxprocs is not the only software failing to parse the spaces in the path subfield in the options field.

The error only happens when Docker Desktop is integrated into the WSL distribution and running. If Docker Desktop is stopped, the mountpoint is unmounted and automaxprocs (and other parsing software) does not error anymore.

In other words, automaxprocs is actually parsing the mountinfo metafile correctly (as defined in the official kernel documentation) and is Docker Desktop who should fix this issue.

In the linked issue, there is a workaround: install Docker Desktop for Windows in a location without spaces, e.g. C:\Docker.

@sywhang
Copy link
Contributor

sywhang commented Jul 20, 2023

Should be fixed in v1.5.3 release

@sywhang sywhang closed this as completed Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants