Skip to content

ptys hang with heavy output and input in tmux, sometimes hanging WSL with BSOD on reboot #1358

Closed

Description

@cgull
  • A brief description

WSL seems to have problems with hanging ptys, unkillable processes, and sometimes BSODs when heavy output and input are combined in tmux. This is probably related to #1085 (and by extension #1111?) but that issue is supposedly resolved and I'm on a newer build.

  • Expected results

For the below repro, you should see the command terminating normally to a shell prompt and your tmux session and WSL overall should continue to function normally.

  • Actual results (with terminal output if applicable)

For the below repro, the session hangs, and the shell and tmux processes are also hung (the process I examined closely was stuck in a write syscall on the pty) and sometimes unkillable. Sometimes the entire WSL session also seems to be unkillable-- the console window will not close after the close button is pressed. Twice now when attempting to reboot, the machine has blue screened, but I think one time it did not.

  • Your Windows build number

14965

  • Steps / All commands required to reproduce the error from a brand new installation

Install tmux:
sudo apt install tmux
Start tmux:
tmux
Enter this shell command:
(while cat /etc/services; do :; done) & read x; kill %1; sleep 1
Press Enter.

  • Alternate repro (may be less reliable, but this is where I discovered the problem)
sudo apt install tmux git
git clone https://github.com/mobile-shell/mosh
cd mosh/src/tests/
git checkout 4bc9e5
tmux

In the new tmux session, start a Mosh test script:

./pty-deadlock.test baseline

Press Enter. Wait a second. Press Enter. The script should exit and display === normal exit ===, and then a shell prompt, but will probably hang instead as above.

(Yes, the script is intriguingly named, but the issue it was written for is different and involves FreeBSD. It just happens to trigger this bug too.)

  • Strace of the failing command

Would be enormous...

  • Required packages and commands to install

See repro.

Activity

  1. changed the title [-]ptys hang with heavy output and input in tmux[/-] [+]ptys hang with heavy output and input in tmux, sometimes hanging WSL with BSOD on reboot[/+] on Nov 14, 2016
  2. fpqc commented on Nov 14, 2016

    @fpqc

    Must be harder to trigger now, since I was using tmux in ssh in another tmux in mintty (pty in pty in pty in pty) all weekend without any problems. I guess it was two separate bugs, maybe, so this is a really good catch (you're probably hitting the one now that caused that mysterious bugcheck for me related to this!)

  3. bitcrazed commented on Apr 7, 2017

    @bitcrazed
    Contributor

    Thanks for letting us know that this appears to be resolved fpqc: Please do reopen if you see this reoccur.

  4. cgull commented on Apr 12, 2017

    @cgull
    Author

    I think fpqc was referring to the issues he posted, not mine-- he replied soon after I opened this issue. But I just checked with build 15058 and I can't seem to reproduce the issue there, so it does seem to be resolved.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions