You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using WSL2 with Ubuntu24.04 to run BencheExec.
When trying to use the container for the tool info module I get the following error:
[...]benchexec/contrib/../benchexec/container.py", line 772, in get_mount_points
source, target, fstype, options, unused1, unused2 = mount.split(b" ")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 6)
Investigating here lead me to the following line causing the Issue:
My proposed fix:
Just ignore mounts starting with C:\\.
@@ -769,6 +767,9 @@ def get_mount_points():
with open("/proc/self/mounts", "rb") as mounts:
# The format of this file is the same as of /etc/fstab (cf. man 5 fstab)
for mount in mounts:
+ if mount.startswith(b"C:\\"):+ # Ignore pseudo-mounts from WSL.+ continue
source, target, fstype, options, unused1, unused2 = mount.split(b" ")
options = set(options.split(b","))
yield (decode_path(source), decode_path(target), fstype, options)
The text was updated successfully, but these errors were encountered:
This is a bug in WSL. We read /proc/self/mounts here, and although it is not documented, Linux escapes spaces inside the options column with \040, but WSL fails to do this. Having unescaped spaces inside a value of a file with space-delimited columns makes the file effectively unparseable.
Ignoring such mounts is not a solution because this would likely make the container isolation incomplete. And we also need the values in the options column.
Maybe we can apply some heuristic to parse such lines if there are more than 6 columns and the last columns are ints, that we treat the additional columns as part of the options. I wonder what happens if you have mounts for paths that include a ,, though.
I am using WSL2 with Ubuntu24.04 to run BencheExec.
When trying to use the container for the tool info module I get the following error:
Investigating here lead me to the following line causing the Issue:
My proposed fix:
Just ignore mounts starting with
C:\\
.The text was updated successfully, but these errors were encountered: