WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
696 stars 51 forks source link

Exiting does not work sometimes #157

Open gtirloni opened 2 years ago

gtirloni commented 2 years ago

Describe the bug Sometimes, when exiting (either Ctrl-D or exit) from a terminal, it starts some process and goes back to the shell.

To Reproduce Steps to reproduce the behavior:

  1. Press Ctrl-D or type exit

Expected behavior The shell exits.

Screenshots

~ $ exit
logout
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4302  100  4302    0     0  15883      0 --:--:-- --:--:-- --:--:-- 15933
whitewaterfoundry_fedoraremix                                               875  B/s | 1.8 kB     00:02
whitewaterfoundry_fedoraremix-source                                        923  B/s | 1.8 kB     00:02
Dependencies resolved.
============================================================================================================
 Package                      Architecture       Version                 Repository                    Size
============================================================================================================
Upgrading:
 google-cloud-cli             x86_64             384.0.0-1               google-cloud-cli             101 M

Transaction Summary
============================================================================================================
Upgrade  1 Package

Total download size: 101 M
Downloading Packages:
e7ed2e9ea56170707d9f3b5811308cfc288ff98e4036c3ab4d2a1b16b937557c-google-clo  15 MB/s | 101 MB     00:06
------------------------------------------------------------------------------------------------------------
Total                                                                        15 MB/s | 101 MB     00:06
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                    1/1
  Upgrading        : google-cloud-cli-384.0.0-1.x86_64                                                  1/2
warning: Unable to get systemd shutdown inhibition lock: Protocol error

  Running scriptlet: google-cloud-cli-384.0.0-1.x86_64                                                  1/2
  Running scriptlet: google-cloud-cli-383.0.1-1.x86_64                                                  2/2
  Cleanup          : google-cloud-cli-383.0.1-1.x86_64                                                  2/2
  Running scriptlet: google-cloud-cli-383.0.1-1.x86_64                                                  2/2
/sbin/ldconfig: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

  Verifying        : google-cloud-cli-384.0.0-1.x86_64                                                  1/2
  Verifying        : google-cloud-cli-383.0.1-1.x86_64                                                  2/2

Upgraded:
  google-cloud-cli-384.0.0-1.x86_64

Complete!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3333  100  3333    0     0  12066      0 --:--:-- --:--:-- --:--:-- 12032
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2169  100  2169    0     0   8622      0 --:--:-- --:--:-- --:--:--  8641
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   567  100   567    0     0   2265      0 --:--:-- --:--:-- --:--:--  2268
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   189  100   189    0     0    744      0 --:--:-- --:--:-- --:--:--   744
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   222  100   222    0     0   4078      0 --:--:-- --:--:-- --:--:--  4111
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1827  100  1827    0     0  35991      0 --:--:-- --:--:-- --:--:-- 36540
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   142  100   142    0     0   2635      0 --:--:-- --:--:-- --:--:--  2679
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   151  100   151    0     0   2783      0 --:--:-- --:--:-- --:--:--  2796
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  284k  100  284k    0     0  2382k      0 --:--:-- --:--:-- --:--:-- 2391k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4302  100  4302    0     0  75009      0 --:--:-- --:--:-- --:--:-- 75473
Last metadata expiration check: 0:00:53 ago on Wed 04 May 2022 06:19:31 AM -03.
Dependencies resolved.
Nothing to do.
Complete!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3333  100  3333    0     0  63215      0 --:--:-- --:--:-- --:--:-- 64096
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2169  100  2169    0     0  41603      0 --:--:-- --:--:-- --:--:-- 41711
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   567  100   567    0     0  10208      0 --:--:-- --:--:-- --:--:-- 10309
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   189  100   189    0     0   3520      0 --:--:-- --:--:-- --:--:--  3566
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   222  100   222    0     0   4085      0 --:--:-- --:--:-- --:--:--  4111
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1827  100  1827    0     0  35829      0 --:--:-- --:--:-- --:--:-- 36540
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   142  100   142    0     0   2603      0 --:--:-- --:--:-- --:--:--  2629
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   151  100   151    0     0   2967      0 --:--:-- --:--:-- --:--:--  3020
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  284k  100  284k    0     0  2908k      0 --:--:-- --:--:-- --:--:-- 2934k
Systemd is ready.
Last login: Tue May  3 17:16:57 -03 2022 on pts/2
~ $

Additional context Sometimes if this process is running and I exit another shell in the same way (e.g. a different panel in Windows Terminal), it also starts in the other panel.

Basic Troubleshooting Checklist

[x] I have searched Google for the error message. [x]I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues. [x] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset. [x] I have disabled and re-enabled WSL in Windows Features. [x] I have run Windows 10 updates and restarted.

WLinux Version

Find: Settings->Apps->Apps & features->WLinux->Advanced Options->Version.

Insert here:

> wsl --status
Default Distribution: fedoraremix
Default Version: 2

Windows Subsystem for Linux was last updated on 4/5/2022
WSL automatic updates are on.

Kernel version: 5.10.102.1

Windows Build

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22000 N/A Build 22000
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
crramirez commented 2 years ago

Hello @gtirloni,

To confirm, are you launching Fedora Remix using the SystemD option?

Regards, Carlos

gtirloni commented 2 years ago

To confirm, are you launching Fedora Remix using the SystemD option?

Yes, that's right. I'm using the systemd option.

crramirez commented 2 years ago

Good, I could reproduce it.

Thank you for reporting

crramirez commented 2 years ago

Btw @gtirloni how is the systemd feature going? We haven't received any feedback from anyone about it

gtirloni commented 2 years ago

I love the systemd feature (it's my default now), thanks for having that. It's what actually made me use WSL for the last few days... I can finally have a Linux environment that is 99% like my Fedora dual-boot :-)

crramirez commented 2 years ago

@gtirloni thanks for the feedback, happy that is working for you 💯

gtirloni commented 2 years ago

Could this be an issue in start-systemd? I've added set -x to see what it's doing when this happens and will report back (one issue seems to be upgrade.sh reverts my changes to that file).

crramirez commented 2 years ago

Yes it is. We haven't had time to fix it. But it is in our priority list