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

Console opens only after restart, then stops #4047

Closed
Protazy21 opened this issue May 17, 2019 · 33 comments
Closed

Console opens only after restart, then stops #4047

Protazy21 opened this issue May 17, 2019 · 33 comments

Comments

@Protazy21
Copy link

  • Microsoft Windows [Version 10.0.17763.503]

  • opening console works only after reboot, you can open OpenSuse or Ubuntu console or type bash in cmd and all works fine, after some use if you close all windows with console you can't open again, say you open OpenSuse42.3 the window will show up but there is no prompt, if you type bash in cmd, the command will start execution and hang, no prompt will show up.
    Seems to be distro unrelated as both ubuntu and opensuse are affected.

  • What's wrong / what should be happening instead:
    Prompt never shows up, should show up after opening a console window or execution command in cmd/powershell

opensuse-bash
cmd-bash

logs.zip

@bigxd123
Copy link

same problem

This was referenced Jun 26, 2019
@dfeinzeig
Copy link

same problem. any updates? this is ridiculous. i use this to make a living.

@benhillis
Copy link
Member

What state is the LxssManager service in while this is happening?

@dfeinzeig
Copy link

dfeinzeig commented Jul 11, 2019

LxssManager is running. It fails to stop/restart. Tried launching bash as admin and non-admin, no difference. I've been using it for months without issue. Suddenly started happening this week.

@benhillis
Copy link
Member

If you "sc stop lxssmanager" from admin, does the service stop or does it get stuck in the "stopping" state?

@dfeinzeig
Copy link

dfeinzeig commented Jul 11, 2019

C:\Windows\system32>sc stop lxssmanager
[SC] ControlService FAILED 1061:

The service cannot accept control messages at this time.
C:\Windows\system32>sc query lxssmanager

SERVICE_NAME: lxssmanager
        TYPE               : 30  WIN32
        STATE              : 3  STOP_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x2
        WAIT_HINT          : 0xea60

@benhillis
Copy link
Member

Thanks. This is an issue that I've been debugging for a while. In the meantime, to get back to a working state if you kill the svchost.exe that is running the LxssManager service. You can get this pid via the services tab of task manager. You can avoid this issue by leaving a window open, or launching something in the background like a detached tmux session.

@dfeinzeig
Copy link

I get access denied message when trying to kill that svchost process

@benhillis
Copy link
Member

From task manager?

@dfeinzeig
Copy link

yes, end task from task manager and also from taskkill on cmd as admin

@benhillis
Copy link
Member

Interesting... I can do that on my machine with no issues. My other workarounds will still work for you though as I diagnose this issue.

@dfeinzeig
Copy link

ok, i will reboot i guess and then just keep a shell open. let me know if there is anything else you'd like me to try before rebooting and losing this broken state?

@benhillis
Copy link
Member

If possible, a dump of the service might be useful, but if you cant kill it it's unlikely you'll be able to collect a memory dump.

@dfeinzeig
Copy link

nope, no luck also get access denied. next time it happens i can try again.

@dfeinzeig
Copy link

after restart i can start bash. but then if i close it, and try to open again it hangs again. once again can't kill the svchost process or take a dump of it, getting access denied.

@benhillis
Copy link
Member

@dfeinzeig - Could you collect a trace? Starting from a fresh reboot?

@dfeinzeig
Copy link

sure, how do i do that?

@benhillis
Copy link
Member

@dfeinzeig
Copy link

so reboot, start the 3 traces, launch bash, close it, try to relaunch, stop 3 traces?

@benhillis
Copy link
Member

Correct, thanks!

@dfeinzeig
Copy link

k, np, brb

@dfeinzeig
Copy link

ugh, now bash starts again after closing (not something i thought i'd complain about!) i collected traces, but guessing they aren't particularly helpful?

@benhillis
Copy link
Member

Yeah I'd need a trace of the repro. In the past is it possible you waited about 5 minutes before attempting to re-launch?

@dfeinzeig
Copy link

when i tried a few minutes ago i successfully launched it, tried uptime, closed it, and then immediately tried to relaunch but it failed

@jgoeglein
Copy link

Found this thread while having the same issue. Ran 3 log traces as described. Adding additional logs in case they help.

Surface Pro 6. Version 10.0.18362 Build 18362

I first ran Ubuntu directly. After that, I attempted to run bash from Powershell with the same result (screenshots below). I waited roughly a minute for each attempt.

image

image

lxcoreLogs.zip

@jgoeglein
Copy link

An update to try for anyone else coming along - I removed BitDefender antivirus and haven't had this issue since.

@arsdever
Copy link

Any progress made on this scope? Still happens on my machine

@MerzDaniel
Copy link

Also (or again) hangs with the most recent windows update KB4023057 . I have no HyperV installed. Clean restart fixed it

@stemabo
Copy link

stemabo commented Nov 29, 2021

+1 cannot open nano or vim
Terminal appears to be fine first, but starting nano or vim results in a blanc black screen.
Need to then hit CTRL+X to get my prompt back, this also displays some zombie-nano content: the content of the file I was trying to open in nano + a grey "GNU nano 4.8" header - but at the bottom I am back at the command prompt.
reboot does not resolve the issue

@lafloresb
Copy link

The best solution that always worked for me was to:

  1. Disable WSL windows feature
  2. Restart OS
  3. Enable WSL windows feature
  4. Restart OS
  5. It is going to work again without deleting any of your WSL environments

@Sieboldianus
Copy link

Sieboldianus commented Feb 9, 2023

WSL1 Ubuntu 18.04 LTS stopped working today after I installed Debian in another WSL1 distro using lxrunoffline. The other WSL distros (including Debian) continue to work.

Nothing helps so far:

  • Disabling/Enabling WSL Feature
  • Stopping lxssmanager and starting again
  • Renaming .bashrc in the Ubuntu WSL distro using powershell bash
  • changing the WSL distro start user back to root (id 0)

I have the feeling this distro is lost. It is only 1 month away from EOL for Ubuntu 18.04 LTS, so I may as well leave the ship to a new distro.

@sanba-anass
Copy link

sanba-anass commented Jun 18, 2023

The best solution that always worked for me was to:

  1. Disable WSL windows feature
  2. Restart OS
  3. Enable WSL windows feature
  4. Restart OS
  5. It is going to work again without deleting any of your WSL environments

u saved my day !!!!!!!!! thank u so much

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!

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

No branches or pull requests