-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Genie 1.43 Does Not Shutdown Cleanly #185
Comments
+1 |
On the one hand: this specific error is because genie unmounts the /proc/sys/fs/binfmt_misc filesystem before starting systemd, since systemd expects to mount this filesystem itself and it often breaks if this fs is already mounted. See #142 . Remounting this filesystem should fix the problem, and doing this is something I could well add to the shutdown handler. On the other hand: you're expecting genie to be idempotent, and like the BUGS section says, it isn't, and indeed it can't be. Linux pid/mount namespaces aren't perfect containers, systemd units and other actions inside the bottle can and will change things that affect the outside of the bottle, and in some cases (kernel modules, for example) can and will change things that affect other running distros . And systemd and its units inside the bottle believe , when genie -u calls systemctl poweroff, that it's shutting down the whole machine. There are an arbitrarily large number of possibilities I can't support here. All of which is to say that despite the above potential fix for this issue, in the bigger picture, there are no guarantees whatsoever that the outside-genie session will be preserved as is or even be usable once genie exits. That what you're doing - continuing to use a distro session after genie -u - works at all is pure luck, and I strongly suggest not doing it. |
That's fair enough. The reason I am doing this at all is to dynamically grab the Windows DNS entry for WSL on opening a new terminal and overwrite /etc/systemd/resolved.conf (if the IP differs) for when Genie is running OR overwrite /etc/resolv.conf (if the IP differs) when Genie is not running or has stopped running. If there's a better way of doing this, let me know. From your explanation, though, it sounds like the only reliable thing to do is to initially set /etc/systemd/resolved.conf and /etc/systemd/resolv.conf when opening a new terminal before starting Genie and then only attempting this again after a wsl --shutdown. |
Hrm. That's an interesting question. For the I'm less sure of a good way to handle (But that's - systemd-resolved and its ownership of /etc/resolv.conf is - another variation on idempotency not guaranteed, so... 😁 ) Or, I suppose, a wrapper script around |
Fix (and more visible relevant warning notes) implemented in 1.44. (Please note that the dev-1.44 branch will not build externally until I push the next ArkaneSystems.WSL library update, today or tomorrow.) |
I still see this issue in 1.44 when I shutdown genie. On starting genie again, it still says: "genie: failed to unmount binfmt_misc filesystem; attempting to continue" |
1.44 attempts to remount the binfmt_misc filesystem on shutdown (if you use the -v switch to genie -u when shutting down, it should report success on this, as well as failure). That said, it attempts to remount the filesystem. There is no guarantee that it succeeds, for a whole host of possible reasons that add up to why continuing to use a session after the bottle exits isn't a supported scenario. |
Windows version (build number):
Windows 10 21H1 (Build 19043.1151) x86-64
Linux distribution:
Ubuntu 20.04 LTS
Genie version:
1.43
Describe the bug
Running Windows native binaries (e.g. ipconfig.exe) works in WSL and inside Genie. However, I've noticed that after running
genie --shutdown
the Windows binaries no longer work in WSL. Genie must be started again for any of them to work. This issue does not occur in Genie 1.42.To Reproduce
Steps to reproduce the behavior:
wsl --shutdown
first if needed)exec /usr/bin/genie -s
in an alias)genie --shutdown
)exec /usr/bin/genie -s
in an alias) and see error: "genie: failed to unmount binfmt_misc filesystem; attempting to continue"Expected behavior
I expected Genie 1.43 to behave the same way as Genie 1.42 where a
genie --shutdown
would still allow Windows binary execution in WSL.The text was updated successfully, but these errors were encountered: