No WSL detected BOINC 7.20.2

21 views
Skip to first unread message

boin...@telus.net

unread,
Aug 4, 2022, 4:13:39 PM8/4/22
to boinc...@ssl.berkeley.edu

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

Vitalii Koshura

unread,
Aug 4, 2022, 4:38:29 PM8/4/22
to boin...@telus.net, BOINC Alpha
Hello Bob,

Thank you for the report.
That's quite interesting because I have the same version with the same (more recent) WSL and it's recognized just fine:

C:\SRC>wsl --status

Default Distribution: Ubuntu-20.04
Default Version: 2

Windows Subsystem for Linux was last updated on 4/8/2022

WSL automatic updates are on.

Kernel version: 5.10.102.1

26-Jul-2022 23:36:06 [---] Starting BOINC client version 7.20.2 for windows_x86_64
------- non relevant lines skipped -----------
26-Jul-2022 23:36:20 [---] WSL detected:
26-Jul-2022 23:36:20 [---]    [Ubuntu-20.04] (default): Linux Ubuntu (Ubuntu 20.04.1 LTS [5.10.102.1-microsoft-standard-WSL2])

Could you please indicate whether you have BOINC installed as a service or as a general application?

Best regards,
Vitalii Koshura


чт, 4 авг. 2022 г. в 22:13, <boin...@telus.net>:
--
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.

boin...@telus.net

unread,
Aug 4, 2022, 11:36:39 PM8/4/22
to Vitalii Koshura, BOINC Alpha

Hi Vitalii,

 

Boinc not installed as a service, only starts when you log in.

 

Regards,

Bob

boin...@telus.net

unread,
Aug 6, 2022, 4:57:38 PM8/6/22
to Vitalii Koshura, BOINC Alpha

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,

boin...@telus.net

unread,
Aug 8, 2022, 4:55:55 PM8/8/22
to Vitalii Koshura, BOINC Alpha

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,

Richard Haselgrove

unread,
Aug 8, 2022, 5:05:32 PM8/8/22
to Vitalii Koshura, boin...@telus.net, BOINC Alpha
That makes no sense. WSL will be detected (or not), and logged (or not), by the client.


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.


boin...@telus.net

unread,
Aug 8, 2022, 5:14:05 PM8/8/22
to Richard Haselgrove, Vitalii Koshura, BOINC Alpha

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

Richard Haselgrove

unread,
Aug 8, 2022, 5:47:57 PM8/8/22
to Vitalii Koshura, boin...@telus.net, BOINC Alpha
One possible explanation:


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?


boin...@telus.net

unread,
Aug 10, 2022, 6:23:33 PM8/10/22
to Richard Haselgrove, Vitalii Koshura, BOINC Alpha

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.

boin...@telus.net

unread,
Aug 11, 2022, 1:17:44 AM8/11/22
to Richard Haselgrove, Vitalii Koshura, BOINC Alpha

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.

boin...@telus.net

unread,
Aug 23, 2022, 6:44:53 PM8/23/22
to Richard Haselgrove, Vitalii Koshura, BOINC Alpha

Is there anything update on this issue, should I create a PR on github?

Vitalii Koshura

unread,
Aug 23, 2022, 6:49:12 PM8/23/22
to boin...@telus.net, Richard Haselgrove, BOINC Alpha
Hello,

Currently no updates on this issue since it's a very low priority because it's just a feature detection, there is no any project that uses it.
If you want - you can create a ticket on Github, but I can't promise that it will be fixed soon.

In any case, thank you very much for your report.

Best regards,
Vitalii Koshura


ср, 24 авг. 2022 г. в 00:44, <boin...@telus.net>:

Richard Haselgrove

unread,
Aug 24, 2022, 3:42:30 AM8/24/22
to Vitalii Koshura, boin...@telus.net, BOINC Alpha
Depends. Have you tried the tests I suggested, and come up with a change that will guarantee that WSL will be detected on automatic start?


Otherwise, it remains an issue, not a PR.

boin...@telus.net

unread,
Aug 25, 2022, 4:52:21 PM8/25/22
to Richard Haselgrove, Vitalii Koshura, BOINC Alpha

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.

Richard Haselgrove

unread,
Aug 25, 2022, 5:21:40 PM8/25/22
to Vitalii Koshura, boin...@telus.net, BOINC Alpha
No, sorry, no sign of that in my inbox. But if you've found an explanation - that's great.

Reply all
Reply to author
Forward
0 new messages