Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-64288

Issue with systemctl status when using WSL

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • CentOS Stream 9
    • systemd
    • None
    • None
    • Low
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 5
    • None
    • CentOS Stream
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      I'm trying to use EL9 based distribution in Windows WSL, for development purposes, but systemd has an issue where doing `systemctl status`  is getting an error trying to do dump process list

      Windows 10 and Windows 11 are both effected on their versions of WSL

      What is the impact of this issue to you?

      very small bug but not a direct issue to my workflow

      Please provide the package NVR for which the bug is seen:

      systemd-252-47.el9

      How reproducible is this bug?:

      Every time, other distributions have/had this problem see here WSL issue

      Can also replicate in Rocky Linux 9

      The above Github issue points out this has been fixed in later versions of Systemd, so hopefully it's as simple as back porting the fix.

      systemd PR I believe is the fix on github, Pull Request

      Steps to reproduce

      Requirements
       - Windows with WSL installed (reboot required after install)
       - CPU with virtualization support

      1. Install Windows 10/11 system with WSL
      2. Get the latest container base, download to C:\temp\, then extract the layer.tar from inside, to c:\temp\
        https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-Container-Base-9-latest.x86_64.tar.xz
      3. Open a non-administrator command prompt
        > wsl --import CentOSStream9 c:\temp\installdir\ c:\temp\layer.tar --version 2
      4. Enter the wsl imported distro, this will error about TranslatePath due to missing package util-linux-core
        > wsl -d CentOSStream9
      5. Install required packages in stream9
        # yum install -y util-linux-core systemd
      6. Tell WSL to start systemd for this distrobution
        # cat > /etc/wsl.conf << 'EOF'
        [wsl]
        autostop = false
        
        [boot]
        systemd=true
        EOF
      7. Exit WSL
        # exit
      8. Stop the distrobution
        > wsl --terminate CentOSStream9
      9. Start and enter the distrobution
        > wsl -d CentOSStream9
      10. Check the status of systemd
        # systemctl status

      Expected results

      Command to function correctly without the error and return the CGroup information

      Actual results

      [root@Glacier /]# systemctl status
      Failed to dump process list for 'Glacier', ignoring: Input/output error
      ● Glacier
      State: running
      Units: 122 loaded (incl. loaded aliases)
      Jobs: 0 queued
      Failed: 0 units
      Since: Tue 2024-10-22 18:19:31 BST; 1min 44s ago
      systemd: 252-47.el9
      CGroup: /

              systemd-maint systemd maint mailing list
              fingerlessgloves Jonny Proud
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: