wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
14.94k stars 677 forks source link

Multiplexer lock-up / slowdown when running programs with large stdout #2048

Closed kraftnix closed 1 year ago

kraftnix commented 2 years ago

What Operating System(s) are you seeing this problem on?

Linux Wayland

WezTerm version

commit - 80caba1db35c06f839d38c86a34d7baf917d5fbb

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When any buffer in a wezterm multiplexer session receives a large amount of output, the entire domain/session will slow down (and often fully lock-up) with no recourse available except force killing the wezterm-mux-server, sometimes even after killing the process which is producing a large amount of output, wezterm will stay frozen.

If the wezterm buffer/pane with the large output is pushed to the background (i.e. you open a new tab), the entire wezterm multiplexer session stays frozen / extremely slow.

To Reproduce

  1. open a unix domain
    wezterm connect unix
  2. run a program which produces a huge output (depending on your machine you may need multiple)
    journalctl --no-pager
    # or
    cat /extremely/large/file.txt
    # or (may crash your wezterm)
    cat /dev/random
  3. domain will freeze / slow down a lot

Configuration

no config

Expected Behavior

behaviour should be similar to Wezterm run without a multiplexer (wezterm start), which does not freeze up when presented with a large output, or can recover once large output process has been killed, there is a bit of slowdown when you have a huge amount of output (running 5 buffers with massive output at the same time), but it is recoverable and only slowed down, a freeze does not seem to occur.

Logs

no relevant logs

Anything else?

This may be heavily related to #1872, as a heavy user of multiplexing in Wezterm, I have noticed significant slowdowns whenever running a program which produces a fair amount of output, since the slowdown is persistent even when the large output program is not in the foreground (you open a new tab).

joshuarubin commented 2 years ago

I'm having this issue just running vim on a large display over ssh mux. Client is MacOS Mojave, Server is Ubuntu 20.04. It doesn't lock up, but is significantly slower than just wezterm ssh. I am using the Ssh2 backend since the default one did not work with ScaleFT (which uses a ProxyCommand that always disconnected).

wez commented 1 year ago

Duplicate of https://github.com/wez/wezterm/issues/1872

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.