Skip to content

FreeWilly 1.0.7

Choose a tag to compare

@alegauss alegauss released this 29 Aug 18:53
· 146 commits to main since this release

The filesystem check could leave WSL unable to start anything

1.0.6 added a check and a repair for the engine's own filesystem. Running either of them could put
the whole WSL installation into a state where nothing starts, including distributions this product
has never touched. This release is that fix, and nothing else.

Upgrade before running the check again. If you are on 1.0.6, do not press Check filesystem
on the Engine page and do not run freewilly --fsck until you have installed this.

What went wrong

The check runs e2fsck from a temporary distribution called freewilly-rescue, because a root
filesystem cannot check itself. That rescue holds the virtual machine open with a running process,
which is the part that keeps the engine's disk attached after its distribution is terminated, and
the teardown disposes that hold before unregistering the rescue.

Disposing it kills the Windows side of the process and not the process inside the distribution, so
WSL still counts the rescue as running. Unregistering a running distribution is not refused. It is
accepted, the distribution moves to state 4, uninstalling, and the service then blocks on something
that never stops.

Everything WSL is asked to do afterwards queues behind that. wsl --list and wsl --shutdown stop
returning, and starting the engine fails as the daemon exited while starting: wsl.exe exited 1 without a word, which is the launcher being unable to reach a service that is no longer answering.
Nothing is damaged: the engine's own distribution stays registered and its disk stays intact. It
simply cannot be started, and neither can anything else, until the WSL service is restarted with
administrator rights.

The rescue is now terminated before it is unregistered. A terminate stops what is inside and
returns, and unregistering a stopped distribution is the case WSL handles.

If a machine is already stuck

The upgrade cannot clear a rescue that is already wedged, because every WSL call is queued behind
it. From an elevated PowerShell:

Stop-Service WSLService -Force   # if this hangs: taskkill /F /IM wslservice.exe
Start-Service WSLService
wsl --unregister freewilly-rescue

That is what recovered the machine this was found on. The engine's distribution, its images and its
volumes are untouched by all of it.

Install

Download FreeWilly-Setup-1.0.7.exe and check it against SHA256SUMS.txt. Upgrading keeps the
distribution and everything in it.