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

Systemd cannot enter unknown state and Genie cannot list any failed units #297

Open
1 task
CompSciDude1 opened this issue Sep 7, 2022 · 5 comments
Open
1 task
Assignees
Labels
bug Something isn't working

Comments

@CompSciDude1
Copy link

Windows version (build number):

Version 20H2 (OS Build 19042.1889)

Linux distribution:

Ubuntu 22.04 LTS (Jammy Jellyfish)

I cannot get to the Microsoft Store to install it, so I ran winget show –name “Ubuntu 22.04 LTS”, retrieved the Download Url, and pasted that in my browser to download the Ubuntu2204-220620.AppxBundle.

Kernel version:

5.10.16.3-microsoft-standard-WSL2

Genie version:

genie 2.4

Describe the bug

Genie fails to initialize. Genie fails to list failed units due to Transport endpoint is not connected.

Confirm that you are running inside the bottle:

Outside.

To Reproduce

Steps to reproduce the behavior:

  • Download the latest Ubuntu 22.04 sideload.
  • Install it
  • Launch it
  • Follow the prompts to set up Ubuntu 22.04
  • Run sudo apt update
  • Run sudo apt upgrade net-tools nfs-common mount cifs-utils dos2unix
  • Run sudo apt install build-essential binutils-doc cpp-doc gcc-doc glibc-doc libstdc++-9-doc make-doc automake autoconf-doc m4-doc aspell aspell-doc git gitk git-doc git-gui gitmagic git-extras git-lfs gdb gdb-doc ddd ddd-doc valgrind ssh ssh-tools libjpeg-dev libjpeg62 libgl1-mesa-dev libglu1-mesa-dev mesa-utils glmark2 kcachegrind cppcheck source-highlight qtbase5-dev qtbase5-doc qtbase5-doc-dev qtbase5-doc-html qt5-doc qt5-doc-html qtcreator qgit cmake-doc cmake cmake-qt-gui
  • Run sudo apt install ghostscript ghostscript-x ghostscript-doc gsfonts gv gnuplot gnuplot-doc gnuplot-qt graphviz graphviz-doc doxygen doxygen-latex doxygen-gui doxygen-doc dvipng python2 python3 python3-pip python3-testresources python3-ndg-httpsclient
  • Run sudo apt install xorg xorg-docs xloadimage xfonts-100dpi xfonts-75dpi xfonts-terminus xfonts-traditional xfonts-cyrillic xfonts-traditional desktop-base ubuntu-desktop gnome gnome-shell-extension-ubuntu-dock daemonize network-manager-openconnect network-manager-openconnect-gnome meld yelp
  • Configure the wsl-transdebian repository
  • Run sudo apt update
  • Run sudo apt install systemd-genie
  • Restart WSL2
  • Run genie –verbose –initialize

Systemd tries to enter state unknown. Genie fails to initlaize. Genie fails to list failed units. Please see Additional context for console output.

Expected behavior

Genie should list the failed units.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

tommy@tsmith-ubuntu2204:~$ genie --verbose --initialize
genie: starting bottle
genie: generating new hostname
genie: external hostname is tsmith-ubuntu2204
genie: setting new hostname to tsmith-ubuntu2204-wsl
genie: updating hosts file
genie: unmounting binfmt_misc filesystem before proceeding
genie: AppArmor not available in kernel; attempting to continue without AppArmor namespace
genie: starting systemd with command line:
daemonize /usr/bin/unshare -fp --propagation shared --mount-proc -- systemd
Waiting for systemd....!
genie: systemd did not enter running state (unknown) after 1 seconds
genie: this may be due to a problem with your systemd configuration
genie: information on problematic units is available at https://github.com/arkane-systems/genie/wiki/Systemd-units-known-to-be-problematic-under-WSL
genie: a list of failed units follows:

Failed to list units: Transport endpoint is not connected
tommy@tsmith-ubuntu2204:~$

I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:

  • Yes.
@CompSciDude1 CompSciDude1 added the bug Something isn't working label Sep 7, 2022
@cerebrate
Copy link
Member

Your installation appears to be timing out after one second, which shouldn't be possible with the default config file. Can you post a copy of your /etc/genie.ini, please?

@CompSciDude1
Copy link
Author

Hello,

I changed the timeout from 120 seconds to 1 second because the polling was taking a very long to occur. I don't think it is a problem with genie, but a problem with systemd on Ubuntu 22.04.

@wswind
Copy link

wswind commented Sep 20, 2022

I've met the same issue on archlinux after changing the timeout to 30 seconds. If the timeout is too short , genie will not display the failed systemd services and wait forever.

PS: I've created /etc/genie.ini before genie -s , because 240 seconds is too long for me.

# /etc/genie.ini

[genie]
systemd-timeout=30

image

@cerebrate
Copy link
Member

I suspect an issue here is that you aren't seeing failed systemd services because they haven't had time to fail yet. It's still showing as "starting". You aren't going to get reliable results from listing failed units until systemctl is-system-running moves on to "degraded".

("unknown" is curious. That one translates as, per man page, "The operational state could not be determined, due to lack of resources or another error cause."), so something seems to be messed up with your systemd. Does it stay as unknown from then on? Does systemctl respond after you get the prompt back?)

@wswind
Copy link

wswind commented Sep 28, 2022

No, it will just keep waiting. I waited for about five minutes . Then shuted it down and reset the systemd-timeout configuration back to 240. Everything works fine then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants