Weird output when I do rustlings on WSL1

anyone seen this when they try to solve rustlings :

⠁ Compiling exercises/variables/variables1.rs...
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:179:21
✓ Successfully ran exercises/variables/variables1.rs!
⠁ Compiling exercises/variables/variables2.rs...
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
✓ Successfully ran exercises/variables/variables2.rs!
⠁ Compiling exercises/variables/variables3.rs...
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,

can it be because I had to set rust_io-threads to 1 otherwise I could not install rustup ?

That appears to be a bug in WSL. The failure comes from low-level code that sets up threads, and it isn't supposed to be possible to make it fail.

oke, so I have to wait till WSL2 can be installed on my system

You might have success if you can switch the distro you are running under WSL (using ubuntu 18.04 instead of 20.04 for example). The newer glibc and WSL1 don't play well together yet.

Out of interest, can you reproduce the error?

My company policy means I'm stuck with WSL1 but luckily I haven't encountered that error. My WSL1 is:

$ uname -a
Linux 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

The only problem I'm having with WSL1 and 18.04 is that Node is constantly running at 10-20% CPU.

oke, I have WSL 1 and Ubuntu 20.04.

when I do not do the rust_io-threads to 1 I can reproduce the error.
I even made a issue of this problem.

So I can better stop with Ubuntu 20,04 and set up a box with Ubuntu 18.04 ?

Can you just install Rust on your Windows system directly? I use a Windows machine at work and it runs fine.

I could but I found out that diesel and Windows are not a good combination.
It was a nightmare to get diesel working

You can give it a go if you can live with older libraries from 18.04. If you can use WSL2 it might be a better choice though.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.