Hi All,
I noticed that the log file is indicating that there is no WSL detected, I definitely have it installed.
C:>wsl --status
Default Distribution: Ubuntu-20.04
Default Version: 2
Windows Subsystem for Linux was last updated on 2022-03-25
WSL automatic updates are on.
Kernel version: 5.10.102.1
I did notice a code change in client/hostinfo_wsl.cpp that might be the culprit.
In branch c09041eb the code is
return default_wsl != "";
In the working tree the code is:
return !default_wsl.empty();
Regards,
Bob
--
You received this message because you are subscribed to the Google Groups "boinc_alpha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boinc_alpha...@ssl.berkeley.edu.
To view this discussion on the web visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_alpha/004701d8a83e%24acf7cf70%2406e76e50%24%40telus.net.
Hi Vitalii,
Boinc not installed as a service, only starts when you log in.
Regards,
Bob
I just did a reboot of my machine and voila wsl is now detected…
I will keep monitoring it. I had my machine up for about 3 weeks.
Weird…
From: Vitalii Koshura <lestat.d...@gmail.com>
Sent: August 4, 2022 1:38 PM
To: boin...@telus.net
Cc: BOINC Alpha <boinc...@ssl.berkeley.edu>
Subject: Re: [boinc_alpha] No WSL detected BOINC 7.20.2
Hello Bob,
I have reproduced the issue.
If WSL is detected in the log, then exit BOINC Manager and then relaunch you should not have WSL not being detected any longer.
Regards,
Bob
From: Vitalii Koshura <lestat.d...@gmail.com>
Sent: August 4, 2022 1:38 PM
To: boin...@telus.net
Cc: BOINC Alpha <boinc...@ssl.berkeley.edu>
Subject: Re: [boinc_alpha] No WSL detected BOINC 7.20.2
Hello Bob,
The only role of the Manager in all that will be to make the log visible to the (human) user.
If by 'exit BOINC Manager', you're actually implying 'shut down the attached client, and restart it', that would be the place to start looking.
To view this discussion on the web visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_alpha/006001d8ab69%243daa5b00%24b8ff1100%24%40telus.net.
HI Richard,
When I shutdown Manager all of the associated clients (boinc + workunit processes ) are also shutdown. I assuming that boinc.exe is the one reporting if WSL is present or not.
Regards,
Bob
How was the running instance of BOINC - the one that didn't detect WSL - started in the first place? Was it, perchance, an automatic start when Windows was last rebooted?
Then, it's possibly a timing error - a race condition. If BOINC is first out of the blocks, it might be looking for WSL - before WSL is ready to reply that it's ready, I think modern versions of Windows try to pre-load the user facing components - like the desktop - to give the impression of a fast boot, while delaying the background services which aren't needed so urgently. It's something to think about.
You could try:
disable 'Run Manager at login?'
reboot the computer
go away and have a cup of coffee
come back, and start BOINC manually
Is WSL detected then?
To view this discussion on the web visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_alpha/009701d8ab6b%24c73d3fc0%2455b7bf40%24%40telus.net.
Hi Richard,
I disabled ‘Run Manager at Login’ and rebooted the computer, and restarted BOINC manually, and WSL was detected and then I restarted BOINC manually a few times and WSL was present all these times I restarted.
I then reenabled ‘Run Manager’ and WSL was detected after reboot/login, then I stopped and started BOINC manually again a few time and had no issue… I did this 2 days ago.
Today I restarted BOINC now I get WSL is not detected in the log file.
Hi All,
I have found the issue.
So I downloaded the source code and debugged hostinfo_wsl.cpp and found the following.
In Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\ registry entries I have 2 wsl distros called docker-desktop and docker-desktop-data.
The last entry in the list is docker-desktop.
So when hostinfo_wsl:: get_wsl_information() loops and determines the wsl_dist_name, and wsl_dist version using the following commands lsb_release /usr/bin/lsb_release -a 2>&1e, cat /etc/os-release or cat /etc/redhat-relase
It will fail on all three tries and sets the wsl_available flag to false. Causing the No WSL detected message.
I would suggest that if the there is valid distro that the wsl_available is set and not reset to false on distros that don’t pass the 3 tests to obtain the distribution name and version. Or ignore the docker distros.
Not sure why the detection works correctly some of the time. It might be the timing of docker starting up or that the order of the wsl distros changes. I have noticed that updating docker didn’t put the at the end of the list and of course this detects wsl correctly.
Is there anything update on this issue, should I create a PR on github?
Otherwise, it remains an issue, not a PR.
Hi Richard,
Did you get my email on the reason why WSL detected failed, it has to with in my case docker-desktop being the last entry in the Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\ registry. It attempts to get the wsl_dist_name,wsl_dist_version on this distro and fails so the wsl_available flag is set to false, I think if any of the distros get the name and version wsl_available should be set not set on each entry in the list.
I did as you suggested and it doesn’t appear to be a race condiction.
To view this discussion on the web visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_alpha/025d01d8b8c4%248f314020%24ad93c060%24%40telus.net.