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

Using wmic from zsh (cygwin) causes conhost to crash #5175

Closed
Elepover opened this issue Mar 30, 2020 · 8 comments
Closed

Using wmic from zsh (cygwin) causes conhost to crash #5175

Elepover opened this issue Mar 30, 2020 · 8 comments
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.

Comments

@Elepover
Copy link

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.10.781.0

Any other software?
zsh (from cygwin package manager)

Steps to reproduce

  1. Type wmic <- First round
  2. Press Ctrl-C
  3. Type wmic again <- Second round
  4. Press Ctrl-C

Then OpenConsole.exe crashes with exit code 1.

Expected behavior

Other shells work just fine (w/ and wo/ Windows Terminal), only zsh causes OpenConsole.exe to crash.

Bash
Image

Bash (from cygwin, running with Windows Terminal)
Image

Git Bash (MINGW64)
Image

Windows PowerShell, running with Windows Terminal
Image

Windows Command Prompt, running with Windows Terminal
Image

zsh, first round
Image

zsh, second round before pressing Ctrl-C
Image

zsh, second round after pressing Ctrl-C
Image

(I didn't scroll the console window, it looks like the console just scrolled itself)

Actual behavior

When you do the first time, nothing abnormal happens
Image

If you do it again, OpenConsole.exe crashes and Windows Error Reporting prompts up.
Image

leaving output: [process exited with code 1]

Although I used oh-my-zsh for customization, zsh itself without any modification will crash OpenConsole.exe to crash, too.

My guess is that zsh printed something corrupt that OpenConsole.exe cannot handle. And zsh is the only shell that outputs a little % after Ctrl-C is pressed.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Mar 30, 2020
@Elepover Elepover changed the title zsh Causes Crash zsh Causes OpenConsole.exe to Crash Mar 30, 2020
@DHowett-MSFT
Copy link
Contributor

Triage notes: wmic sets the screen to be 1500x300 characters (which is insane); when zsh later attempts to clear part of the screen we try to access a character that's out of bounds.

@DHowett-MSFT
Copy link
Contributor

This reproduces in the windows console host if the buffer size and screen size are set to the same thing. Even in Windows 20H1.

@DHowett-MSFT
Copy link
Contributor

Marking this for 21H1, taking triage off.

@DHowett-MSFT DHowett-MSFT added Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase Severity-Crash Crashes are real bad news. Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 3, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 3, 2020
@DHowett-MSFT DHowett-MSFT changed the title zsh Causes OpenConsole.exe to Crash Using wmic from zsh (cygwin) causes conhost to crash Apr 3, 2020
@zadjii-msft zadjii-msft added this to the Console Backlog milestone Dec 9, 2021
@DHowett
Copy link
Member

DHowett commented Dec 9, 2021

image

I've got good news and bad news.

image

@zadjii-msft
Copy link
Member

Arguably, whatever they were doing should still not crash, even if wmic itself is deprecated.

@zadjii-msft
Copy link
Member

Meh, this one and #7581 are the same thing. That other thread's got a better non-wmic repro though, so I'm gonna use that one. Thanks!

/dup #7581

@ghost
Copy link

ghost commented Dec 13, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Dec 13, 2021
@ghost ghost added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Dec 13, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

4 participants