Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: systemd not working #76

Open
colemar opened this issue Oct 1, 2022 · 2 comments
Open

[Bug]: systemd not working #76

colemar opened this issue Oct 1, 2022 · 2 comments

Comments

@colemar
Copy link

colemar commented Oct 1, 2022

Describe the bug

Installed Distrod (via install.sh) in an existing WSL2 distro Ubuntu 22.04.1 LTS (Jammy Jellyfish).
There is a pre-existing Debian distro with Distrod (via install.sh) that seems to work OK.

As soon as the Ubuntu distro is started vmmem process gets about 15% CPU as stated by Windows Task Manager.
Inside the distro:

  • top shows systemd at 100% CPU.
  • systemctl hangs for a while then spits: Failed to list units: Transport endpoint is not connected
  • sudo grep 'Distrod:' /dev/kmsg just hangs forever
    As soon as the Ubuntu distro is stopped (wls -t Ubuntu) vmmem process goes down to 0% CPU.
    I see nothing particularly wrong in the Distrod trace log.

I installed another Ubuntu 22.04 distro via distrod_wsl_launcher.exe and it works as expected.

Steps to reproduce

See above.

Expected behavior

systemd works

Windows version

Windows 10 21H2 19044.2006

Linux kernel version

5.10.102.1-microsoft-standard-WSL2

Distro

Ubuntu 22.04

How did you install that distro?

Enabled distrod in an existing WSL2 distro

Logs

[Distrod][DEBUG] distrod-exec: exec_command_in_distro
[Distrod][DEBUG] starting /init from distrod-exec
[Distrod][DEBUG] WSL envs: "WSL_DISTRO_NAME" = "Ubuntu"
[Distrod][DEBUG] WSL envs: "WSL_INTEROP" = "/run/WSL/12_interop"
[Distrod][DEBUG] WSL envs: "WSLENV" = "WT_SESSION::WT_PROFILE_ID"
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/run/distrod/cmdline")), target: ContainerPath("/proc/cmdline"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd"
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system"
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system/portproxy.service"
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/opt/distrod/run/systemd/system/portproxy.service")), target: ContainerPath("/run/systemd/system/portproxy.service"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system/systemd-tmpfiles-clean.service.d"
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf"
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/opt/distrod/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf")), target: ContainerPath("/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system/systemd-tmpfiles-setup.service.d"
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf"
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/opt/distrod/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf")), target: ContainerPath("/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/tmpfiles.d"
[Distrod][TRACE] mount_distrod_run_files: path: "/opt/distrod/run/tmpfiles.d/x11.conf"
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/opt/distrod/run/tmpfiles.d/x11.conf")), target: ContainerPath("/run/tmpfiles.d/x11.conf"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][DEBUG] DistroLauncher::launch
[Distrod][DEBUG] Container::with_mount source: Some(HostPath("/run/distrod/distrod_wsl_env-uid1000")), target: ContainerPath("/run/distrod/distrod_wsl_env-uid1000"), fstype: None, flags: MS_BIND, is_file: true
[Distrod][DEBUG] Spawning the command or the waiter.
[Distrod][DEBUG] Executing a command in the distro.
[Distrod][DEBUG] Failed to ignore signal Sys(EINVAL)
[Distrod][DEBUG] Failed to ignore signal Sys(EINVAL)
[Distrod][DEBUG] Distro::exec_command.
[Distrod][DEBUG] Container::exec_command.
[Distrod][DEBUG] Triple fork done.
[Distrod][TRACE] mounting source: Some(
ContainerPath(
"/run/distrod/cmdline",
),
), mount: ContainerMount { source: Some(HostPath("/run/distrod/cmdline")), target: ContainerPath("/proc/cmdline"), fstype: None, flags: MS_BIND, data: None, is_file: true }
[Distrod][TRACE] mounting source: Some(
ContainerPath(
"/opt/distrod/run/systemd/system/portproxy.service",
),
), mount: ContainerMount { source: Some(HostPath("/opt/distrod/run/systemd/system/portproxy.service")), target: ContainerPath("/run/systemd/system/portproxy.service"), fstype: None, flags: MS_BIND, data: None, is_file: true }
[Distrod][DEBUG] dropping privilege. kmsg logging in the child ends here.
[Distrod][TRACE] mounting source: Some(
ContainerPath(
"/opt/distrod/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf",
),
), mount: ContainerMount { source: Some(HostPath("/opt/distrod/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf")), target: ContainerPath("/run/systemd/system/systemd-tmpfiles-clean.service.d/exclude_wslg_sockets.conf"), fstype: None, flags: MS_BIND, data: None, is_file: true }
[Distrod][DEBUG] The parent of the second of three forks exits.
[Distrod][TRACE] mounting source: Some(
ContainerPath(
"/opt/distrod/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf",
),
), mount: ContainerMount { source: Some(HostPath("/opt/distrod/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf")), target: ContainerPath("/run/systemd/system/systemd-tmpfiles-setup.service.d/exclude_wslg_sockets.conf"), fstype: None, flags: MS_BIND, data: None, is_file: true }
[Distrod][DEBUG] Spawning the command or the waiter.
[Distrod][TRACE] mounting source: Some(
ContainerPath(
"/opt/distrod/run/tmpfiles.d/x11.conf",
),
), mount: ContainerMount { source: Some(HostPath("/opt/distrod/run/tmpfiles.d/x11.conf")), target: ContainerPath("/run/tmpfiles.d/x11.conf"), fstype: None, flags: MS_BIND, data: None, is_file: true }
[Distrod][DEBUG] Spawning the waiter.
[Distrod][TRACE] skipping an identical mount: Some(
ContainerPath(
"/run/distrod/distrod_wsl_env-uid1000",
),
), ContainerMount {
source: Some(
HostPath(
"/run/distrod/distrod_wsl_env-uid1000",
),
),
target: ContainerPath(
"/run/distrod/distrod_wsl_env-uid1000",
),
fstype: None,
flags: MS_BIND,
data: None,
is_file: true,
}
[Distrod][DEBUG] Failed to ignore signal Sys(EINVAL)
[Distrod][DEBUG] Failed to ignore signal Sys(EINVAL)

additional comment

No response

@psmolkin
Copy link

psmolkin commented Oct 1, 2022

What version of the systemd package?

It seems the last one (250.*) is broken:
microsoft/WSL#8879

@colemar
Copy link
Author

colemar commented Oct 1, 2022

@psmolkin
systemd 249.11-0ubuntu3.6
And it is the same version that is working in the other ubuntu distro which was installed via distrod_wsl_launcher.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants